https://pantsbuild.org/ logo
#general
Title
# general
h

hundreds-carpet-28072

05/03/2023, 9:47 AM
I’m experimenting with
scie-pants
but would like a better way to pin the version of the launcher. Are there plans to accommodate this in
pants.toml
and via the
get-pants
script? (https://github.com/pantsbuild/setup/blob/gh-pages/get-pants.sh)
r

refined-addition-53644

05/03/2023, 11:15 AM
You can pass version using
-V
when installing using
get-pants
. There are more options available, just download the script and pass
-h
Copy code
./get-pants.sh -h
Usage: ./get-pants.sh

Installs the pants launcher binary.

You only need to run this once on a machine when you do not have "pants"
available to run yet.

The pants binary takes care of managing and running the underlying
Pants version configured in "pants.toml" in the surrounding Pants-using
project.

Once installed, if you want to update your "pants" launcher binary, use
"SCIE_BOOT=update pants" to get the latest release or
"SCIE_BOOT=update pants --help" to learn more options.

-h | --help: Print this help message.

-d | --bin-dir:
  The directory to install the scie-pants binary in, "~/bin" by default.

-b | --base-name:
  The name to use for the scie-pants binary, "pants" by default.

-V | --version:
  The version of the scie-pants binary to install, the latest version by default.
  The available versions can be seen at:
    <https://github.com/pantsbuild/scie-pants/releases>
h

hundreds-carpet-28072

05/03/2023, 11:16 AM
Yep that’s currently what i’m doing - passing
-V
via a middleman script. I thought that it would be good to have this stored in
pants.toml
alongside
pants_version
?
r

refined-addition-53644

05/03/2023, 11:18 AM
How would it work though?
pants.toml
only comes into action when you have already installed
scie-pants
itself.
h

hundreds-carpet-28072

05/03/2023, 3:08 PM
Maybe not through
pants.toml
but for reproducibility it would be nice to be able to pin the launcher version somewhere
w

witty-crayon-22786

05/03/2023, 4:08 PM
is this for a CI usecase, or local use?
h

hundreds-carpet-28072

05/03/2023, 4:11 PM
In future most likely both For the original
./pants
script, we would include the commit hash that that specific script was from. It would be nice to pin the launcher version in so as to keep complete reproducibility
w

witty-crayon-22786

05/03/2023, 4:13 PM
if you’re using github actions, you can use the
init-pants
action for CI: https://github.com/pantsbuild/example-python/blob/main/.github/workflows/pants.yaml#L30
h

hundreds-carpet-28072

05/03/2023, 4:16 PM
I had seen this but we’re not currently using GH actions - maybe in future For now, I’m happy to track this in a separate config
2 Views