-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
* Move dep/ to internal/ * Move testdata/ to internal/testdata * Move log funcs into own internal package so test, internal and cmd/dep can reference. Otherwise circular references were present. Using the name util in honor of @kris-nova and to ensure proper bike-shedding. * Move test/ into internal/test/ so that internal tests can use it
This lets other packages reference the configuration files
There’s an awkward cycle between util and test. One way to resolve would be to bring test into util. For now, I kept fs_test in internal instead of moving it into util too.
Moving internal/* to internal/dep/*. This keeps all our old references the same as before e.g. dep.Ctx stays the same instead of internal.Ctx
LGTM with the exception of |
@dcheney-atlassian Yeah that's why I left the comment invoking @kris-nova because she just started a conversation about this topic. I didn't want to spend too much time time coming up with pkg names and knew that calling it util would bring people out to share their opinions. 😀 |
If/when this converges with my logger changes or some version of them (#525), then |
Thanks for the love @carolynvs, Twitter shenanigans aside, what are we gaining from the move? Unsure what the inspiration for this awesome change is/was? Also re:
Which packages were conflicting? There are a few easy ways to pull them apart if necessary.. but usually when you get cycles it's because 1) you have too many packages or 2) an interface is defined somewhere weird or something. Just curious is all :) |
@kris-nova This was just a thought experiment (heavily aided by an IDE, so it wasn't a huge time investment). 😁 There has been encouragement to avoid exporting new types/functions, and when I was chatting with @sdboyer yesterday, I asked What would dep look like if we made everything internal? Instead of trying hard to not export things, and end up with a single flat directory, what if we moved most of dep into For #500 in particular, when I tried to implement it under I was hoping we could look at this and answer a couple questions:
|
@jmank88 Sweet! I didn't realize your in-proc changes would improve our logging situation too! 👍 |
Some quick thoughts on this... I do like the idea of moving almost everything into It seems like there's three basically sensible things we could do here:
3 is mostly a 🦆. 1 seems too draconian, but 2 seems a bit too open, and still problematic because we're absolutely still modifying those types. ...and actually, 2 seems remarkably similar to what we're already doing right now 😦. All that's to say, I'm open to argument here, and would ❤️ it if someone made a clear, strong one 😄 also, just
😂 😂 😂 ❤️ |
You probably want to move github.com/golang/dep/gps to
github.com/golang/dep/internal/gps unless you want people to start
depending on it; the version of gps forked into dep shows up in godoc and
will rank higher as soon as it gets one more importer.
https://godoc.org/?q=gps
…On Tue, May 9, 2017 at 11:21 AM, sam boyer ***@***.***> wrote:
Some quick thoughts on this...
I do like the idea of moving almost everything into internal, at least
initially, because it's easier to expose that stuff later when we're
confident than it is to play footsie with general community best practices
about releasing Go software in a project that's poised to influence those
practices. That's not an ouroboros I want.
It seems like there's three basically sensible things we could do here:
1. Expose...nothing. At least for now.
2. Expose gps, dep.Manifest, dep.Lock, and possibly also dep.Ctx.
3. Hide away e.g. the test package, maybe also the glide/other
tool-related packages, but leave the rest exposed.
3 is mostly a 🦆 <https://blog.codinghorror.com/new-programming-jargon/>.
1 seems too draconian, but 2 seems a bit too open, and still problematic
because we're absolutely still modifying those types. ...and actually, 2
seems remarkably similar to what we're already doing right now 😦.
All that's to say, I'm open to argument here, and would ❤️ it if someone
made a clear, strong one 😄
------------------------------
also, just
gps because it's crazy useful
😂 😂 😂 ❤️
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#527 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA_3zthikgsDncWqCcqYXFwbetIJ4ks5r37-ngaJpZM4NTYpV>
.
|
While I realize option 1 feels draconian, anyone who would be tempted to rely on this code right now is going to be burned. I just checked godoc and it doesn't appear that anyone is referencing dep yet. One could take that to mean that it's not worth bothering, or as the perfect time to move code before people do start referencing it. I don't have skin in the game, we could go either way exposing/hiding everything and I'd be fine. What is chaffing me right now is that concerns about exposing new code is making it harder for me to work on features. I am spending too much time thinking about where code should be. 😊 Maybe I'm the only one feeling that way, I am new-ish to Go. But I would love for us to decide and commit to one or other. |
Who is the decision maker for this issue?
…On Wed, 10 May 2017, 07:49 Carolyn Van Slyck ***@***.***> wrote:
While I realize option 1 feels draconian, anyone who would be tempted to
rely on this code right now is going to be burned. I just checked godoc and
it doesn't appear that anyone is referencing dep yet. One could take that
to mean that it's not worth bothering, or as the perfect time to move code
before people do start referencing it.
I don't have skin in the game, we could go either way exposing/hiding
everything and I'd be fine. What is chaffing me right now is that concerns
about exposing new code is making it harder for me to work on features. I
am spending too much time thinking about where code should be. 😊 Maybe
I'm the only one feeling that way, I am new-ish to Go. But I would love for
us to decide and commit to one or other.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#527 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA3C9eGS4F64KIGWbQeC6byj4VHFsks5r4N9xgaJpZM4NTYpV>
.
|
@davecheney this is a significant and general enough issue that i'm going to explicitly pull in other committee folks, so the decisionmaker in this case will be that group (though i may still be the one who clicks 'merge'). that's just decisionmaking, though. i'm hoping someone will step up with a coherent proposal for what of the codebase to make internal vs. not, as well as at least some general outline of how we should approach the question of publicizing packages in the future. i, at least, do not plan to make any such proposal (so, please ignore my earlier comment), though i'll certainly participate in discussing those that are made. |
Is #519 sufficient as a proposal? If not, what would you like to see?
…On Wed, May 10, 2017 at 11:00 AM, sam boyer ***@***.***> wrote:
@davecheney <https://github.com/davecheney> this is a significant and
general enough issue that i'm going to explicitly pull in other committee
folks, so the decisionmaker in this case will be that group (though i may
still be the one who clicks 'merge').
that's just decisionmaking, though. i'm hoping someone will step up with a
coherent proposal for what of the codebase to make internal vs. not, as
well as at least some general outline of how we should approach the
question of publicizing packages in the future.
i, at least, do not plan to make any such proposal (so, please ignore my
earlier comment), though i'll certainly participate in discussing those
that are made.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#527 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA2rw2CFLcWtL_YTydQnlfJRSgDE_ks5r4QwlgaJpZM4NTYpV>
.
|
(I'll assume #521 is also included alongside #519) Additional questions to answer would be:
|
I'm in favor of moving everything into |
On Wed, May 10, 2017 at 11:10 AM, sam boyer ***@***.***> wrote:
(I'll assume #521 <#521> is also
included alongside #519 <#519>)
Nope, scope creep is what is lead to this issue bogging down. #519
addresses just github.com/golang/dep/gps
Additional questions to answer would be:
- What do we do with the github.com/golang/dep package?
Out of scope for the moment.
-
- If it remains exposed, what guideline do we follow about
identifiers that are OK to export?
See above.
-
- At what time in the future would it be appropriate to consider
re-exposing some of these packages (e.g. gps or github.com/golang/dep)
Same
…
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#527 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AY8dppEIipzJg2b1XQWgftC49ZYAxLo4ks5r4Q6QgaJpZM4NTYpV>
.
|
If this discussion were on #519, it'd be scope creep. But the scope of this issue has, from the outset, been inclusive of moving (potentially) all packages under I opted to turn toward policy as we're organically bumping into this elsewhere, and it's clear that the lack of even a loose policy on this is hindering development. |
I'm sorry if my previous response came across as combative. My goal is to
solve #519 with the solution I proposed. There are other packages that the
same motivation applies to but I consider them out of scope because placing
them in scope seems to block any action behind calls for a holistic policy.
…On Wed, 10 May 2017, 12:25 sam boyer ***@***.***> wrote:
Nope, scope creep is what is lead to this issue bogging down. #519
<#519>
addresses just github.com/golang/dep/gps
If this discussion were on #519 <#519>,
it'd be scope creep. But the scope of this issue has, from the outset, been
inclusive of moving (potentially) all packages under internal/.
I opted to turn toward policy as we're organically bumping into this
elsewhere, and it's clear that the lack of even a loose policy on this is
hindering development.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#527 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA2KbPD-YHZut20ODO1YV7G7C2fy2ks5r4SAcgaJpZM4NTYpV>
.
|
no problem. seems pretty clear that any outcome here is going to end up putting gps under |
I'd still like to see us come to an understanding of what contributors should be aiming for with respect to what's exposed. Maybe that can be considered in #609. 😄 |
This is an experiment to see if we like having dep's guts moved into internal.
I was trying to implement #500 under internal and was running into circular dependency hell. If we don't go with something like this, my plan is to implement #500 outside of internal, all in one directory to stop wasting time with circular reference problems. 😀
I realize this touches pretty much ... everything so here's the tldr:
Otherwise circular references were present.
Using the name util in honor of @kris-nova and to ensure proper bike-shedding.
The following packages were left exported:
This is the final folder structure (though the commits are broken down if we want to not do all of this):