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

jolly-midnight-72759

06/23/2020, 2:37 AM
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

hundreds-father-404

06/23/2020, 3:01 AM
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

jolly-midnight-72759

06/23/2020, 3:06 AM
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

hundreds-father-404

06/23/2020, 3:07 AM
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

jolly-midnight-72759

06/23/2020, 3:11 AM
I was just doing the step upgrade to see the depreciation messages
❤️ 1
h

hundreds-father-404

06/23/2020, 3:11 AM
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

jolly-midnight-72759

06/23/2020, 3:15 AM
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

hundreds-father-404

06/23/2020, 3:38 AM
Thanks for the patch! will look tomorrow
👍🏽 1
2 Views