powerful-eye-58407
05/30/2023, 8:00 AMpants --version
after fresh installation on MacOS (Ventura 13.2.1, in that case):
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "\xF2\u{e}\xB3\xA3\x90\x9B\u{16}\xD0\u{1b}\xE2/&\u{6e0}\xA2\xE3a)\xA1\x86ǝ\u{80}\xD0j\x85\\\x9A"', library/std/src/env.rs:171:83
Output of the `get-pants.sh`:
Downloading and installing the pants launcher ...
Installed the pants launcher from <https://github.com/pantsbuild/scie-pants/releases/latest/download/scie-pants-macos-x86_64> to /Users/developer/bin/pants
Running `pants` in a Pants-enabled repo will use the version of Pants configured for that repo.
In a repo not yet Pants-enabled, it will prompt you to set up Pants for that repo.
And the same error happens when using pants installed using homebrew, output of the installer also looks ok:
Downloading <https://github.com/pantsbuild/scie-pants/releases/download/v0.8.1/scie-pants-macos-x86_64>
==> Downloading from <https://objects.githubusercontent.com/github-production-release-asset-2e65be/572180558/4a91212e-1f66-4b1d-8926-e54572ba86c7?X-Amz-Algorithm=AWS4-HMAC-S>
##################################################################################################################################################################### 100.0%
==> Installing Cask pants
==> Linking Binary 'scie-pants-macos-x86_64' to '/usr/local/bin/pants'
🍺 pants was successfully installed!
Any ideas how to debug this?powerful-eye-58407
05/30/2023, 8:06 AMpowerful-eye-58407
05/30/2023, 8:15 AMrefined-addition-53644
05/30/2023, 8:24 AMpowerful-eye-58407
05/30/2023, 9:18 AMpowerful-eye-58407
05/30/2023, 9:20 AMbroad-processor-92400
05/30/2023, 10:52 AMRUST_BACKTRACE=1 pants version
From the rather opaque message, I might be looking for non-UTF8 environment variables, but that’s somewhat jumping to conclusionspowerful-eye-58407
05/30/2023, 10:53 AMRUST_BACKTRACE=full pants --version
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "\xED\xEE%\u{348}\u{17}.\xAF{\xE9<\xFF]\u{f}\x8E\u{ed24}r\xB1\u{14}L"', library/std/src/env.rs:171:83
stack backtrace:
0: 0x10e36df4a - __mh_execute_header
1: 0x10e2adf3a - __mh_execute_header
2: 0x10e34586c - __mh_execute_header
3: 0x10e3746e3 - __mh_execute_header
4: 0x10e37449a - __mh_execute_header
5: 0x10e374bab - __mh_execute_header
6: 0x10e374895 - __mh_execute_header
7: 0x10e3747f8 - __mh_execute_header
8: 0x10e3747c2 - __mh_execute_header
9: 0x10e3bfcc3 - __mh_execute_header
10: 0x10e3c00f5 - __mh_execute_header
11: 0x10e2eb05c - __mh_execute_header
12: 0x10e307b0c - __mh_execute_header
13: 0x10e30583c - __mh_execute_header
14: 0x10e305510 - __mh_execute_header
15: 0x10e303821 - __mh_execute_header
16: 0x10e3020c7 - __mh_execute_header
17: 0x10e307538 - __mh_execute_header
18: 0x10e30583c - __mh_execute_header
19: 0x10e303821 - __mh_execute_header
20: 0x10e3020c7 - __mh_execute_header
21: 0x10e301ed3 - __mh_execute_header
22: 0x10e2f41bb - __mh_execute_header
23: 0x10e2a7b45 - __mh_execute_header
24: 0x10e29c5a5 - __mh_execute_header
25: 0x10e2aa7f0 - __mh_execute_header
broad-processor-92400
05/30/2023, 10:56 AMpowerful-eye-58407
05/30/2023, 10:59 AMpowerful-eye-58407
05/30/2023, 10:59 AMbroad-processor-92400
05/30/2023, 11:02 AMenv
for binary/non-Unicode data might be goodbroad-processor-92400
05/30/2023, 11:06 AMpowerful-eye-58407
05/30/2023, 11:07 AMpowerful-eye-58407
05/30/2023, 11:07 AMbroad-processor-92400
05/30/2023, 11:10 AMpowerful-eye-58407
05/30/2023, 11:11 AMpowerful-eye-58407
05/30/2023, 11:13 AMpowerful-eye-58407
05/30/2023, 11:14 AMpowerful-eye-58407
05/30/2023, 11:15 AMbroad-processor-92400
05/30/2023, 11:17 AMpowerful-eye-58407
05/30/2023, 1:14 PM$ env $'FOO=B\xa5R' pants --version
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "B\xA5R"', library/std/src/env.rs:171:83
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
powerful-eye-58407
05/30/2023, 1:18 PMenough-analyst-54434
05/30/2023, 4:26 PMFile "/home/jsirois/.cache/nce/8afd13c428e19f0d41030597d3ac01dab0a107a3cbc3b2db75bc719960aa0f4f/bindings/venv-3.9/lib/python3.9/site-packages/pants/bin/remote_pants_runner.py", line 151, in _connect_and_execute
return PyNailgunClient(port, executor).execute(command, args, modified_env)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf0' in position 10: surrogates not allowed
That's here: https://github.com/pantsbuild/pants/blob/main/src/rust/engine/src/externs/nailgun.rs#L50
I'll get this fixed up in the scie-pants stack and then I'll file an issue against Pants.enough-analyst-54434
05/31/2023, 1:44 AM