-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
[Bug]: copy_data_files_to_bin (for gather_runfiles) depends on whether transpiler is set #411
Comments
I don't think we make this promise anywhere, though I can understand why it's unfortunate to make non-local changes when switching the transplier
Is this just saying you need a boolean attribute to be exposed in the public API to control It would be really great if you could find somewhere in our examples/e2e folder where you could reproduce the problem caused by your data files getting copied or not copied, and how the runfiles is involved, so we could study a bit more. |
Fair enough. Although this one was particularly confusing to me because I'd expect the
Yes, pretty much (and maybe, but IIUC for 2.0.0 it's already too late, make it the same default, independent of whether
TBH, I do not understand the specific effect this has on the runfiles tree (I shamefully admit that when it comes to runfiles, I just fiddle with relative paths until my code can find the files). The way I hit this issue is by depending on a filegroup: ts_project(
name = "test",
// stuff
data = [
"//other-package:files" // <-- filegroup target containing source files
],
) copy_to_bin will fail on To me, it feels this is reason enough to add the |
FWIW: if #717 get's accepted, all that needs to be done to fix this is remove Lines 428 to 429 in 6de1bc2
and set a normal default value for The tests in https://github.com/aspect-build/rules_ts/blob/6de1bc21b013988fe7476240778f27c5309d75ee/ts/test/copy_data_to_bin/BUILD.bazel will fail and need to be adjusted. |
What happened?
It seems that ts_project doesn't expose this config option yet and the defaults are different.
Without transpiler
data is passed to the
ts_project
rule here:rules_ts/ts/defs.bzl
Lines 406 to 412 in 42094e8
The
ts_project
rule invokesgather_runfiles
rules_ts/ts/private/ts_project.bzl
Lines 270 to 275 in 42094e8
The default for
copy_data_files_to_bin
isFalse
With transpiler
data is passed to
js_library
here:rules_ts/ts/defs.bzl
Lines 392 to 400 in 42094e8
The default for
js_library
isTrue
What I'd expect
transpiler
to be the same.js_library
onts_project
(the macro).Version
Development (host) and target OS/architectures:
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved: None.
How to reproduce
The text was updated successfully, but these errors were encountered: