Skip to content

fix(gazelle) Register pyi_deps as ResolveAttrs - #3037

Merged
dougthor42 merged 2 commits into
bazel-contrib:mainfrom
benchling:martani-clear-deps
Jun 30, 2025
Merged

fix(gazelle) Register pyi_deps as ResolveAttrs#3037
dougthor42 merged 2 commits into
bazel-contrib:mainfrom
benchling:martani-clear-deps

Conversation

@amartani

Copy link
Copy Markdown
Contributor

Fix an issue in #3014 where, when all type-checking dependencies are removed from a file, the corresponding target's pyi_deps doesn't get cleaned up. I traced this back to ResolveAttrs, though I'm not entirely sure of what other behaviors this may trigger. (Currently, removing deps from ResolveAttrs doesn't break any existing test case)

(No new changelog entry since this is a fix to an unreleased feature that is already in the changelog)

Comment threadgazelle/python/testdata/clear_out_deps/__init__.py Outdated
Comment threadgazelle/python/testdata/clear_out_deps/__init__.py Outdated
and a case of deps being only partially removed.
@amartani
amartani requested a review from dougthor42June 29, 2025 22:17

@dougthor42dougthor42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the updated tests! Those look great.

@dougthor42
dougthor42 added this pull request to the merge queueJun 30, 2025
Merged via the queue into bazel-contrib:main with commit 581cddcJun 30, 2025
amartani added a commit to benchling/rules_python that referenced this pull request Jul 8, 2025
Fix an issue in bazel-contrib#3014
where, when all type-checking dependencies are removed from a file, the
corresponding target's `pyi_deps` doesn't get cleaned up. I traced this
back to `ResolveAttrs`, though I'm not entirely sure of what other
behaviors this may trigger. (Currently, removing `deps` from
`ResolveAttrs` doesn't break any existing test case)
(No new changelog entry since this is a fix to an unreleased feature
that is already in the changelog)
Sign up for freeto 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.

3 participants

@amartani@aignas@dougthor42