pantsbuild / scie-pants

Protects your Pants from the elements.
https://www.pantsbuild.org/docs/installation
Apache License 2.0
18 stars 17 forks source link

scie-pants: location env variable not found #392

Open adminy opened 1 month ago

adminy commented 1 month ago

Running: RUST_LOG=debug scie-pants Gives:

[DEBUG TimerFinished] BuildRoot::find(), Elapsed=9.182µs
[DEBUG TimerFinished] PantsConfig::parse(), Elapsed=2.161389ms
[INFO  scie_pants] Found Pants build root at Some("/root/repos/proj")
[INFO  scie_pants] The required Pants version is Some("1.30.0")
[DEBUG TimerFinished] scie-pants::get_pants_process(), Elapsed=2.255882ms
[DEBUG TimerFinished] MAIN, Elapsed=2.259232ms
Error: Failed to retrieve SCIE location from the environment.

Caused by:
    environment variable not found

Running: RUST_LOG=debug SCIE=inspect scie-pants Gives:

[DEBUG TimerFinished] BuildRoot::find(), Elapsed=744.538µs
[INFO  scie_pants] Found Pants build root at None
[INFO  scie_pants] The required Pants version is None
[DEBUG TimerFinished] scie-pants::get_pants_process(), Elapsed=1.04068ms
[DEBUG TimerFinished] MAIN, Elapsed=1.105761ms
Error: Failed to exec process.

Caused by:
    ENOENT: No such file or directory

Then when setting export PANTS_SOURCE=/root/repos/pants and running: RUST_LOG=debug scie-pants Gives:

[DEBUG TimerFinished] BuildRoot::find(), Elapsed=8.898µs
/root/repos/pants/pants:source:24: no such file or directory: /root/repos/proj/build-support/common.sh`

and running: RUST_LOG=debug SCIE=inspect scie-pants Gives:

[DEBUG TimerFinished] BuildRoot::find(), Elapsed=11.592µs`

only if run from pants dir, otherwise same error as previous command run saying: no such file or directory: /root/repos/proj/build-support/common.sh

Version

PANTS_BOOTSTRAP_VERSION=report scie-pants
0.11.0
kaos commented 1 month ago

I'm stumped that SCIE=inspect fails where as PANTS_BOOTSTRAP_VERSION=reports doesn't?

You could try running with RUST_LOG=debug might give some additional clues.

adminy commented 1 month ago

Updated the original to include Debug logs.

kaos commented 1 month ago

Could be that the later versions of scie-pants are unable to run pants 1.x. scie-pants are not tested against pants 1.x, and could be broken in that regard.

If you are using pants 1.30.0, then the best bet could be to keep using the older pants bootstrap script instead, until you're able to upgrade to a 2.x version of pants.