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

[FR]: ability to exclude subsets of fetched npm packages #2042

Open
jbedard opened this issue Dec 17, 2024 · 1 comment
Open

[FR]: ability to exclude subsets of fetched npm packages #2042

jbedard opened this issue Dec 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jbedard
Copy link
Member

jbedard commented Dec 17, 2024

What is the current behavior?

Many packages ship with unnecessary content such as tests, test data etc that must then be copied throughout actions.

Describe the feature

An API to enable excluding files from the package target so they don't get copied around within bazel.

The excluding would most likely be done post-extraction to ensure the package on disk is the exactly as downloaded, only the bazel targets wrapping that package will contain the exclusions.

@jbedard jbedard added the enhancement New feature or request label Dec 17, 2024
@alexeagle
Copy link
Member

alexeagle commented Dec 18, 2024

As an example, 295efe3 shows how to exclude from a package using lifecycle hooks. Was needed to workaround this error:

ERROR: /workspaces/rt_development/BUILD.bazel:6:22: Running lifecycle hooks on npm package [email protected]_t2g22a3cflk65wz3kqpekiolbu failed: error traversing directory '@@aspect_rules_js~~npm~npm_deps__nodegit__0.28.0-alpha.11__t2g22a3cflk65wz3kqpekiolbu//:package': Error while traversing directory package/vendor/libgit2/tests/resources/status: /home/rt_user/.cache/bazel/_bazel_rt_user/d851f08fd6ebe652ee1e63dd37aa0d3d/external/aspect_rules_js~~npm~npm_deps__nodegit__0.28.0-alpha.11__t2g22a3cflk65wz3kqpekiolbu/package/vendor/libgit2/tests/resources/status/这 (No such file or directory)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants