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

happy-kitchen-89482

01/15/2023, 2:22 PM
I would like to then change our docs to recommend trying this out preferably to other ways of installing Pants.
💯 1
b

bitter-ability-32190

01/15/2023, 2:48 PM
I'm upgrading us to the latest RC this. I'll remove the pants script at the repo root and force my devs to use this instead. 👍
e

enough-analyst-54434

01/15/2023, 3:12 PM
I already wrote that script fwiw a few weeks ago: https://github.com/pantsbuild/scie-pants/pull/48
h

happy-kitchen-89482

01/15/2023, 4:32 PM
Will overwrite mine with that one, and then maybe tweak a little
b

bitter-ability-32190

01/15/2023, 5:27 PM
Should we augment the pants script to use one-or-the-other so people can switch?
So opt-in downloading of the scie-pants and use that. Otherwise it's the normal pants launcher with maybe a warning. Then at some point we flip it and warn if you disable it. Then it's just a hard error and no functionality
e

enough-analyst-54434

01/15/2023, 5:52 PM
That would mean: curl the augmented Pants script, which curls the get-pants (or pantsup) script, which curls scie-pants.
b

bitter-ability-32190

01/15/2023, 6:02 PM
🏋️‍♂️
h

happy-kitchen-89482

01/15/2023, 9:09 PM
It's the difference between
pants
and
./pants
That seems as easy a switch as whatever we'd change in the pants script
Plus, we want to wean people off the pants script
b

bitter-ability-32190

01/16/2023, 2:13 AM
Putting this in
./pants
makes it easy to try, way to wean, and easy to switch
e

enough-analyst-54434

01/16/2023, 2:19 AM
Easy to try how?
pants
vs
./pants
is pretty subtle; so you leave the cliff of learning that for later anyhow. In effect the only thing you buy is ... I actually have no clue.
h

hundreds-father-404

01/16/2023, 12:10 PM
We pretty regularly have ./pants throughout all the docs for code samples. Once you make the change, you'll want to grep and update all references (ripgrep + the fd replacement for find is great combo)
b

bitter-ability-32190

01/16/2023, 12:29 PM
@enough-analyst-54434 ./pants is at the root of every pants repo for every user. Slack is checked by maybe a couple handfuls. Having the launcher script download it for you and nudge you towards the future is better than pulling the rug. Speaking of, there's 0 discussion on how to deprecate ./pants anyways.
e

enough-analyst-54434

01/16/2023, 12:47 PM
Josh we agree on goals but not details. If you're an existing user you need to update your pants script. What triggered that? If you're a new user you just use the new thing Benjy is documenting.
h

happy-kitchen-89482

01/16/2023, 1:20 PM
Updating
./pants
is probably a good idea because of all the muscle memory of typing
./pants
. But we can't get away from socializing the need to update
./pants
...
So I'm on board with a
./pants
update whose purpose is to wean people off
./pants
... I just don't want to create a long-term expectation of still using
./pants
e

enough-analyst-54434

01/16/2023, 1:54 PM
Can someone explain what it means for
./pants
to wean you off
./pants
? Afaict, a new pants script either has to look for a new config option to say I want to use the new Pants launcher or it just defaults to the new launcher. If that's right, then the new Pants script does not wean you off itself, it just gets usage time of the new launcher. So you're getting vet time of the launcher; not weaning users. Users will still face the
./pants
->
pants
cliff.
If the goal is actually vet time, that's fine and makes sense. It's not what has been said though.
So make it easy, opt-in, cross-repo to get the new thing. Then at some point it's the default and you opt out. Then, poof, hard error
e

enough-analyst-54434

01/16/2023, 3:05 PM
Still makes zero sense to me. I'll bow out.
h

happy-kitchen-89482

01/16/2023, 4:11 PM
I guess it's to say "stop using me, use
pants
instead, I will stop working soon"
It's to take advantage of the muscle memory of typing
./pants
e

enough-analyst-54434

01/16/2023, 4:15 PM
So there will be a nag message added.
h

happy-kitchen-89482

01/16/2023, 4:16 PM
Yeah, that is what I was imagining @bitter-ability-32190 was suggesting?
b

bitter-ability-32190

01/16/2023, 4:23 PM
That and we can also install the script in
bin
for them. Eventually shelling out to it by default. Helps users with less steps and helps make it a gradual transition