hundreds-father-404
08/15/2022, 3:35 PM[python-repos].{repos,indexes}
to be [python].resolves_to_{find_links,indexes
? Specifically, the idea that you can configure it per-resolve (user resolve or tool resolve)hundreds-father-404
08/15/2022, 3:35 PM__default__
key so it applies to every resolvehundreds-father-404
08/15/2022, 3:35 PMhundreds-father-404
08/15/2022, 3:35 PMproud-dentist-22844
08/15/2022, 3:40 PM[python-repos].indexes
) in some cases and even do so per-resolve. And for [python-repos].repos
that absolutely should be per-resolve - a specialized way to use a local wheelhouse or something for special-purpose resolves.
Also, consistency is a big deal. We're adding the per-resolve options for all the other python options. Having a weird thing that uses "legacy" style options is confusing for new users. You have to learn about the history to be able to distinguish when to use which kind of option.proud-dentist-22844
08/15/2022, 3:43 PM[python-repos].repos
is a very confusing option name - changing that to find_links
is a superb suggestion.hundreds-father-404
08/15/2022, 3:57 PM[GLOBAL].plugins
.witty-crayon-22786
08/15/2022, 4:23 PMresolve(..)
target if we’re getting up to 3+ settings per resolvewitty-crayon-22786
08/15/2022, 4:23 PMhundreds-father-404
08/15/2022, 4:27 PMenough-analyst-54434
08/15/2022, 10:03 PMhundreds-father-404
08/15/2022, 10:13 PMhundreds-father-404
08/15/2022, 10:14 PMenough-analyst-54434
08/15/2022, 10:14 PMenough-analyst-54434
08/15/2022, 10:15 PMenough-analyst-54434
08/15/2022, 10:17 PMhundreds-father-404
08/18/2022, 6:53 PM[python-repos]
being global: changing the values for the sake of a single resolve invalidates all lockfiles, because we now track those values in the lockfile header. That means every resolve must now be regenerated, only to use --find-links
for one resolve! (or, turn off Pants lockfile validation)
Another issue: it's not clear to me how I can force a particular resolve to use the local --find-links rather than PyPI. I have a local copy of ansicolors
and want to force Pants to use it, so I added [python-repos].repos
. But the lockfile has entries for PyPI and my --find-links. I don't want to set [python-repos].indexes = []
because then all other resolves won't resolve
(These issues are while trying to experiment with local requirements and --path-mappings
)enough-analyst-54434
08/18/2022, 6:54 PMhundreds-father-404
08/18/2022, 6:55 PMOn the force bit, you just can't even when global. Pip does not respect ordering in any way between releases.Got it. So only way to force local wheel would be
[python-repos].indexes = []
it sounds like, which is a non-starter because it breaks every other resolveenough-analyst-54434
08/18/2022, 6:55 PMenough-analyst-54434
08/18/2022, 6:55 PMenough-analyst-54434
08/18/2022, 6:57 PM+foo
when you build it.enough-analyst-54434
08/18/2022, 6:57 PM+build id
version extensions are for.hundreds-father-404
08/18/2022, 6:58 PMThe only way to force using a custom thing is to give it a custom version, use +foo when you build it.or solely use your custom repo / find-links, right? Another option seems to be PEP 440 direct references, which I confirmed indeed works with
--path-mappings
enough-analyst-54434
08/18/2022, 6:58 PMwitty-crayon-22786
08/18/2022, 6:58 PMwitty-crayon-22786
08/18/2022, 6:58 PMenough-analyst-54434
08/18/2022, 6:58 PMenough-analyst-54434
08/18/2022, 6:58 PM+hack
enough-analyst-54434
08/18/2022, 7:00 PMenough-analyst-54434
08/18/2022, 7:00 PMhundreds-father-404
08/18/2022, 7:02 PMAnother issue: it's not clear to me how I can force a particular resolve to use the local --find-links rather than PyPI.This one remains very unfortunate imo -- increases the cost to using local requirements
changing the values for the sake of a single resolve invalidates all lockfiles--
does the jvm support indexes per resolve today?@witty-crayon-22786 we don't support custom indexes in general, right? Only Coursier
enough-analyst-54434
08/18/2022, 7:02 PMenough-analyst-54434
08/18/2022, 7:03 PMenough-analyst-54434
08/18/2022, 7:03 PMhundreds-father-404
08/18/2022, 7:03 PMrepos = StrListOption(
default=[
"<https://maven-central.storage-download.googleapis.com/maven2>",
"<https://repo1.maven.org/maven2>",
],
hundreds-father-404
08/18/2022, 7:03 PMenough-analyst-54434
08/18/2022, 7:03 PMenough-analyst-54434
08/18/2022, 7:03 PMhundreds-father-404
08/18/2022, 7:04 PMenough-analyst-54434
08/18/2022, 7:06 PMenough-analyst-54434
08/18/2022, 7:07 PMenough-analyst-54434
08/18/2022, 7:07 PMenough-analyst-54434
08/18/2022, 7:08 PMhundreds-father-404
08/18/2022, 7:13 PMthis makes sense purely as a gedanken thing.Pardon, what does "this" specifically mean here?
Published artifacts should be immutable or else chaosAck
The only reason not to do this is if there is a perf bug.And, that it's inconvenient that you may need to only add a supplemental index/--find-links for one resolve, e.g. user code, but doing so invalidates everything else in your repo. For example, you can't use Pants's default tool lockfiles anymore and every tool lockfile must be generated. That's a big adoption cost
proud-dentist-22844
08/18/2022, 7:14 PMenough-analyst-54434
08/18/2022, 7:15 PMenough-analyst-54434
08/18/2022, 7:15 PMenough-analyst-54434
08/18/2022, 7:15 PMenough-analyst-54434
08/18/2022, 7:16 PMenough-analyst-54434
08/18/2022, 7:16 PMwitty-crayon-22786
08/18/2022, 7:18 PMwitty-crayon-22786
08/18/2022, 7:18 PMenough-analyst-54434
08/18/2022, 7:18 PMenough-analyst-54434
08/18/2022, 7:19 PMwitty-crayon-22786
08/18/2022, 7:19 PMenough-analyst-54434
08/18/2022, 7:19 PMproud-dentist-22844
08/18/2022, 7:19 PMenough-analyst-54434
08/18/2022, 7:19 PMenough-analyst-54434
08/18/2022, 7:20 PMenough-analyst-54434
08/18/2022, 7:21 PMenough-analyst-54434
08/18/2022, 7:22 PMhundreds-father-404
08/18/2022, 7:23 PMIf a global index and its spelling could be preserved (but undocumented) ~forever, I'd be happy.Yeah, it can be, as long as we're fine having an extra subsystem
[python-repos]
sitting around forever. My PR handles reading from either the new option or [python-repos]
We don't yet have technology to "undocument" reference docs thoughenough-analyst-54434
08/18/2022, 7:23 PMproud-dentist-22844
08/18/2022, 7:25 PMproud-dentist-22844
08/18/2022, 7:25 PMproud-dentist-22844
08/18/2022, 7:26 PMenough-analyst-54434
08/18/2022, 7:27 PMenough-analyst-54434
08/18/2022, 7:28 PMenough-analyst-54434
08/18/2022, 7:28 PMproud-dentist-22844
08/18/2022, 7:30 PMenough-analyst-54434
08/18/2022, 7:32 PMenough-analyst-54434
08/18/2022, 7:33 PMhundreds-father-404
08/18/2022, 7:34 PMenough-analyst-54434
08/18/2022, 7:36 PMhundreds-father-404
08/18/2022, 7:38 PMenough-analyst-54434
08/18/2022, 7:39 PMenough-analyst-54434
08/18/2022, 7:40 PMenough-analyst-54434
08/18/2022, 7:40 PMhundreds-father-404
08/18/2022, 7:41 PMenough-analyst-54434
08/18/2022, 7:42 PMenough-analyst-54434
08/18/2022, 7:43 PMhundreds-father-404
08/18/2022, 7:47 PMproud-dentist-22844
08/18/2022, 7:59 PMproud-dentist-22844
11/17/2022, 8:17 PM