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)
- Node16 deprecated HOT 1
- Support custom distribution location override HOT 1
- Can't cache dependencies from a composite action HOT 9
- Intermittent failures downloading go HOT 4
- I HOT 3
- I HOT 1
- Failure of "Validate 'setup-go'" on macos-latest HOT 3
- Annotation matcher can not match column ranges HOT 4
- Dependencies file is not found. Supported file pattern: go.sum HOT 9
- [Bug] CGO_ENABLED on macos amd64 is not correct HOT 8
- Caching should use go.mod, not go.sum HOT 3
- Why can't I re-use cache created by actions/setup-go for actions/cache? HOT 3
- Support using a later patch release than what's in go.mod HOT 1
- Ever time I try to set it up it cancels work flow HOT 3
- Cache `go install`-ed binaries HOT 18
- Help HOT 1
- Type in your language with Gboard HOT 1
- PATH setting doesn't seem to be working anymore. HOT 1
- Set `GOTOOLCHAIN=local` if `go-version[-file]` is set and `GOTOOLCHAIN` is not already present HOT 2
- Green wallet HOT 2
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.