-
Notifications
You must be signed in to change notification settings - Fork 113
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
Broken govendor/dep.. vendor support #53
Comments
+1. init failed: unable to solve the dependency graph: Solving failure: No versions of github.com/mediocregopher/radix met constraints:
3.1.0: Could not introduce github.com/mediocregopher/[email protected] due to multiple problematic subpackages:
Subpackage github.com/mediocregopher/radix/v3/resp is missing. (Package is required by github.com/mediocregopher/radix.v3@master.) Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by github.com/mediocregopher/radix.v3@master.) |
#50 already reported this. Unfortunately there's not much I can do at this point, it's too late to change the import paths of the package. It looks like dep has a PR open to fix this here: golang/dep#1963 but the author maybe just had a baby, judging by the comments. I'll leave this issue open, waiting on that one to get closed. |
@mediocregopher how about putting |
@mieczkowski I think, just as @mediocregopher stated, that would break builds for a lot of dependency packages. Hence, that would also break backwards compability. |
@mieczkowski the only way that would work is if I copied resp and its sub-package into the main one, I wouldn't be able to move them, which would be a giant pain for me as I'd now have a huge maintenance overhead for however long it takes for dep to get fixed. Perhaps you could fork radix for now and do whatever needs doing, until that PR goes through? Or you could help contribute to that PR so it can get done faster. From the looks of it all it needs is tests and docs. |
any updates on this issue ? |
As i mentioned here there's not really anything to be done. Once again, someone could try contributing to dep to get that PR through, that would be the most effective fix. |
You can support both if you make a |
I made an example of what it would look like to support dep and modules at the same time as #128 It's just a reference PR to see what it looks like. Edit: This should also support glide. |
Hi @cep21, thanks so much for bringing this up! I'm going to continue the convo here rather than the PR. I do remember reading that section of the docs a long time ago, I guess it just didn't stick in my brain >_< You brought up the aesthetics of having a top-level
How would that work? If someone is using an older version of go that doesn't support modules, how would that
I would argue that the go community is transitioning from Sorry to be so nitpicky about this, and I do appreciate the effort you put in to put this plan together. |
I don't know any company or major go project that was using
Your master branch is broken for old versions of go get, because old versions of go don't understand modules. This change would increase compatibility with go get, rather than decrease it. Versions of go updated to understand modules will continue to work with a /v3/ directory.
Ideally this change would be part of master, however in the branch situation their Gopkg.toml file would look like [[constraint]]
name = "github.com/mediocregopher/radix"
branch = "working_with_dep" Most other dependency tools would have similar support for a branch statement, the main constraint with most of them is that it has to live at the repository location.
It would not. Just like your current master branch, they would continue to be out of luck.
There are a few of them and I haven't looked at them all, but I would guess that modules are a strong departure from major version management (putting the /v3/ in the import path vs the branch name) and this breaks a bunch of assumptions their code has which would have to be unraveled.
Your master branch currently does not work for versions of Go that do not support modules. If this was merged, your master branch should continue to support versions of Go that do understand modules, as well as versions of Go that do not. I 100% understand not wanting to break people's builds. A path to test this would be to push my PR as git tag |
I've worked for one company which did so. Since most go projects are pretty serious about backwards compatibility and not breaking builds, we never found it super necessary to do otherwise.
radix supports the most recent two go versions. In fact the last 4 will work on the master branch, using the non-v3 import paths. So I don't see how you can say the master branch is broken. My issue is not that I'm trying to support old go version, I'm trying to keep from breaking people's builds. My first question regarding how older versions of go would work with the branch idea was unnecessary, so I apologize for that. So right now the only two options I see are:
I'm not opposed to the second option in theory, but in practice I don't want to spend the time supporting it. If you'd like, you could direct your PR against a branch called It's not a perfect solution, but would that be acceptable? |
Thank you for the clarifications. Why do you believe merging this PR will break people's existing builds? |
If someone was using go with modules turned off, just In the README I explicitly instruct people who are using "legacy GOPATH mode" (aka So that PR would definitely break builds. |
I see. If |
I believe I can make a |
I think I understand now. We should be able to support that use case with go aliases. I've pushed an example https://github.com/mediocregopher/radix/pull/128/files#diff-a944a5a7ca6a5df16d2a22a7117689a7 depending upon how it looks, I could also push aliases for resp/trace/etc directories. |
Now that's an interesting idea, I don't hate it. Is there a tool you used to generate that file? Or was it manual? If it was a tool it'd be nice to add it as a Aliases for |
Or we could do it the other way around, with the aliases living in the EDIT: Or does dep/glide need resp to be in |
The tool is https://go-review.googlesource.com/c/tools/+/137076/9 and I updated the PR to use the tool.
It's possible you want to encourage legacy GOPATH users to eventually switch to If the /v3 code lived in |
I guess for now we can do it this way, if I'm feeling spry I can try and reverse it later on. I'm having trouble getting that tool to work. I made a new repo to play around with: https://github.com/mediocregopher/radixxx And when running it from the root, with the repo in my GOPATH, I get this:
So I'm not totally sure what's going on there. How did you get it to work? |
Hmmm here is what I ran (on my branch checked out to your repo's location locally)
|
It seems that dep has been deprecated, and v4 will be coming out soon (before or just after the new year, hopefully), so I'm going to close this issue. Sorry I could never get goforward working properly. |
@mediocregopher I appreciate that you target to new modules feature in golang, but imports with /v3/ in path broke support for old GOPATH way (try using govendor/dep - it is not working anymore). Please consider some backward compatibility, because some people are not ready for changing dependencies managment system (and don't want to change library, because radix fits perfectly our needs :-) )
The text was updated successfully, but these errors were encountered: