bazelbuild / bazelbuild/rules_closure

Missing source maps for closure_js_test

Open
#356 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
159
Forks
111
PR merge metrics
No merged PRs in 30d

Description

Hi. First off, I'm not sure if this is related to #16 or #193, so I'm opening a new issue.

I'm finding that for the `closure_js_test` rule in https://github.com/michaelfig/tink/blob/jstest/javascript/BUILD.bazel#L214

when I run the following from the toplevel `tink` directory, it fails with:

```
Michael-Macbook-655:tink michael$ bazel test javascript:test_lib_registry
INFO: Analysed target //javascript:test_lib_registry (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
FAIL: //javascript:test_lib_registry (see /private/var/tmp/_bazel_michael/6de72905b448fffc7be7652a860
e4346/execroot/tink/bazel-out/darwin-fastbuild/testlogs/javascript/test_lib_registry/test.log)
Target //javascript:test_lib_registry up-to-date:
bazel-bin/javascript/test_lib_registry
INFO: Elapsed time: 5.330s, Critical Path: 5.13s
INFO: 2 processes: 1 darwin-sandbox, 1 local.
INFO: Build completed, 1 test FAILED, 2 total actions
//javascript:test_lib_registry FAILED in 5.1s
/private/var/tmp/_bazel_michael/6de72905b448fffc7be7652a860e4346/execroot/tink/bazel-out/darwin-fastbuild/testlogs/javascript/test_lib_registry/test.log

INFO: Build completed, 1 test FAILED, 2 total actions
```

Okay, no problem, I have a failed test.

What makes things difficult is the lack of source maps, so I get stack traces with something like:
```
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //javascript:test_lib_registry
-----------------------------------------------------------------------------
Listening http://localhost:57849/index.html
Serving /index.html
Serving /filez/io_bazel_rules_closure/closure/testing/phantomjs_jsunit_runner.js
Serving /filez/tink/javascript/test_lib_registry_bin.js
[...]
01:36:56.134 : Running test: testRegisterPrimitiveWrapper_overwritingWithDifferentClass
-> $module$exports$tink$Registry$registerPrimitiveWrapper$$@http://localhost:53490/filez/tink/javascript/test_lib_registry_bin.js:3084:49
-> testRegisterPrimitiveWrapper_overwritingWithDifferentClass@http://localhost:53490/filez/tink/javascript/test_lib_registry_bin.js:5813:59
[native code]
$$JSCompiler_prototypeAlias$$$$invokeFunction_$$@http://localhost:53490/filez/tink/javascript/test_lib_registry_bin.js:5219:50
$$JSCompiler_prototypeAlias$$$$safeRunTest_$$@http://localhost:53490/filez/tink/javascript/test_lib_registry_bin.js:5206:32
$$JSCompiler_prototypeAlias$$$$safeRunTest_$$@[native code]
$goog$testing$Continuation_$run$$@http://localhost:53490/filez/tink/javascript/test_lib_registry_bin.js:5501:96
```

etc.

I would have thought that rules_closure would make source maps Just Work, so I'm looking for advice on how to enable them, or what we can fix in rules_closure to make this work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.