ancient-vegetable-10556
10/12/2021, 4:59 PMpython-setup
, with the intention of ./pants generate-lockfiles
being the one command we use to do resolves for all languages.
Following that pathway, when we add named resolves to JVM, we’d add named resolves under jvm-setup
and ./pants generate-lockfiles
would resolve both python and JVM locks. The issue here is that because the JVM lock and python lock configs are disjoint, you can specify the same name for a JVM resolve and a Python resolve.
I have a couple ideas for how we could fix this:
1. Have all resolves under the same config, and require users to specify what subsystem a lock applies to
2. Keep resolves under each subsystem’s configs, and require an option to specify which subsystem to resolve when running generate-lockfiles
(i.e. if pants discovers a Python and JVM lock, it errors, and tells users to specify which subsystem we meant, or to resolve both of them)
Any thoughts? Other ideas on how to approach this?hundreds-father-404
10/12/2021, 5:05 PMhundreds-father-404
10/12/2021, 5:05 PMancient-vegetable-10556
10/12/2021, 5:06 PMancient-vegetable-10556
10/12/2021, 5:06 PMancient-vegetable-10556
10/12/2021, 5:06 PMhundreds-father-404
10/12/2021, 5:07 PMgenerate-lockfiles
Which maybeee is fine? Presumably when you're adding a new resolve, you will run generate-lockfiles
ancient-vegetable-10556
10/12/2021, 5:08 PMancient-vegetable-10556
10/12/2021, 5:08 PMancient-vegetable-10556
10/12/2021, 5:08 PMwitty-crayon-22786
10/12/2021, 5:23 PMwitty-crayon-22786
10/12/2021, 5:23 PMwitty-crayon-22786
10/12/2021, 5:24 PMancient-vegetable-10556
10/12/2021, 5:25 PMwitty-crayon-22786
10/12/2021, 5:26 PMcoursier_resolve(name='x')
declared in a BUILD file… it wouldn’t change the total resolve counthundreds-father-404
10/12/2021, 5:26 PMpants.toml
. It makes sure that codebase admins will be aware of adding a new resolve, which is a very costly decision
This is also why I love the idea of named interpreter constriants so muchancient-vegetable-10556
10/12/2021, 5:27 PMwitty-crayon-22786
10/12/2021, 5:28 PMancient-vegetable-10556
10/12/2021, 5:28 PMwitty-crayon-22786
10/12/2021, 5:28 PMancient-vegetable-10556
10/12/2021, 7:41 PM