late-keyboard-89314
11/21/2023, 2:54 AM▶ go version
go version go1.21.3 darwin/arm64
Then, running pants package on a binary for the first time, I get:
invalid literal for int() with base 10: ‘21.3’I’ve put a stack trace in 🧵 but this seems to be the culprit code: https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/go/util_rules/go_bootstrap.py#L76-L91 Not sure if it should be handled in that function or if the caller is expected to strip off the minor version before calling, but happy to make a PR if this is indeed a bug.
late-keyboard-89314
11/21/2023, 2:54 AM▶ pants -ldebug --print-stacktrace package :bin
19:46:22.60 [INFO] Initialization options changed: reinitializing scheduler...
19:46:26.85 [INFO] Scheduler initialized.
19:46:29.70 [ERROR] 1 Exception encountered:
Engine traceback:
in select
..
in pants.core.goals.package.package_asset
`package` goal
Traceback (most recent call last):
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/core/goals/package.py", line 165, in package_asset
packages = await MultiGet(
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 361, in MultiGet
return await _MultiGet(tuple(__arg0))
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 168, in __await__
result = yield self.gets
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/core/goals/package.py", line 116, in environment_aware_package
package = await Get(
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 118, in __await__
result = yield self
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/backend/go/goals/package_binary.py", line 100, in package_go_binary
built_package = await Get(
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 118, in __await__
result = yield self
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/backend/go/util_rules/build_pkg.py", line 716, in build_go_package
if go_root.is_compatible_version(go_version):
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/backend/go/util_rules/goroot.py", line 40, in is_compatible_version
return compatible_go_version(compiler_version=self.version, target_version=version)
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/backend/go/util_rules/go_bootstrap.py", line 91, in compatible_go_version
return parse(target_version) <= parse(compiler_version)
File "/Users/jay/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/backend/go/util_rules/go_bootstrap.py", line 89, in parse
return int(major), int(minor)
ValueError: invalid literal for int() with base 10: '21.3'