Comments (7)
Isn't this correct behavior? ^1.13.1
means or newer minor or patch version.
from setup-go.
That should be documented if that is the expected behavior. It's really unfortunate that ^
was chosen then.
With the README referring to it being a "match", and ^
being a regex match for the start of a line, the expectation was that it would only match exactly a value of 1.13.1
with nothing somehow prepended to it.
If that is not treated as a regex, and it is a symbol used to mean "or greater", then I would expect something like +
appended to the end or something that doesn't look like a regex matching string.
Since this has been in place for some time now and there may be folks that expect that behavior, maybe the best way to resolve this at this point is to explicitly call out in the README what it means.
from setup-go.
^
symbol is coming form the Node.js's dependency management world. I would say authors took it as a universally known syntax, but since it is not standard in Go I agree it should be documented.
Here is the library implementing this version specification syntax that is used by setup-go:
https://www.npmjs.com/package/semver
Its documentation goes into details of ^
.
Go's versioning does not work the same Node.js does so there is some mapping between the two done by setup-to which is also not documented, but can found in the code and code comments:
Line 183 in 3b4dc6c
from setup-go.
Hi @stmcginnis ! Sorry for the late response!
Could you please clarify if the issue is still actual for you?
Thanks!
from setup-go.
Thanks for checking @Sergey-Murtazin! I do think this is still confusing, though I understand now that it is an NPM thing. I still think it is really too bad they chose to use something that looks like a regex pattern for a value that performs a match, but it would probably be too disruptive to change at this point.
I read through the README again, and I don't see anything that mentions how this version match is supposed to work. Feel free to close this issue if others don't agree, but I think it would be very useful to update this repo's README to mention how this matching works and link to the explanation that Bojan pointed out.
Allows changes that do not modify the left-most non-zero element in the [major, minor, patch] tuple.
from setup-go.
Hi, @stmcginnis !
We've updated the documentation.
And as currently written in readme, we are using semver notation.
You can see how to use it here
The ^
sign means that the maximum minor version will be used.
It means that the action works correctly.
If you want to use the maximum 1.13
version, use 1.13.x
or 1.13.*
Feel free to contact us if you have any questions.
from setup-go.
I close this issue because it is resolved
from setup-go.
Related Issues (20)
- Error with no go.sum file HOT 6
- Feature - enhance action to support configuration of private package authentication HOT 3
- Long post job cleanup HOT 8
- v4 cache attempt to write to non existent drive on windows HOT 13
- setup-go does not pick up recent Go version leading to create vulnerable builds HOT 6
- support: gotip HOT 6
- https://salla.sa/bero2030.com HOT 1
- Berroe8 HOT 1
- caches grow unbounded HOT 6
- ENOENT: no such file or directory, mkdir '/home/runner' in macos-latest HOT 3
- Use version from module and another version in matrix testing HOT 2
- Allow for collapsing log output HOT 2
- go 1.22.0-rc.1 is not found HOT 2
- setup-go does not work on macos-14 (M1) HOT 6
- How to run tests with latest golang version HOT 9
- More specific handling/detection of Go toolchain versions HOT 3
- Inaccurate description of version in go.mod HOT 2
- Please upgrade `go-actions` to 1.21.8 / 1.22.1 HOT 3
- Signing key has expired HOT 2
- Node16 deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-go.