-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganise the cobra library and the CLI as siblings #1240
Comments
I believe the problem is deeper than simply having people upgrade import paths. Since this repo was an early adopter of go mod, the
Unless we completely overhaul the structure of the repo (which I think could be warranted given how far the go mod has diverted), I think we will continue to see issues related to go paths and this project. |
@jpmcb, IMHO, the concern you raised is legit, but unrelated to this issue. ATM, the cobra CLI tool is a child of the cobra library. That is, subdir Whether the |
This issue is being marked as stale due to a long period of inactivity |
Still relevant. |
bump. |
We'll plan on doing this in the next release. But we should think deeply about how we want to go about this to prevent another critical regression the last time this was attempted: #1233 |
From #1233 (comment):
All options except the first one are quite disruptive because all users would need to update the import path: OTOH, creating organisation |
The advantage of keeping the tool with the library is they will always be in sync. I'm not opposed to moving it to another repo though, just acknowledging there will be additional coordination. We've not yet talked about it publicly much, but there's intent to develop a quickstart tool for Go and Cobra's an obvious case to build it around since there's already a prototype here. I think it's best to leave things as they are for now with hopes that the new I strongly don't want to do anything to affect the current import path of github.com/spf13/cobra. It's used far to broadly for anything to justify this huge disruption. |
# on master:
go list -m all | wc -l
151
# with cobra directory deleted
go list -m all | wc -l
9
# with doc directory deleted
go list -m all | wc -l
3 I think I'll use my fork for now. |
Agree. My preferred solution would be using subdirs in this repo:
|
I strongly agree with that. Limiting changes to the
Those packages could either be isolated (with a nested go.mod file providing a |
As discussed in #1233, having the library and the CLI reorganised as siblings in this repo would allow having separated
go.mod
files, while avoiding the ambiguity. However, that's a very disruptive breaking change, as the import path would probably change for all users. Hence, this issue is just a placeholder for now.Ref #1215 #1219
The text was updated successfully, but these errors were encountered: