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

Transitive dependencies aren't built with swc_transpiler #25

Closed
Nick-Mazuk opened this issue Apr 14, 2022 · 1 comment · Fixed by #27
Closed

Transitive dependencies aren't built with swc_transpiler #25

Nick-Mazuk opened this issue Apr 14, 2022 · 1 comment · Fixed by #27

Comments

@Nick-Mazuk
Copy link
Contributor

Let's say I have 3 packages where:

  • package-a depends on package-b
  • package-b depends on package-c
  • package-c has no dependencies

And each of these are defined with swc_transpiler, for instance:

swc_transpiler(
    name = 'package-a',
    srcs = ['index.ts'],
    data = [
        "//package-b",
    ],
    visibility = ["//visibility:public"],
)

Running…

bazel build //package-a

…will not build package-c.

Here's a minimal reproduction: https://github.com/Nick-Mazuk/bazel-swc-deps

@alexeagle
Copy link
Member

That's not actually the bug, there's no reason that the default output of package-a (the .js files) would require that bazel build package-b or package-c. Bazel only does the minimal work required to produce the outputs you request.

However, the issue you posted in slack was that a program which depends on A shouldn't be forced to declare dependencies on B or C in order to get those .js files in its runfiles tree.

alexeagle added a commit that referenced this issue Apr 18, 2022
alexeagle added a commit that referenced this issue Apr 18, 2022
alexeagle added a commit that referenced this issue Apr 18, 2022
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 a pull request may close this issue.

2 participants