fix(js): migrate closure_js_binary provider access to modern Starlark API#17317
Merged
fix(js): migrate closure_js_binary provider access to modern Starlark API#17317
Conversation
… API Replace deprecated struct field access with the proper ClosureJsBinaryInfo provider in header.bzl. Bazel 7+ removed the legacy 'field syntax on structs' pattern for provider access. - Load ClosureJsBinaryInfo from @rules_closure//closure/private:defs.bzl - Replace getattr(d, 'closure_js_binary', None) with ClosureJsBinaryInfo in d - Replace d.closure_js_binary.bin with d[ClosureJsBinaryInfo].bin
Contributor
Review Summary by QodoMigrate closure_js_binary provider access to modern Starlark API
WalkthroughsDescription• Migrate closure_js_binary provider access to modern Starlark API • Replace deprecated struct field access with ClosureJsBinaryInfo provider • Load ClosureJsBinaryInfo from @rules_closure//closure/private:defs.bzl • Fix Bazel 7+ compatibility in header.bzl File Changes1. javascript/private/header.bzl
|
Contributor
Code Review by Qodo
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the JavaScript Bazel Starlark rule implementation to use modern provider-based access for Closure JS binaries, avoiding deprecated struct-field access that no longer works in Bazel 7+.
Changes:
- Load
ClosureJsBinaryInfoand switch detection fromgetattr(d, "closure_js_binary", None)toClosureJsBinaryInfo in d. - Switch provider access from
d.closure_js_binary.bintod[ClosureJsBinaryInfo].bin.
AutomatedTester
pushed a commit
that referenced
this pull request
Apr 9, 2026
… API (#17317) Replace deprecated struct field access with the proper ClosureJsBinaryInfo provider in header.bzl. Bazel 7+ removed the legacy 'field syntax on structs' pattern for provider access. - Load ClosureJsBinaryInfo from @rules_closure//closure/private:defs.bzl - Replace getattr(d, 'closure_js_binary', None) with ClosureJsBinaryInfo in d - Replace d.closure_js_binary.bin with d[ClosureJsBinaryInfo].bin
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.
💥 What does this PR do?
Replace deprecated struct field access with the proper ClosureJsBinaryInfo provider in header.bzl. Bazel 7+ removed the legacy 'field syntax on structs' pattern for provider access.
🔧 Implementation Notes
This fixes local build in IntelliJ with the Bazel plugin