chilly-holiday-77415
07/04/2023, 4:31 PMpants repl ::
in 2.16.0
with a mypy tool lockfile and a default lockfile:
Engine traceback:
in `repl` goal
NoCompatibleResolveException: The input targets did not have a resolve in common.
Targets used together must use the same resolve, set by the `resolve` field. For more information on 'resolves' (lockfiles), see <https://www.pantsbuild.org/v2.16/docs/python-third-party-dependencies#multiple-lockfiles>.
To work around this, choose which resolve you want to use from above. Then, run `pants peek :: | jq -r '.[] | select(.resolve == "example") | .["address"]' | xargs pants repl`, where you replace "example" with the resolve name, and possibly replace the specs `::` with what you were using before. If the resolve is the `[python].default_resolve`, use `select(.resolve == "example" or .resolve == null)`. These queries will result in opening a REPL with only targets using the desired resolve.
that JQ command with my pants.toml of:
[python]
interpreter_constraints = ["CPython==3.9.*"]
enable_resolves = true
default_resolve = "python-default"
and pants peek :: | jq -r '.[] | select(.resolve == "python-default") | .["address"]'
returns nothingenough-analyst-54434
07/04/2023, 4:52 PMpants repl ::
to fail if you had, say, Python and Scala - which repl? run one randomly? Run one randomly 1st then, on exit run the second?chilly-holiday-77415
07/04/2023, 5:01 PMenough-analyst-54434
07/04/2023, 5:27 PM