wide-midnight-78598
08/03/2024, 12:39 AMscie-pants (the Rust code specifically) exists right now? I thought that Pants can output itself as a pex, and we could use science or (now) pex to bundle that with a Python interpreter? I wasn’t sure if scie-pants was needed strictly to handle the case where we want to run the bundled interpreter vs when we sometimes want to run the pants script
2. Is there anything that’s preventing us from using Python 3.12 on pants? Like, something in the repo that’s causing a problem? I feel like we might be leaving some perf on the table. In-repo plugins seem to be the only thing I can think of at the moment (having not yet setup a branch to try this on). I thought there was some work going on, but I can’t find the associated PR anymorebroad-processor-92400
08/03/2024, 6:05 AMbroad-processor-92400
08/03/2024, 6:06 AMwide-midnight-78598
08/03/2024, 1:04 PMscie files rather heavily in my production work, so that’s not in question - but we’re not using the more “traditional” mechanisms for creating said scie files (science binary or now, pex). If we were, the pants repo itself could create and deploy a bundled version of itself (for example).wide-midnight-78598
08/03/2024, 1:06 PMIf we could rely on pants always being a scie that provides its own interpreter, the launcher could likely be simpler (wouldn’t have to install Python interpreters).So, what I take this to mean is that, the repos that still use the
./pants script (which launches using a local interpreter) are the reason for the complexity of our scie-pants repo? It must be more than that, no?wide-midnight-78598
08/03/2024, 1:25 PMwide-midnight-78598
08/03/2024, 1:26 PMbroad-processor-92400
08/04/2024, 10:39 PMIt’s a shim to grab and download the associated pants.pex, and unwrap that locally - so it’s basically an isolated runner that doesn’t depend on Pants, but rather grabs, unpacks, and runs pexYep.... but with an extra step (that you're aware of, but just being explicit): "download the associated pants.pex, install an appropriate interpreter and _execute the pex using the interpreter_"
Which then just means we would be downloading and unpacking the same python interpreter over and over againYeah, if we had "eager" scies rather than lazy/ptex ones, as you say
curved-television-6568
08/19/2024, 9:21 AM./pants will not be respected when using scie-pants.. i.e. it doesn't invoke the ./pants script at all. The pants repo is an exception to this rule (triggered by the config in pants.toml):
[DEFAULT]
# Tell `scie-pants` to use our `./pants` bootstrap script.
delegate_bootstrap = truewide-midnight-78598
09/09/2024, 11:48 PMwide-midnight-78598
09/10/2024, 4:50 PMscie commands functionality to act as multiple entry-points - one when there is no version passed in, another when you know the version (and build root, and all the metadata that scie-pants currently takes). So, like a blank pants-runner.scie --version would find the pants.toml, grab the version, and re-call as pants-runner.scie pants 2.22.0 --version (or whatever the current pattern is)
def main(argv: list[str]) -> None:
pid = os.getpid()
args = argv[1:]
print(f"{pid}: Launched pants-runner with args: {args}")
if not args:
version = get_version()
subprocess.run([f"{os.getcwd()}/pants-runner.scie", "pants", version], check=True)
sys.exit(0)
version = args[1]
print(f"{pid}: Attempting to run using version {version}")
# "Download" (e.g. pick) correct scie from local releases and run it (ignoring args)
subprocess.run([f"{os.getcwd()}/releases/{version}/pants.{version}-cp39-darwin_arm64.scie", "--version"], check=True, env={"SCIE_PANTS_VERSION": "0.12.0"})
sys.exit(0)
https://github.com/sureshjoshi/assless-chaps/