-
Notifications
You must be signed in to change notification settings - Fork 523
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
js_library: missing transitive dependencies for non-js files #3182
Comments
Thanks for all the details. The important bit here is that you use Looks like js_library has an edge case where the propagation misses these sources. |
TL;DR: non-js files packaged in
js_library
are lost when nested (e.g.ts_project
->js_library
->ts_project
->js_library
).Disclaimer:
Affected Rule
I think the issue is somewhere between
ts_project
andjs_library
. For some reason files such as images or text files are filtered when using nestedjs_library
s.Is this a regression?
I don't know, to be honest.
I noticed this error because we migrated a monorepo from
ts_library
tots_project
+js_library
. The expectation is that non-js files are passed down the dependency tree, but they are not.🔬 Minimal Reproduction
Repo: https://github.com/danielepolencic/bazel-transitive-demo
The repository has three modules that depend on each other
a -> b -> c
.index.ts
file and a{a,b,c}.txt
file.js_library
and passed on to the next dependent package.A + B (b.txt) + C (c.txt)
.You can execute
bazel run //packages/a:run
to require all packages and see their output concatenated.Unfortunately, it does not work.
The script fails because
c.txt
is not available.🔥 Exception or Error
The fix
I found that I can fix it by changing the
js_library
in theb
module to:The fix does not make sense to me.
ts_project
tojs_library
too?ts
files?🌍 Your Environment
Operating System:
Output of
bazel version
:The text was updated successfully, but these errors were encountered: