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

feat: add dev_deps attribute to js_library #818

Closed
wants to merge 1 commit into from
Closed

Conversation

gregmagolan
Copy link
Member

@gregmagolan gregmagolan commented Jan 24, 2023

Inspired by aspect-build/rules_ts#280.

Addresses aspect-build/rules_ts#268.

Will require a MINOR release after this lands as this changes the default behaviour of deps. Still needs some tests.

@gregmagolan gregmagolan marked this pull request as ready for review January 24, 2023 09:35
js/private/js_library.bzl Outdated Show resolved Hide resolved
providers = [JsInfo],
),
"dev_deps": attr.label_list(
doc = """Development dependencies of this target.
Copy link
Member

Choose a reason for hiding this comment

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

"development" means compile-time but not runtime? Is there a better term for that? :/

Copy link
Member Author

@gregmagolan gregmagolan Jan 24, 2023

Choose a reason for hiding this comment

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

npm docs say "devDependencies": Packages that are only needed for local development and testing." tho that doesn't translate over perfectly to rules_js.

That is the idea, however, when it comes propagating deps through the linker. My thinking is to use a term that the js ecosystem is already familiar with. "compile-time" is not quite right either since the deps are propagated to downstream ts_project targets; just not to runfiles or as transitive deps of downstream linked npm_package targets.

@gregmagolan gregmagolan force-pushed the npm_dev_deps branch 2 times, most recently from 8bc65eb to f335efd Compare January 26, 2023 21:12
@gregmagolan
Copy link
Member Author

gregmagolan commented Feb 10, 2023

We may add this in the future for even more fine-grained control of what gets propagated to the linker but for now we're going to go with #860

@gregmagolan gregmagolan deleted the npm_dev_deps branch February 22, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants