While trying to run the latest version of `./pants...
# general
j
While trying to run the latest version of
./pants
(as downloaded from https://pantsbuild.github.io/setup/pants) with a
pants.ini
with version 1.18.0 I got an error that took a while to fix. The error message is
Exception message: Unrecognized command line flags on global scope: --pants-bin-name.
I resolved it by using the
./v1
pattern instead. It should be possible to give a hint that someone is using an older engine instead of giving a cryptic error message. Would it be helpful for me to make in issue/feature request around this?
h
Ah, tricky. That option
--pants-bin-name
must have not existed in 1.18.0 yet, so the
./pants
script is erroring when trying to set it. You’ll want to use an older version of the
./pants
script for now. https://github.com/pantsbuild/setup/blob/d1da382f6de0420940ec6007a39cba87c21075c6/pants should work
j
Yup. I just tested from 1.18.0 to 1.29.0. It doesn't work before v1.23.0. In v1.22.0 and older it fails.
👍 1
h
Got it. That sounds right. It’s a tricky script to handle version control for because it’s up to each codebase admin to redownload the script whenever we make edits, and as you see, it depends on which
pants_version
they’re on
Btw, anything blocking your upgrade from 1.18.0 to something more recent?
j
I was just doing the step upgrade to see the depreciation messages
❤️ 1
h
Awesome! Definitely a good strategy
If you haven’t yet, see https://pants.readme.io/docs/upgrade-tips for another tip on how to ignore deprecation warnings
👍🏽 1
j
Yeah, I'm "acting" like a newbie and following those instructions.
It doesn't say to update the
./pants
script, but I did that because we have a heavily hacked version of the bootstrap script and I wanted to get it as close as possible to the
pantsbuild/setup
version as I can.
💯 1
h
Thanks for the patch! will look tomorrow
👍🏽 1