-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special-case the Pants repo. #33
Comments
If the goal is to make the If the goal is to always keep the |
The thing is, to warn / error out, there needs to be some signal. I was suggesting |
We could make the signal a marker file of some sort - anything. It just needs some cooperation from the Pants repo so I don't have to add crazy tea-leaf reading logic to scie-pants in the hot path. |
I was originally wondering if maybe there was auto-delegation to a local However, having that explicit [bootstrap]
delegate = true does make that concern go away 🤷🏽
That's a good point - it doesn't need to be documented, because it's not really a user-facing API. |
Ok, cool. Yeah, the |
Counterpoint - running a pants release on the Pants repo allows Pants to be self-hosting, which has interesting benefits. E.g., once we add Rust support we could build the engine with Pants, and enjoy remote caching etc. So if that's a direction we want to go in, maybe running |
I'm not sure I follow the "self-hosting" argument. Are you suggesting that If so, I would humbly suggest renaming so we have |
Yeah, I'm suggesting that |
Also, the linked PR suggests having scie |
Finishing that thought, it then needs to error if pants_version is not set in the Pants repo (or set it to latest stable). How exactly is that supposed to work @benjyw with our generally out of control deprecation cycles? Do we set pants_version to the latest mainline release with every mainline (~dev) release? And then if a new option is added + used in Pants own pants.toml do all devs who pull the new option on main find out with a config error and then switch to pants from sources? I guess I'd appreciate you walking through the full detail set. |
FWIW I'm currently hacking on #30 which makes this even more untenable. At that point |
Correct, I do. At the same time, if there's desire to do what Benjy suggested I could get on board that (if the details play out) merely observed that in order for my mind to cope with that, the dev incantation would need to be further away from the regular |
The choice of config section for the `pants.toml` config file was made to have something that won't choke the regular Pants configuration verification and also not show up in any online help. Closes #33 When `delegate_bootstrap=true` in the `[DEFAULT]` section of `pants.toml` _and_ `pants_version` is unspecified (`PANTS_SHA` is also considered here) bootstrapping Pants is delegated to `./pants`.
I don't know exactly what the details would be, there would need to be some finessing. Maybe we take the most recent release, or the most recent stable release, or maybe indeed running from sources is the norm and running from a release is the exception, so we require you to set an env var with the version in order to run a release. But the ability to run a released version of Pants in the pants repo is substantial (e.g., if we had Rust support we could avoid a ton of engine rebuilding), whereas having |
Ok, that all already works just like any other repo. Define |
Not entirely true, though. If you attempt to run with a released Pants, boom:
due to: |
Oh, or I misread the "that all already works".. from |
Yeah, perhaps we could fix Pants here. |
The proliferation of jim-crackery is wide: https://github.com/pantsbuild/pants/blob/main/src/python/pants/version.py#L13-L14 |
Oh, wow! wasn't aware of that one, but that could work.. but feels.. icky. :D Edit: It does indeed work, and exposes another (to me already known) issue regarding the explorer backend:
|
Yeah, there is already another ick: Lines 171 to 175 in 41900c4
That env var was intended for tests only, it just doesn't have the leading underscore to look as obviously icky. So there are paths forward here and the ick could be solidified with some code comments in Pants at the very least about production use of these knobs by scie-pants. |
Aha, so I get the feeling the correct thing to do would be to provide I can put up a PR for this later tonight. |
That sounds about right to me. |
Until the
scie-pants
binary can actually be used by Pants developers in the Pants repo, it would be good if it could detect it was running in the Pants repo.Perhaps with:
And then just run the
./pants
script in the Pants repo.The text was updated successfully, but these errors were encountered: