Looks like <https://github.com/pantsbuild/pants/pu...
# development
h
Looks like https://github.com/pantsbuild/pants/pull/19654 is somehow broken: I have upgraded to scie-pants 0.9.3 and am still getting this; ` DEPRECATED: using a
pants
launcher binary older than 0.9.2 was removed in version 2.18.0.dev6.`
cc @broad-processor-92400
This is a brew-installed scie-pants on macos
b
Ugh. Sorry. What's the rest of the message say?
And, what command are you running so I can reproduce?
h
Copy code
$ pants
There is no pantsd metadata at /Users/benjyw/src/pants/.pids/cd2a0778304e/pantsd.
Traceback (most recent call last):
  File "/Users/benjyw/src/pants/src/python/pants/bin/pants_loader.py", line 116, in <module>
    main()
  File "/Users/benjyw/src/pants/src/python/pants/bin/pants_loader.py", line 112, in main
    PantsLoader.main()
  File "/Users/benjyw/src/pants/src/python/pants/bin/pants_loader.py", line 108, in main
    cls.run_default_entrypoint()
  File "/Users/benjyw/src/pants/src/python/pants/bin/pants_loader.py", line 91, in run_default_entrypoint
    exit_code = runner.run(start_time)
  File "/Users/benjyw/src/pants/src/python/pants/bin/pants_runner.py", line 115, in run
    warn_or_error(
  File "/Users/benjyw/src/pants/src/python/pants/util/memo.py", line 123, in memoize
    result = func(*args, **kwargs)
  File "/Users/benjyw/src/pants/src/python/pants/base/deprecated.py", line 169, in warn_or_error
    raise CodeRemovedError(msg)
pants.base.deprecated.CodeRemovedError: DEPRECATED: using a `pants` launcher binary older than 0.9.2 was removed in version 2.18.0.dev6.

Run `PANTS_BOOTSTRAP_VERSION=report pants` to see the current version of the `pants` launcher binary, and see <https://www.pantsbuild.org/v2.18/docs/installation> for how to upgrade.
I think we should never fail to run Pants if we fail to extract the scie-pants version for whatever reason. We should only fail on this deprecation if we definitely have a scie-pants version in hand (and it's too old)
Although I guess that is not what's going on here, it's detecting 0.9.2 somehow
But SCIE_PANTS_VERSION is not overridden in my env, so it's not that
b
Ah, hm, that code relies on scie-pants to pass in an env var, which was only starting to be set recently, in 0.9.2. In particular, not in 0.8 etc. but those are users who need to upgrade. So, doing nothing when we don't know the version isn't good enough šŸ¤”
Okay, I definitely reproduce the problem. I've got a short meeting right now, and then will look at this straight away
h
Hmm, yeah, that is not set
I added logging and SCIE_PANTS_VERSION is not set at all
so we should not fail in that case
we should just silently continue
b
I don't think so: 0.8.0 doesn't set it, but a user with that needs to update to 0.9.0 before Pants 2.18 is released, because 0.8 doesn't support the new (and only) distribution mechanism
this may be particular to the pants repo, because that has a special way of running
ah, maybe: it should be guarded by
NO_SCIE_WARNING
too
h
Well, either way, this situation where I have upgraded to 0.9.3 and I still can't run pants is untenable...
b
yep, just posting a fix
Okay, done. Sorry about that.
Just thinking through why this wasn't caught earlier: • I don't know why it didn't fail for me locally before, because I definitely ran commands like
pants fix ...
before posting the previous PR šŸ¤·ā€ā™‚ļø • It also didn't fail in CI... but would've if pants' CI was using using scie-pants. Should it? On one hand, it would've caught this and better simulates what we run locally. On the other, seems a bit weird to install/invoke scie-pants just for scie-pants to invoke the in-repo
./pants
script anyway šŸ¤·ā€ā™‚ļø
(For the first: If I go back to the branch for 19654, the problem reproduces, so... maybe I just did it wrong, or pantsd was already running, or something. Not sure.)
Merged