fix: Resolve version before checking arch#24
Conversation
Fixes a bug where `gimme module` reports the following error
on macOS with ARM64.
error: arm64 is not supported by this go version
try go1.5 or newer
This occurs because the check for architecture
is performed before the `module` version
turns into a real version number with `_resolve_version`.
Fix by resolving version number before checking the architecture.
3bf8c61 to
10f140b
Compare
brackendawson
left a comment
There was a problem hiding this comment.
This fix works for me from 1.16 (when darwin/arm64 support was added). But the behaviour if the go directive specifies <1.16 changes from a partially incorrect error message (should say 1.16 on darwin):
% gimme module
error: arm64 is not supported by this go version
try go1.5 or newer
to an unhelpful error message:
% gimme module
I don't have any idea what to do with '1.13.15'.
(using download type 'auto')
Can we restore the original error message but correct the version number for darwin? 1.5 was when linux/arm64 support was added.
|
Also this needs to change, perhaps:
|
Fixes the error message that is printed if you request Go < 1.16 on darwin/arm64.
|
Sounds good! Agreed about the README change too. |
5125ef0 to
63f0743
Compare
63f0743 to
94d20cb
Compare
|
New error message looks good but it still doesn't actually show up: |
|
That's weird. |
brackendawson
left a comment
There was a problem hiding this comment.
My bad, it works better when you pull all the changes in the branch. Thank you.
Fixes a bug where
gimme modulereports the following erroron macOS with ARM64.
This occurs because the check for architecture
is performed before the
moduleversionturns into a real version number with
_resolve_version.Fix by resolving version number before checking the architecture.