Skip to content
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

refactor: rename npm_link_package_deps to npm_deps and npm_package_store_deps to npm_package_store_infos #1618

Closed
wants to merge 1 commit into from

Conversation

gregmagolan
Copy link
Member

@gregmagolan gregmagolan commented Apr 7, 2024

Improved naming for these so they are self-documenting.

Backward-compat handled in js_binary for the deprecated include_npm_linked_packages attribute.

@gregmagolan gregmagolan force-pushed the rjs2_npm_deps branch 2 times, most recently from f6652e9 to f487110 Compare April 7, 2024 23:09
@gregmagolan gregmagolan marked this pull request as ready for review April 7, 2024 23:10
@gregmagolan gregmagolan requested review from jbedard and alexeagle April 7, 2024 23:11
js/defs.bzl Show resolved Hide resolved
@@ -4,8 +4,8 @@ JsInfo = provider(
doc = "Encapsulates information provided by rules in rules_js and derivative rule sets",
fields = {
"declarations": "A depset of declaration files produced by the target",
"npm_linked_packages": "A depset of files in npm linked package dependencies of the target and the target's transitive deps",
"npm_package_store_deps": "A depset of NpmPackageStoreInfo providers from non-dev npm dependencies of the target and the target's transitive dependencies to use as direct dependencies when linking downstream npm_package targets with npm_link_package",
"npm_deps": "A depset of files in npm dependencies of the target and the target's transitive deps",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add the term deps here while removing it elsewhere? None of the other fields here use the term after changing npm_package_store_* from "deps" to "infos"...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It felt out of place on npm_package_store_deps. More reasoning on that here: #1620

npm_linked_packages doesn't seem like the right name either since the depset includes both linked package and transitive deps in the packages store.

Might be able to find something better than npm_deps. I'll open up another PR and we can bikeshed there.

@gregmagolan gregmagolan marked this pull request as draft April 8, 2024 01:08
@gregmagolan
Copy link
Member Author

gregmagolan commented Apr 8, 2024

Splitting these two renames into two PRs: #1620 & #1623

@gregmagolan gregmagolan closed this Apr 8, 2024
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.

2 participants