quiet-army-59227
07/03/2024, 5:37 PM# pants.toml
[python]
interpreter_constraints = ["==3.10.12"]
enable_resolves = true
[python.resolves] # TODO: <https://aurisrobotics.atlassian.net/browse/OITS-27659>
python-default = "devops/pantsbuild/lockfiles/python-default.lock"
pants-plugins = "devops/pantsbuild/lockfiles/pants-plugins.lock" # TODO: <https://aurisrobotics.atlassian.net/browse/OITS-27800>
[python.resolves_to_interpreter_constraints]
pants-plugins = ["==3.9.*"] # TODO: <https://aurisrobotics.atlassian.net/browse/OITS-27800>
[python-bootstrap]
search_path = [
"<PYENV>",
"<PATH>",
]
It is saying the error is for the check
goalquiet-army-59227
07/03/2024, 5:39 PMwide-midnight-78598
07/03/2024, 5:41 PMquiet-army-59227
07/03/2024, 5:42 PMcheck
goal will respect my version of the interpreter:wide-midnight-78598
07/03/2024, 5:42 PMpants-plugins = ["==3.9.*"]
?quiet-army-59227
07/03/2024, 5:42 PMquiet-army-59227
07/03/2024, 5:43 PMquiet-army-59227
07/03/2024, 5:43 PMquiet-army-59227
07/03/2024, 5:43 PMquiet-army-59227
07/03/2024, 5:43 PMquiet-army-59227
07/03/2024, 5:44 PMcheck
goalquiet-army-59227
07/03/2024, 5:44 PMwide-midnight-78598
07/03/2024, 5:45 PMpants_requirements(name="pants", resolve="pants-plugins")
quiet-army-59227
07/03/2024, 5:46 PMwide-midnight-78598
07/03/2024, 5:47 PMquiet-army-59227
07/03/2024, 5:48 PMresolves_to_interpreter_constraints
propertyquiet-army-59227
07/03/2024, 5:48 PMquiet-army-59227
07/03/2024, 5:49 PMwide-midnight-78598
07/03/2024, 5:49 PMwide-midnight-78598
07/03/2024, 5:49 PMquiet-army-59227
07/03/2024, 5:50 PMquiet-army-59227
07/03/2024, 5:50 PMwide-midnight-78598
07/03/2024, 5:51 PMquiet-army-59227
07/03/2024, 5:51 PMquiet-army-59227
07/03/2024, 5:52 PMquiet-army-59227
07/03/2024, 5:52 PMquiet-army-59227
07/03/2024, 5:57 PMresolves_to_interpreter_constraints
is used to "Override the interpreter constraints to use when generating a resolve's lockfile"
This doesn't imply that the resolve itself uses that interpreter version, or does it?wide-midnight-78598
07/03/2024, 6:15 PMpants.toml
backend_packages = [
"pants.backend.plugin_development",
"pants.backend.python.mixed_interpreter_constraints",
...
]
[python]
enable_resolves = true
interpreter_constraints = ["==3.11.*"]
[python.resolves]
pants-plugins = "build-support/lockfiles/pants-plugins.lock"
python-default = "build-support/lockfiles/python-default.lock"
[python.resolves_to_interpreter_constraints]
pants-plugins = ["==3.9.*"]
pants-plugins/BUILD
pants_requirements(name="pants")
__defaults__(all=dict(interpreter_constraints=["==3.9.*"], resolve="pants-plugins"))
I think this will follow the principle of least surprise for in-repo pluginswide-midnight-78598
07/03/2024, 6:16 PMwide-midnight-78598
07/03/2024, 6:16 PMpants py-constraints ::
should show that everything is using the expected constraintquiet-army-59227
07/03/2024, 6:20 PMpants-plugins
is using 3.9! It would be nice if you mention that in the docs
I have another coworker who has checkout my code and he is able to run my custom goal that I wrote in the pants-plugins
and he doesn't have 3.9 in his machine. Doesn't pants come bundled with its own interpreter? is it possible that when my coworker runs the custom goal, it uses that interpreter somehow?
Also, pants py-constraints ::
is not working for me. Is this a custom goal that I need to specify the backend for?wide-midnight-78598
07/03/2024, 6:21 PM"pants.backend.python.mixed_interpreter_constraints",
wide-midnight-78598
07/03/2024, 6:23 PMwide-midnight-78598
07/03/2024, 6:23 PMquiet-army-59227
07/03/2024, 6:25 PMresolves_to_interpreter_constraints
sets the interpreter constraints for that resolve as well? meaning not only does it using 3.9 to generate the lockfiles, but also for the resolve as well? If not, how does pants-plugins know to use 3.9 if I am not using __defaults__(all=dict(interpreter_constraints=["==3.9.*"], resolve="pants-plugins"))
yet?wide-midnight-78598
07/03/2024, 6:33 PMquiet-army-59227
07/03/2024, 7:07 PMcurved-television-6568
07/04/2024, 7:21 AMcurved-television-6568
07/04/2024, 7:21 AMquiet-army-59227
07/05/2024, 5:06 PM