Skip to content

set plugin development find-links only on the needed resolve#23024

Merged
cburroughs merged 1 commit intopantsbuild:mainfrom
cburroughs:cbs/scope-find-links
Mar 31, 2026
Merged

set plugin development find-links only on the needed resolve#23024
cburroughs merged 1 commit intopantsbuild:mainfrom
cburroughs:cbs/scope-find-links

Conversation

@cburroughs
Copy link
Copy Markdown
Contributor

As described at
#21223 (comment), if you set find-links (and that includes everyone with in-repo plugins by way of pants.backend.plugin_development) on one resolve, we were erroneously setting it for all resolves during lockfile generation. This materially impacts resolution time.

@cburroughs cburroughs self-assigned this Jan 16, 2026
@cburroughs cburroughs marked this pull request as ready for review January 16, 2026 22:03
@cburroughs cburroughs marked this pull request as draft January 23, 2026 13:59
@cburroughs
Copy link
Copy Markdown
Contributor Author

(Back to draft, found a complication.)

@cburroughs
Copy link
Copy Markdown
Contributor Author

Thanks for the contribution. We've just branched for 2.31.x, so merging this pull request now will come out in 2.32.x, please move the release notes updates to docs/notes/2.32.x.md if that's appropriate.

As described at
<pantsbuild#21223 (comment)>,
if you set find-links (and that includes everyone with in-repo plugins
by way of `pants.backend.plugin_development`) on one resolve, we were
erroneously setting it for *all* resolves during lockfile generation.
This materially impacts resolution time.
@cburroughs cburroughs force-pushed the cbs/scope-find-links branch from 9c0bbba to 0ad731d Compare March 27, 2026 19:45
@cburroughs cburroughs changed the title set find-links per resolve, not globally set plugin development find-links only on the needed resolve Mar 27, 2026
@cburroughs
Copy link
Copy Markdown
Contributor Author

(Back to draft, found a complication.)

The code was correct, but my description/changelog was wrong and mislead me when I looked at it later. This change fixes the narrow issue of pants.backend.plugin_development injecting into all resolves, but [python-repos].find_links itself is still global and unchanged.

@cburroughs cburroughs marked this pull request as ready for review March 27, 2026 19:48
Copy link
Copy Markdown
Contributor

@tobni tobni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hav everified this as working (the index is appropriately scoped), but without any performance improvement. Maybe because my company internal mirror has the same issue as the pants find_links.

@cburroughs cburroughs merged commit bebf4a0 into pantsbuild:main Mar 31, 2026
25 checks passed
@jsirois
Copy link
Copy Markdown
Contributor

jsirois commented Mar 31, 2026

Maybe because my company internal mirror has the same issue as the pants find_links.

@tobni yes. Exactly all indexes in use in a resolve must support PEP-658 if you want to get faster resolves (due to lack of wheel downloads to learn metadata).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants