You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release] src/util.ts: attempt to fix version parsing again
https://go-review.googlesource.com/c/vscode-go/+/245397 attempted
to correct the use of regex matching result. But didn't notice that
the regexp for released version does not capture the patch version
part. Use of semver.coerce on the full go version output previously
worked by accident because coercing recognized the version string
and built the SemVer out of it.
Adjust the regexp so that it captures the whole version string part
including the patch and the prerelease tags.
semver.coerce drops the prerelease tags from Go's version string
(e.g. go1.15rc1, etc), and modifies incomplete semver string to
`major.minor.patch` format (e.g. go1.14 -> go1.14.0).
In certain cases, we want the exact version string as `go version`
outputs. So, store the original version string and if
`includePrerelease` is set, `GoVersion.format` returns the original
version string instead of the result of `semver.format`.
This CL adds tests for Go version parsing and formatting.
Change-Id: I8986d4d5b03d1735d707c4c3b2b38895314dd497
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245438
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
(cherry picked from commit dc9de1c)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245600
0 commit comments