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
Improper Module Versioning #3952
Comments
Hmm, what part of the repo are you trying to import? We're not really intending to provide the whole repo as an importable package/module - Concourse is primarily an application, and we just use Go modules for its dependency management. The tags on the repo correspond to product versions, not an API version. I don't really want to wrangle all our import statements every time we ship a major version, since the version doesn't even really indicate any sort of Go interface compatibility. We do however provide a |
That is exactly what we were trying to do. You can, but you can't have a root module AND submodules. You have to either have a single module per repo or each module has to be separated. |
And if you were to break off go-concourse into it's own module or even it's own repo, you will run into the same issue. The release is >v5 but since the module is not properly versioned, it won't pull correctly. |
@vito you can see details about go modules here. The fact that there is a major version tag that is trying to be used here is why go is grabbing the older version. This is due to how golang works with versioning and modules. As of right now the |
Makes sense. I get how the module versioning stuff works, I just don't want to apply it to the entire project because the versions would be dishonest from a semver client standpoint (they're product versions, not client/API versions) and it'd result in a lot of pointless internal code churn every time we do a major version bump. I think we should extract @pivotal-jwinters Does that sound like a good starting point for API versioning? We'd also need to figure out what to do with the bits of |
I'm also willing to cede the point of extracting the repo if it ends up more pragmatic to just do proper module versioning - hoping others on the team have opinions here. Maybe the noise isn't too bad if our major bumps are infrequent enough. API versioning could end up being unnecessary and/or overkill depending on how people will be using it. edit: are there any other examples of large Go project which are primarily applications that have run into this? |
Beep boop! This issue has been idle for long enough that it's time to check in and see if it's still important. If it is, what is blocking it? Would anyone be interested in submitting a PR or continuing the discussion to help move things forward? If no activity is observed within the next week, this issue will be |
What's the current state of this? I'm developing an application that allows me to control Concourse programatically, however, I'd like to avoid having to basically duplicate the whole API on my project and simply use go-concourse. |
@TiagoJMartins We would have to extract I'll re-open to keep tabs on this (and just let the stale bot keep doing its thing). In the meantime you could try doing |
@vito That's enough for my use case for now as I don't really mind if you guys break things down the line. This being the case I agree there's no need to extract it and version it as 0.0.1 just for the sake of it being versioned and would argue that's a job better done when the project actually requires it. Thanks a lot for your help! Happy holidays! |
There's an interesting question in here about whether the Go source itself should be a separate version than whatever the current semantic version that Concourse has more broadly. I think the two are arguably the same. If I wanted to use the If the intention was to keep the project private, those modules should all move under an |
Bug Report
Importing concourse packages into code is especially painful due to improper module versioning.
Steps to Reproduce
go get github.com/concourse/concourse
in an existing project using go modulesExpected Results
Latest version of concourse is pulled.
Actual Results
Old version (4.2?) is pulled.
Additional Context
The go documentation states:
The text was updated successfully, but these errors were encountered: