-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[bazel] Switch to custom closure_js_deps rule
#16571
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
base: trunk
Are you sure you want to change the base?
Conversation
After `rules_closure` 0.12.0, the `closure_js_deps` rule was removed and it was advised to use an `npm` invocation to generate the deps file. However, we still want to use the deps file as it makes it a lot easier to iterate on the atoms when we work on them. The obvious solution is to write our own implementation, which is what happens in this commit.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
diemol
left a comment
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.
Thank you.
User description
After
rules_closure0.12.0, theclosure_js_depsrule was removed and it was advised to use annpminvocation to generate the deps file. However, we still want to use the deps file as it makes it a lot easier to iterate on the atoms when we work on them. The obvious solution is to write our own implementation, which is what happens in this commit.PR Type
Enhancement, Tests
Description
Replace deprecated
rules_closureclosure_js_depswith custom implementationImplement custom Bazel rule using
google-closure-depsnpm packageAdd aspect-based transitive JS source collection from
closure_js_librarytargetsUpdate all BUILD files to import
closure_js_depsfrom custom implementationDiagram Walkthrough
File Walkthrough
3 files
Export custom closure_js_deps ruleImplement custom closure_js_deps rule with aspectsAdd closure_make_deps binary target2 files
Add google-closure-deps npm dependencyAdd google-closure-deps package lock entry8 files
Import closure_js_deps from custom implementationImport closure_js_deps from custom implementationImport closure_js_deps from custom implementationImport closure_js_deps from custom implementationImport closure_js_deps from custom implementationInclude javascript/atoms package.json in npm lockIgnore javascript/atoms node_modules directoryAdd javascript/atoms to workspace packages