-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[internal] Better error message for ./pants repl
when using multiple resolves
#14327
[internal] Better error message for ./pants repl
when using multiple resolves
#14327
Conversation
Blocked by figuring out what the command should be, specifically whether to recommend using JQ vs if we need first-class support for |
The JVM should already have a good error message for this: locating a resolve for the roots is a common operation across all of the JVM goal implementations, and the only difference for pants/src/python/pants/jvm/resolve/coursier_fetch.py Lines 76 to 90 in 6f7fcfc
|
Python already has that same error message :) pants/src/python/pants/backend/python/util_rules/pex_from_targets.py Lines 204 to 234 in 6f7fcfc
And it will trigger with |
I think that it is worthwhile, yea. But maybe not a high priority. I think that " |
It's easy to finish - all that's left is figuring out the JQ snippet, then writing one simple unit test. I'm not very fluent with JQ but I think we have enough examples in the docs I could scrape something together. |
I added an example here: https://docs.google.com/document/d/1mzZWnXiE6OkgMH_Dm7WeA3ck9veusQmr_c6GWPb_tsQ/edit#heading=h.hzxpmsxjb6jw |
…e resolves [ci skip-rust] [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust]
bdd2d0b
to
9a664b1
Compare
Bump |
We generate a distinct virtualenv for each resolve, using the path `dist/python/virtualenvs/<resolve>`. From there, the user can load in their IDE which one to use. If users want to only generate for one IDE, they can use the `peek` snippet from #14327. -- If `enable_resolves = false`, we stick with the old behavior. This is convenient because it would be a misnomer to write the path to `[python].default_resolve`, which doesn't make sense to use if resolves aren't enabled. We log a warning when you do migrate to `enable-resolves` that the old path will no longer be valid. [ci skip-rust]
…14436) We generate a distinct virtualenv for each resolve, using the path `dist/python/virtualenvs/<resolve>`. From there, the user can load in their IDE which one to use. If users want to only generate for one IDE, they can use the `peek` snippet from pantsbuild#14327. -- If `enable_resolves = false`, we stick with the old behavior. This is convenient because it would be a misnomer to write the path to `[python].default_resolve`, which doesn't make sense to use if resolves aren't enabled. We log a warning when you do migrate to `enable-resolves` that the old path will no longer be valid. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
… of #14436) (#14454) We generate a distinct virtualenv for each resolve, using the path `dist/python/virtualenvs/<resolve>`. From there, the user can load in their IDE which one to use. If users want to only generate for one IDE, they can use the `peek` snippet from #14327. -- If `enable_resolves = false`, we stick with the old behavior. This is convenient because it would be a misnomer to write the path to `[python].default_resolve`, which doesn't make sense to use if resolves aren't enabled. We log a warning when you do migrate to `enable-resolves` that the old path will no longer be valid. [ci skip-rust] [ci skip-build-wheels]
First part of #14295. Finishes Python - JVM still needs it.
[ci skip-rust]
[ci skip-build-wheels]