rapid-journalist-97001
10/13/2025, 1:00 PMpex3 lock create \
--style universal \
--target-system linux \
--target-system mac \
--elide-unused-requires-dist \
--interpreter-constraint "CPython==3.13.*" \
--index pytorch=<https://download.pytorch.org/whl/cpu> \
--source "pytorch=torch; sys_platform != 'darwin'" \
--indent 2 \
-o lock.json \
torch
It looked like a simple change so I forked pants and experimented with adding the options to specify index and source when running generate-lockfiles. It seems to work smoothly. Is there anything you think I should know before I have a go at adding tests and opening a PR?happy-kitchen-89482
10/14/2025, 1:35 AMgenerate-lockfiles subsystem, so they then apply to all invocations of that goal? We'd probably want them to be properties of individual resolves, which we currently implement rather clunkily as _resolves_to_* `DictOption`s in src/python/pants/backend/python/subsystems/setup.pyhappy-kitchen-89482
10/14/2025, 1:35 AMhappy-kitchen-89482
10/14/2025, 1:35 AMaverage-breakfast-91545
10/14/2025, 8:25 AMrapid-journalist-97001
10/14/2025, 11:55 AM_resolves_to_sources to get this to work, as we can already set indexes (for all resolves) through PythonRepos. It might be nice to also have the option of specifying resolve-specific indexes (and it's hardly any more work), though it is redundant, what do you think?
And yes - any insight on Bob's question would be handyrapid-journalist-97001
10/15/2025, 10:58 AMcowsay is published in both PyPI and TestPyPI, so we could use the latter as a second index for testing. (ansicolors, the package used in other lockfile tests, is not on TestPyPIansiColor but it has a different maintainer)average-breakfast-91545
10/15/2025, 10:59 AMrapid-journalist-97001
10/18/2025, 5:34 PMrapid-journalist-97001
10/21/2025, 6:07 PMlint check fmt fix goals on certain targets (like src/python/pants/core/goals:: and src/python/pants/backend/python::), not on :: . If I try the latter I get
18:54:27.38 [INFO] Completed: Scheduling: Ensure download of JDK --jvm=temurin:1.11.
18:54:27.38 [ERROR] 1 Exception encountered:
...
File "/Users/chiara/dev/pants/src/python/pants/jvm/jdk_rules.py", line 250, in prepare_jdk_environment
raise ValueError(
ValueError: Failed to locate Java for JDK `temurin:1.11`:
Which is weird cause I do have temurin 1.11 installed:
$ cs java --installed
adoptium:1.11.0.28 installed at /Users/chiara/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.28%252B6/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.28_6.tar.gz/jdk-11.0.28+6/Contents/Home
adoptium:1.17.0.16 installed at /Users/chiara/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.16%252B8/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.16_8.tar.gz/jdk-17.0.16+8/Contents/Home
temurin:1.11.0.28 installed at /Users/chiara/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.28%252B6/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.28_6.tar.gz/jdk-11.0.28+6/Contents/Home
temurin:1.17.0.16 installed at /Users/chiara/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.16%252B8/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.16_8.tar.gz/jdk-17.0.16+8/Contents/Home
I don't think it's a problem for this particular PR as I can run the goals for the relevant targets, but thought you should know as I saw there had been a somewhat similar issue that was later resolved.happy-kitchen-89482
10/22/2025, 4:51 PMpants --changed-since=main fmt fix lint check to act just on files that have changed compared to main