Tagging suggestions
It’s common practice to prefix your version names with the letter
v
. Some good tag names might bev1.0
orv2.3.4
.If the tag isn’t meant for production use, add a pre-release version after the version name. Some good pre-release versions might be
v0.2-alpha
orv5.9-beta.3
.Semantic versioning
If you’re new to releasing software, we highly recommend reading about semantic versioning.
--
You received this message because you are subscribed to the Google Groups "Go Package Management" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-manag...@googlegroups.com.
To post to this group, send email to go-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
...my objection is that this proposal does not propose any actual changes to any part of Go. It is not actionable in its current form. I'm still not even sure it's a good idea, in large part because one way I evaluate whether something is a good idea is to understand its effects, and this proposal has no direct effects.
Build a system that uses semantic versions effectively. Demonstrate what great tools can be built. Give people incentives, and they will tag their releases no matter what the Go team says. Certainly the Go team saying "you should do it this way" has not in the past been successful without these things (think not-vendoring).
I would like to see a recommendation on tagging remain separate to a discussion on the vendor spec.
They are related, but conflating two contentious things doesn't make them less contentious.
I would not like to see a decision on recommending a tagging format delayed by extended debate on the vendor spec any more than the vendor spec proponents would like to see their proposal delayed by an extended debate on semver.
...my objection is that this proposal does not propose any actual changes to any part of Go. It is not actionable in its current form.
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-management+unsub...@googlegroups.com.
Dave proposed this: https://github.com/golang/go/issues/12302Russ objected, saying:...my objection is that this proposal does not propose any actual changes to any part of Go. It is not actionable in its current form. I'm still not even sure it's a good idea, in large part because one way I evaluate whether something is a good idea is to understand its effects, and this proposal has no direct effects.Build a system that uses semantic versions effectively. Demonstrate what great tools can be built. Give people incentives, and they will tag their releases no matter what the Go team says. Certainly the Go team saying "you should do it this way" has not in the past been successful without these things (think not-vendoring).Which, I think, is a reasonable stance to take. But now we do have package managers that support semver (such as glide), so maybe the objection is not so relevant.
I think we can enshrine this convention when we standardize a vendor spec (or manifest/lock files). Is there a compelling reason to get this done ahead of that? AFAICT everyone involved seems to agree that semver is the right choice for expressing package versions.
Andrew
--
You received this message because you are subscribed to the Google Groups "Go Package Management" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-manag...@googlegroups.com.
Given this I have a couple ideas that may be able to fulfill the actionable element in a way we can all mostly agree on. If we have something there sooner rather than later would any blockers be removed?
These changes would:
Then, if semver were violated by the version number, a warning would be printed, asking e.g. the package maintainer to "please" change the version number to be compliant or that a non-compliant number is "not recommended", etc. Then builds wouldn't break, but it would become apparent that semver is the way people should use the tool.
Correction, it should go to: ==> "go-v1.7.0-rc.3+src.tar.gz"
"go1.7rc3.src.tar.gz" ==> "go-v1.7.0-rc3+src.tar.gz"
I'm curious what it would take to get a SemVer recommendation to the Go community in mass.
SemVer’s spec includes a good algorithm, but it can only be used if it is comparing two compliant versions. To be clear, I am suggesting we use a versioning algorithm which supports semver, but doesn’t require it. Then, the tool which uses this algo can still detect non-semver compliant versions and print a warning or suggestion, while still maintaining the ability to do its job regardless of the messiness of life and the quirks of non-compliant packages. I cited RPM’s version algo as an example of a version sorting algorithm that works well, but supports many different versioning schemes, provided the use of any given scheme is consistent.
Not completely. In the debian version algo, everything after the '~' is
ignored, but as a suffix instead of a prefix.
SemVer’s spec includes a good algorithm, but it can only be used if it is comparing two compliant versions. To be clear, I am suggesting we use a versioning algorithm which supports semver, but doesn’t require it. Then, the tool which uses this algo can still detect non-semver compliant versions and print a warning or suggestion, while still maintaining the ability to do its job regardless of the messiness of life and the quirks of non-compliant packages.
> 1. "Declaring at the file level introduces the possibility of disagreement on constraints ...
I have a different perspective. I believe that the possibility is there - always. It's just a matter of who detects it and handles it. I'm for automating it as much as possible. Depending on the user to do it means that it probably won't get done well or done correctly. Certainly the PM (package manager) can't be expected to resolve all such issues. The most important task is to assemble an accurate list (best done by the PM), then attempt to resolve them (leaving unresolvable ones up to the user). This also reduces the technical debt in the form of needless constraints.
> 2. Extending the last, what about different packages within your project ...
I appreciate that there are all kinds of nasty possibilities. But these exist regardless. Indeed, the more fine-grained (file level) the version info is the more nasty cases will surface. This is good. It is better to identify as many of the problems as possible! :)
> 3. Whatever the answers are to the last two, how do you make the rule clear enough ...
It's the same "rule" as a user would place in the PM's config file, just in his code's file instead.
> What about the maintenance burden of keeping all those declarations in sync, ...
Sync? You place the dependency version limitation where it is needed. Perhaps I'm not understanding, but I don't see where there is any synchronization involved.
> What do you do with imported dependencies that have some inconsistencies, at least at some versions - do you throw them out?
If the dependencies are incorrect, then they need to be fixed. If not, then the user has to work to resolve them somehow. Again, this is true regardless of how the dependency version limitations make it to the PM's config file. An advantage of the fine-grained (per code file) method I'm proposing is that there will be fewer mistakes (overlook and/or bogus limitations).
> 4. Even if constraints are recorded directly in import statements, it doesn't help at all with reproducible builds. So you still need a separate, lock-type file.
Correct. My idea is just to automate gathering the version info to put in the PM's config file. Past that the PM would operate as normal.
> 5. There's no space left for expressing things like overrides, ...
You could allow for manual overrides in the PM's config file. They would just have to be marked as such - which is a good thing for readability later.
> 6. There's also no capacity for projects to declare constraints on their transitive dependencies.
The PM would continue to have the same features as before.
> But the combinatorial explosion of constraints here concerns me that it would not scale well into complexity.
The PM is already reading all the files to get the imports. This is just some additional data on that same line. So it wouldn't increase file i/o. It would add some computation, yes, but my thought is that it is much more accurate and efficient for a computer to this than the user.
Also, let's remember that individual imports in a package are not normally going to have version dependencies. So we are talking about somewhat rare occurrences - hence not much extra computer time.
> I don't think it's worth eating this fractal for a convenience that could be mostly, if not entirely, offset by tooling.
I get the feeling that you aren't quite grokking my proposal. I think that it's much more than just a convenience. Hopefully the above answers will help to better explain my thinking.
.
P.S.
To underscore a point I made above: This could be implemented by a totally stand-alone program. All it would do is to scan the file to build the version info to put in the PM’s config file.
With one exception: The PM’s config file would need some mark to show a manually entered override.
P.P.S.
One other thing just occurred to me. Consider it from the view of a programmer about to release a package for general use. But there needs to be a version limitation on one of the imports. How does he currently convey this information to all of the users of his package? He could put it in the documentation. Good, but many will miss it. Those who don’t will have to manually add it to their PM’s config.
Or, he could set up a PM just for this one package and include its config file. This takes him some time, but it automates it for the users, assuming that their PMs can read his PM’s config.
Or, following my idea, he adds the version info to the import line where it is needed (and document it for those not using PMs).
Which do you think he prefers? Given equal results, the easiest path is the one he will prefer. J
John
John Souvestre - New Orleans LA
Hi Sam.
> Hm, yes, I do think I missed part of your proposal - I didn't realize
> you were suggesting that these file-level constraints be declared in
> addition to a manifest file.
Right! I'm saying that they would be used to populate the PM's config file, rather than a user doing it manually.
> Now, if you were suggesting they were *only* guides to be used by such
> a stand-alone program for the purposes of building a manifest file, but
> ignored when the solver works through, then...well, maybe I could be
> convinced?
Pretty much, yes. I would allow for manual overrides which might be necessary to resolve conflicts. To be clear, I'm thinking that as each package is checked that the resolution algorithm is run on it. Then later, when all packages have been processed, the project resolution would take place.
This allows any conflicts within a package to be identified and solved first. Solving "localized" problems first seems logical. Normally any such conflicts would show up only in your code and not in 3rd party imports. Doing the individual package resolutions first, then the project resolution (as it is done currently) means that scaling is good.
> First, let's be clear: a file-level import restriction makes no sense in
> Go. Files are not the level at which the compiler operates; packages are
> the unit of compilation, and thus for compatibility checking.
I feel the opposite. The import statements are distributed across the files which make up a package. Then are not coalesced into a "package header" or some other common file. The compiler coalesces them and then deals with them. I'm not suggesting that this change. I'm suggesting that the PM (packet manager) emulate the compiler by gathering its import info from the files rather than forcing a user to do it manually.
> As far as I can think, the benefits you're saying would arise from this
> would be even greater if, say, we created a syntax that let you annotate
> individual lines containing references to other packages with a constraint.
That is exactly what I am proposing. The example (with 2 comments added) I gave was:
import (
widget v1.2.3 - v1.2.* <== Would require a change to Go
[OR]
widget // +v1.2.3 - 1.2.* <== Would not require a change to Go
)
Note: I'm not suggesting change Go at this point. I think that starting with the "add version info as a comment" form would be the way to start. If it works out well, then perhaps.
> It tells us exactly where the need for the constraint arises from, and
> tools could be taught to read it in all the same ways. Yes, it's more CPU
> and a tad more I/O to do the additional parsing, but in a good design,
> that's cacheable for deps, so that alone isn't enough of a reason not to
> do it.
Yes! But I don't see the need to cache. As you analyze each set of files for a package, then resolve the package, you need only write the result to the PM's config (manifest) file. You would want that stored just like it is now (resulting from user’s manual entry). I guess you could also store a current timestamp so that you could reprocess only those which changed when running again later.
> But declaring constraints at the level of individual expressions, or ...
Not my proposal. I'm only suggesting adding the version info to the individual imports, as per the example above. The idea is to state the need for the import (as currently done) and any version limitations on it at the same time, in the same place.
> As for the proposed benefits...well, of all the things I've heard people
> say about package management over the years, this is the first time I've
> heard "I want to express version constraints in more, different places."
What I'm proposing is: I want to express (type in manually) a version constraint in only one place, the place that the constrained import appears. And I don't want to have to manually examine every file in my project when setting up a PM's config file. I expect that the PM will harvest my constraints, coalesce them per package, and place them into its config file for its use.
> Nor do I expect tool use to be the minority case, or constraint
> expression to be a rare thing.
Then all the more reason to make it as simple (for the user), efficient (for the user), and accurate (reduce user oversights) as possible. :)
--
You received this message because you are subscribed to the Google Groups "Go Package Management" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-manag...@googlegroups.com.
To post to this group, send email to go-package...@googlegroups.com.
What is even being discussed here? Changing the Go team release process to use SemVer?
My suggestion is that we just try to copy Cargo form the Rust community.They have spent a lot of time to work out much of the kinks regarding this.
Perhaps the Gb, Glide etc teams can work out the details or even settle on one of their respective tools to be that copy?
I'm sure the internal Google teams can handle anything that comes out of this should this become the defacto community way of releasing packages.They have managed this for many years in the Java land with most if not all projects being Maven based or compatible.
2¢
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-management+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-manag...@googlegroups.com.
To post to this group, send email to go-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Go Package Management" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-package-manag...@googlegroups.com.
Hi Sam.
Thank you for the time you spent looking at my idea.
I'm sorry that I was not able to express it more clearly for you.
Hi Eric.
> Libraries should have a metadata file indicating dependencies just like
> main programs, shouldn't they?
If they need one, fine. But if an import line with a version tag will suffice, then why go to the extra trouble?
> This seems like an argument for standardizing the package manager config file....
I'm all for this, regardless. It's a more involved effort, so will probably take longer.
> Most libraries will have multiple files, and they will want to centralize
> their dependency constraints in one place.
I think the opposite. Putting the dependency in the file which requires it seems more natural to me.
> > Given equal results, the easiest path is the one he will prefer. :)
> This strikes me as an argument about simple vs. easy:
No, I view it as both simpler and easier. From the programmer's point of view, keeping related items (code requiring version dependency and version dependency statement limiting an import) in the same file is simpler and easier.
Put another way: An import version dependency is file-level in scope. Thus it should be stated in the file.
> It may be easy to put version constraints on imports, but it feels to me
> like it runs contrary to Go's aim to simplify.
Are you are against having version constraints on imports in general? My idea was just to extend the current PM implementations a bit to make it easier, simpler, and more accurate.
Do we need version constraints on imports? Not often, but yes, and more so as time passes (and more revised packages are authored).
Put another way: An import version dependency is file-level in scope. Thus it should be stated in the file.
Hi Ian.
Ø If my application imports a dependency from 40 different source files do I have to have the same version comment on every import statement? Do I need to edit them all when one file requires a slightly newer version?
No. I am proposing that you would include the version constraint as needed, per import. This might vary depending on which package/file the import shows up in. Most of the time you probably don’t care, so you would use the current release with a range allowing for patches (1.2.3 – 1.2.*) or allowing for additional features and patches (1.2.3 - 1.*).
Or, if it was a very, very often used import and you didn’t want to be bothered with the extra typing per import, you could always fall back to using the current method (hard-code it once in the PM’s manifest file).
I think that the individual constraints are safer, however. Consider what happens if at some time in the future you decide to switch to 2.x.x of the import because you need a new feature or fix it offers. As you fix the individual packages/files in your project to use the new API you would also update the version constraint in the file. This way, if you overlook one, it will get caught automatically.
P.S.
It also occurs to me that perhaps a PM could also offer an “init” or “update” versions command which would automatically enter the version constraints for you on the assumption that you want to use the set you are running with now.
On Thursday, July 21, 2016 at 8:47:23 AM UTC-5, Andrew Gerrand wrote:
> John, can you elaborate on what you mean by points 1, 2, and 3?
I believe that the strings don't exactly meet the SemVer 2 standard, and would need to be changed a bit.
Note: I don't believe that SemVer allows for a "prefix" field. It probably should, and I've seen others use "-" to delimit it. So that is what I'm showing below.
1) runtime.Version
"go1.6.3" ==> "go-v1.6.3".
The current function can alternately return a commit hash and build data.
Given this, and possible problems with backward compatibility, I'm thinking that the best solution might be to add a separate function: runtime.SemVer()
2) Go's filenames for releases.
"go1.6.src.tar.gz" ==> "go-v1.6.0+src.tar.gz"
"go1.7rc3.src.tar.gz" ==> "go-v1.7.0-rc3+src.tar.gz"
3) Build tags.
For a specific version: (not supported now) ==> "// +build go-v1.6.0"
For a range of versions: "// +build go1.6" ==> "// +build go-v1.6.0 - go-v1.7.0" (open, close)
Wildcards and other shortcuts: Not in the SemVer standard, but there are some in common usage, for example: "// +build go-v1.6.*"
Seconded. For consistency it would be nice to harmonise build tags and the go release number with the recommended tagging scheme, but that would require boiling several independent oceans before we could achieve the core goal, which is dependency management for go code that exists outside the std lib. I think it's a reasonable compromise to consider the go distribution itself out of scope.
Dave
--
Ø In summary, I argue that the Go distribution itself is a corner case and
Ø we shouldn't regard it as part of the general Go package versioning issue.
I accept this. My original thought was that these changes would just have been a way for the Go Team to show support for the package versioning effort. The consistency would have been nice, too, of course. Perhaps later. J
John
John Souvestre - New Orleans LA
From: Andrew Gerrand [mailto:a...@google.com]
Sent: 2016 July 28, Thu 16:15
To: John Souvestre
Cc: Go Package Management
Subject: Re: [go-pm] Re: SemVer
On 22 July 2016 at 02:44, <jo...@souvestre.com> wrote: