-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(esbuild): make Starlark build settings usable as defines #3122
Conversation
cad446f
to
1b5c582
Compare
The buildkite build fails for the examples since they explicitly reference |
There's a bit of magic, the integration test runner replaces those versions with the |
1b5c582
to
a602a21
Compare
The version of skylib fetched in |
Is there a way to get the testlogs of the inner Bazel execution in an e2e test? The Windows test fails at |
Adds a `define_settings` attribute to the `esbuild` rules that allows using the values of Starlark build settings to globally replace specified identifiers. The value of the setting is automatically converted to a JS literal. Note: This currently uses json.encode, which is only available from Bazel 5 on. If this addition is generally viewed favorably, I would look into "polyfilling" this functionality in Starlark.
a602a21
to
5c47fe3
Compare
I noticed that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Adds a `define_settings` attribute to the `esbuild` rules that allows using the values of Starlark build settings to globally replace specified identifiers. The value of the setting is automatically converted to a JS literal. Note: This currently uses json.encode, which is only available from Bazel 5 on. If this addition is generally viewed favorably, I would look into "polyfilling" this functionality in Starlark.
Adds a
define_settings
attribute to theesbuild
rules that allows using the values of Starlark build settings to globally replacespecified identifiers.
The value of the setting is automatically converted to a JS literal.
Note: This currently uses json.encode, which is only available from Bazel 5 on. If this addition is generally viewed favorably, I would look into "polyfilling" this functionality in Starlark.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #3113
What is the new behavior?
The existing
esbuild
rule now has thedefine_settings
attribute described in the issue.Does this PR introduce a breaking change?
Other information