Fix gazelle not updating deps - #621
Open
keith wants to merge 1 commit into
Open
Conversation
keith
force-pushed
the
ks/fix-gazelle-not-updating-deps
branch
from
May 1, 2026 23:36
1d753db to
452046e
Compare
keith
force-pushed
the
ks/fix-gazelle-not-updating-deps
branch
from
May 4, 2026 17:51
452046e to
440603e
Compare
Member
Author
|
cc @tetromino |
cgrindel
added a commit
to cgrindel/rules_swift_package_manager
that referenced
this pull request
Aug 2, 2026
…O test builder The Gazelle plugin that generates bzl_library targets omits deps from both MergeableAttrs and ResolveAttrs, so Gazelle computes the correct value and then discards it for any rule that already exists. New rules get correct deps; existing ones keep whatever they had no matter how their loads change. Declare the 44 deps that had drifted across 20 targets. Two loads are deliberately left undeclared. For a load from another repository the plugin cannot consult its index, so it guesses the label by stripping the .bzl suffix, and that guess does not resolve for @rules_cc//cc/common:cc_common or :cc_info. Adding them breaks analysis. Also move the synthetic Mach-O header builder into testutils, where it was duplicated between mach_o_tests and artifact_infos_tests. The magic and filetype bytes stay as literals at each call site rather than being imported from mach_o.bzl, so the tests check the implementation instead of agreeing with it by construction. Upstream fix is pending in bazelbuild/bazel-skylib#621. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously deps were set correctly when generating the first
bzl_library, but not when the deps changed overtime