-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep gps as sealed-up as possible, for as long as possible. So, instead of moving this to internal/paths
, let's just move it out of the nested internal
- internal/gps/paths
.
When we get around to re-exporting gps later, we can decide what to do about making it public.
I'm struggling to see the difference. Can you expand on what "as sealed-up as possible" means regarding package structure? Has there been discussion about the logistics of re-exporting? Do you expect to move the whole gps subtree at once? Or just individual members? |
Another option would be to drop |
When gps was at github.com/sdboyer/gps, it necessarily had to function as a standalone system, without any "reverse" dependencies on dep. One of the ways that I keep responsibilities straight in my head is by maintaining that line, even after its relocation. So - functionally, there's no difference. But for now, I think that keeping the subtree sealed - that is, not importing anything from dep outside its own subtree - imposes a discipline on the project that ultimately serves us well. Maybe we change that down the line, but I'd like that to be an intentional plan, not something we back our way into incrementally.
No actual discussion yet, but #575 is where it'll be.
My expectation is the whole subtree.
Ah, yes! This would probably be even better. The only reason to protect the identifier via |
Ah, that was the missing piece for me. I was thinking we still wanted to hide it one way or another.
func (rm ReachMap) FlattenOmitStdLib() []string {
return rm.FlattenFn(paths.IsStandardImportPath)
} ...and now that the callers will have access to the function, they could just make the inline call themselves. This would also reduce the surface of the irregular |
Putting the function in |
I think just the small conflict fix, then this should be ready. |
Sorry, another conflict :/ |
cmd/dep
has a functionisStdLib
which duplicatespaths.IsStandardImportPath
.This change moves
package paths
up to the top levelinternal
package, in order to allow use fromcmd/dep
, and removesisStdLib
(after borrowing the more verbose comment).