-
Notifications
You must be signed in to change notification settings - Fork 26
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
Bump go.mod version to v4 #966
Conversation
Hello @pbusko 👋 ! Thank you for your contribution :) Can you describe how consuming the versioned node-engine from the node-engine module will benefit the node-engine module? I'm asking for a little bit of context as this change makes sense for consuming external modules e.g. |
Hi @pacostas
it always should, you're right. The proper module versioning is suggested by the official documentation regardless of the usage pattern.
It also makes sense for the installation. At the moment it is impossible to compile the buildpack using the $ go install github.com/paketo-buildpacks/[email protected] 1
go: github.com/paketo-buildpacks/[email protected]: github.com/paketo-buildpacks/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/paketo-buildpacks/node-engine/v4") As you can see, the Some reference to other buildpacks: https://github.com/paketo-buildpacks/image-labels/blob/bcd2c1314122dd71da5f2cc6c59e7f9f78d6cc37/go.mod#L1 |
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.
LGTM
Looking acrosss different buildpacks in paketo-buildpacks we found a few that manage the majors this way, but most don't seem to. We will add it for discussion in the next Paketo WG meeting to try to better understand if this was a choice made at some point and what the concensus is on how the versions should be managed across all of the buildpacks as opposed to switching just for the Node.js related buildpacks. |
But what is the alternative? I think it is clear that this is the way |
76f5355
to
c02df0e
Compare
@mhdawson If there is no veto, I would merge it. Imho, there is no real reason to do it in any other way than the official way. |
Hello @c0d1ngm0nk3y, @pbusko ! After a recent discussion in the paketo working group meeting, about the versioning of the modules, I'm trying to find out if this would mean further maintenance over the paketo buildpacks without any significant benefit. Searching over the paketo buildpacks repositories, the node-engine module is not consumed by any other module, so why do we need to maintain versioning if we are not planning to use it in any of the repositories under the paketo buildpacks? |
I need to clarify the actual benefits of this PR and in case we need to follow a versioning we need to consider strategy for that.
Looking the buildpacks that do have versioning we can see that after that commit there has been no major version release. For example, the image labels repository does not have a major release for over 3 years. Probably due to extra effort in upgrading it is needed, or due to no github actions for doing this version upgrade are available.
Another example that has the versioning is the Similar to the image labels, is the
Practically, we lock the modules on a major version due to lack of maintenance, and as a result we use the latest version of this module. So we have the same behaviour (in terms terms of versioning whether we have versions or not) as we always use the latest and in addition we don't respect the semver convention as seems that there should be a major version in the aforementioned modules over the past 3 years. |
@pacostas I am afraid, I didn't get your point. Let's have a look at When I use a tool like I see the current state as broken and can not see how this pr can have a negative impact. I agree, it would be desired to keep the versioning up-to-date, but even if not, that would still be better than the current state imho. At least it would work until the next major bump. |
@pacostas it is needed not only for consumption of the module as a library, but also for a simple compilation, as shown in #966 (comment). Try running:
Also it breaks tools like dependabot and renovate, as pointed by @c0d1ngm0nk3y |
Yes, it is correct, although seems that the major releases are blocked for the last three years on the procfile, due to the versioning addition, by comparing the fact that before the versioning addition, there was almost 2-3 major releases each year and after the versioning addition there is none for the last three years. I guess this is not on the intentions of this PR, so we need to have proper setup which will enable the bump of major versions on the releases. procfile major releases timeline:
I'm not saying that is right and I agree with you at some level, although I think its better not having versioning, which indicates that there might be changes and you should take that into account when you write your code, rather than having versioning which might be false either from a semantic perspective e.g. |
I think you can use
I don't see breaking the dependabot somewhere, If there is a failure where the dependabot breaks, can you ping me on this thread, or create an issue? |
unfortunately these repositories are not open source
the result will not be the latest version of the $ go install github.com/paketo-buildpacks/node-engine/run@latest
$ strings ~/go/bin/run | grep 'node-engine@'
<HOME>/go/pkg/mod/github.com/paketo-buildpacks/[email protected]/nvmrc_parser.go
<HOME>/go/pkg/mod/github.com/paketo-buildpacks/[email protected]/build.go
<HOME>/go/pkg/mod/github.com/paketo-buildpacks/[email protected]/node_version_parser.go
<HOME>/go/pkg/mod/github.com/paketo-buildpacks/[email protected]/run/main.go
<HOME>/go/pkg/mod/github.com/paketo-buildpacks/[email protected]/detect.go
Here's the list of versions known to both https://pkg.go.dev/github.com/paketo-buildpacks/node-engine?tab=versions
@pacostas What is implied by that specifically? The recommendation behind the go module versioning is as simple as just reflecting the major version in the package name. I don't think that it encourages developers to ignore potential breaking changes and be less careful, since it's a little bit irrelevant to the main topic of this PR and should probably never be the case. |
I see, thank you, I didn't know. So even publishing a release (on github) above 2.0.0 does not mean that go module will follow.
Knowing that the go module will not follow above version 2.0.0, practically it does not indicate something other than this module is the version 1.x.x. It is as misleading as on the |
I've opened an issue, to discuss an implementation we can follow consistently across all buildpacks. paketo-buildpacks/nodejs#913 Feel free to add any context/ideas/suggestions that I might have missed covering. |
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.
LGTM but will need a rebase.
Based on discussion in paketo-buildpacks/nodejs#913 we'll land these add hock for now. @pbusko can you rebase and then I'll land. |
Co-authored-by: Ralf Pannemans <[email protected]>
Thank you @mhdawson, the PR has been rebased |
Summary
To reflect the actual major version and follow the official recommendation regarding
go.mod
versioningUse Cases
https://go.dev/doc/modules/version-numbers
Checklist