We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I noticed that the automatically populated --defines from closure_js_binary() are not being passed to the compiler after I upgraded my bazel version.
--defines
closure_js_binary()
Please note that is_using_closure_library should be True in the following example.
is_using_closure_library
True
ahochhaus@ahochhaus-pc:~/rules_closure$ git rev-parse HEAD 1eb589b4453bdb5b319f651bd614b05b753d0cd0 ahochhaus@ahochhaus-pc:~/rules_closure$ git diff diff --git a/closure/compiler/closure_js_binary.bzl b/closure/compiler/closure_js_binary.bzl index 41c7d48..86e54f1 100755 --- a/closure/compiler/closure_js_binary.bzl +++ b/closure/compiler/closure_js_binary.bzl @@ -43,6 +43,7 @@ def _impl(ctx): srcs, externs, tdata = collect_transitive_js_srcs(ctx) if not srcs: fail("There are no source files in the transitive closure") + print("is_using_closure_library: %s" % is_using_closure_library(srcs)) _validate_css_graph(ctx) language_in = determine_js_language(ctx, normalize=True) language_out = ctx.attr.language ahochhaus@ahochhaus-pc:~/rules_closure$ bazel build //closure/templates/test:greeter_test WARNING: /home/ahochhaus/rules_closure/closure/compiler/closure_js_binary.bzl:46:3: is_using_closure_library: False. INFO: Found 1 target... Target //closure/templates/test:greeter_test up-to-date: bazel-bin/closure/templates/test/greeter_test INFO: Elapsed time: 0.130s, Critical Path: 0.00s ahochhaus@ahochhaus-pc:~/rules_closure$ bazel version Build label: 0.3.1 Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Fri Jul 29 09:09:52 2016 (1469783392) Build timestamp: 1469783392 Build timestamp as int: 1469783392
However contains_file() functions correctly on bazel 0.2.3. Please note that is_using_closure_library is True (as expected) in the example below.
contains_file()
ahochhaus@ahochhaus-pc:~/rules_closure$ bazel version Build label: 0.2.3 Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Tue May 17 14:21:13 2016 (1463494873) Build timestamp: 1463494873 Build timestamp as int: 1463494873 ahochhaus@ahochhaus-pc:~/rules_closure$ bazel build //closure/templates/test:greeter_test WARNING: /home/ahochhaus/rules_closure/closure/compiler/closure_js_binary.bzl:46:3: is_using_closure_library: True. INFO: Found 1 target... Target //closure/templates/test:greeter_test up-to-date: bazel-bin/closure/templates/test/greeter_test INFO: Elapsed time: 66.174s, Critical Path: 35.26s
I believe the underlying cause is that File#short_path changed in bazel 0.3.0. bazelbuild/bazel#1462
That API change also caused a bug in rules_go. bazelbuild/rules_go#35
The text was updated successfully, but these errors were encountered:
Make contains_file() work across bazel versions (#132)
c29b38e
Fixed #130
Make contains_file() work across bazel versions (bazelbuild#132)
c7d3947
Fixed bazelbuild#130
d168182
No branches or pull requests
I noticed that the automatically populated
--defines
fromclosure_js_binary()
are not being passed to the compiler after I upgraded my bazel version.Please note that
is_using_closure_library
should beTrue
in the following example.However
contains_file()
functions correctly on bazel 0.2.3. Please note thatis_using_closure_library
isTrue
(as expected) in the example below.I believe the underlying cause is that File#short_path changed in bazel 0.3.0. bazelbuild/bazel#1462
That API change also caused a bug in rules_go. bazelbuild/rules_go#35
The text was updated successfully, but these errors were encountered: