Skip to content

Fix gazelle not updating deps - #621

Open
keith wants to merge 1 commit into
bazelbuild:mainfrom
keith:ks/fix-gazelle-not-updating-deps
Open

Fix gazelle not updating deps#621
keith wants to merge 1 commit into
bazelbuild:mainfrom
keith:ks/fix-gazelle-not-updating-deps

Conversation

@keith

@keith keith commented May 1, 2026

Copy link
Copy Markdown
Member

Previously deps were set correctly when generating the first
bzl_library, but not when the deps changed overtime

@keith
keith force-pushed the ks/fix-gazelle-not-updating-deps branch from 1d753db to 452046e Compare May 1, 2026 23:36
@keith
keith force-pushed the ks/fix-gazelle-not-updating-deps branch from 452046e to 440603e Compare May 4, 2026 17:51
@keith

keith commented May 27, 2026

Copy link
Copy Markdown
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>
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.

1 participant