-
Notifications
You must be signed in to change notification settings - Fork 521
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
Sourcemaps is broken after v3 upgrade #2520
Comments
Looks like it could be related to this comment? Can you try passing that flag to see if it fixes it? Then the real fix is to do as @alexeagle suggested; fix the source maps even without that flag. |
Thanks @joeljeske, adding
to |
adding this made the stack trace show .ts files
Note that we vendored a copy of the Perhaps we can just always turn this on, like we did in the case of the patched module resolver, I'll TAL |
We previously did this when patch_module_resolver was the default, because it had some extra (unrelated) logic at the end to install it. When we flipped the default in 3.0, we accidentally dropped the feature. This just reinstates it using the source-map-support/register feature. Similarly to our prior implementation, we just call our own vendored source-map-support so users don't have to think about it. Fixes bazel-contrib#2520
We previously did this when patch_module_resolver was the default, because it had some extra (unrelated) logic at the end to install it. When we flipped the default in 3.0, we accidentally dropped the feature. This just reinstates it using the source-map-support/register feature. Similarly to our prior implementation, we just call our own vendored source-map-support so users don't have to think about it. Also fix missing docs for npm_package_bin attrs stdout,stderr,exit_code_out Fixes bazel-contrib#2520
We previously did this when patch_module_resolver was the default, because it had some extra (unrelated) logic at the end to install it. When we flipped the default in 3.0, we accidentally dropped the feature. This just reinstates it using the source-map-support/register feature. Similarly to our prior implementation, we just call our own vendored source-map-support so users don't have to think about it. Also fix missing docs for npm_package_bin attrs stdout,stderr,exit_code_out Fixes #2520
🐞 bug report
Affected Rule
The issue is caused by the rule:
nodejs_binary
Is this a regression?
Yes, the previous version in which this bug was not present was: 2.3.1Description
After upgrading the rules_nodejs from
2.3.1
to3.2.2
the sourcemaps have stopped working. In case the program is throwing an error,Before:
After:
As you can see, before this upgrade, the file name displayed in logs is a
.ts
file and it points to original source, but after the upgrade, the logs contain reference to the compiled.js
file.🔬 Minimal Reproduction
Link to repo: https://github.com/mitul45/bazel-example
To see actual stack-trace, uncomment lines to use
rules_nodejs
v2.3.1
and downgrade@bazel/typescript
to2.3.1
(yarn upgrade @bazel/[email protected]
)🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
(Please check that you have matching versions between WORKSPACE file and
@bazel/*
npm packages.)Anything else relevant?
Nope
The text was updated successfully, but these errors were encountered: