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

Not possible to resolve sub dependencies for local packages #548

Closed
Chronojam opened this issue Feb 14, 2019 · 1 comment
Closed

Not possible to resolve sub dependencies for local packages #548

Chronojam opened this issue Feb 14, 2019 · 1 comment

Comments

@Chronojam
Copy link
Contributor

Chronojam commented Feb 14, 2019

🚀 feature request

#232 Related

Relevant Rules

nodejs_binary

Description

Consider a repo:

node/
  - services/
    - service-{a}
  - packages/
    - package-{b}

Service A depends on @npm//foo and Package B;
Package B depends on @npm//bar

service-a:binary :

nodejs_binary(
  name = "service-a",
  deps = [
    "@npm//foo",
    "//node/packages/package-b:bundle",
  ]
*snip*

package-b:bundle, has a bunch of rules that output a tree something like

  bazel-genfiles/node/packages/package-b/lib/index.js
  bazel-genfiles/node/packages/package-b/node_modules/bar/{things}.js

the module resolver is now unable to resolve @npm//bar for any modules in package-b, they must be explictly listed as deps in service-a.

nodejs_application(
  name = "service-a",
  deps = [
    "@npm//foo",
    "@npm//bar",
    "//node/packages/package-b:bundle",
  ]

Describe the solution you'd like

It'd certainly be nice if @npm//bar in this example could be resolved in some way without explictly listing it twice.
But im not sure what the best approach would be.

Describe alternatives you've considered

You can use course-grained deps, or list all subdependencies of a local package

@Chronojam
Copy link
Contributor Author

Sorry, appears to be a duplicate of #443 , closing

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

No branches or pull requests

1 participant