-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Relative paths in the coverage file are in violation of istanbul spec #110
Comments
Are these introduced by the source map path rewrite? |
No, we pass It won't be an issue until someone tries to combine with coverage generated outside of |
Let's punt on the issue until the caching PR is merged. I don't want to rebase that again |
Maybe a related issue? |
Got the same issue as @riophae : absolute path added after local dir. That's weird (something like |
Getting this issue when trying to report coverage to coveralls. Does my full absolute path twice, so my actual path is |
The same with @qasim |
@novemberborn I wonder if some of the fixes for paths outside the working directory might have made this problem more prevalent? |
I can't really remember but I think I was doing something wrong, cause I don't have this issue anymore. |
I don't think so…? In any case just did #164. @riophae @qasim could you try with that branch? @MoOx the change to absolute paths should have fixed an issue with source map sources being absolute and not being resolved correctly against the relative coverage report. If you manage to reproduce the problem could you try with #164? |
@novemberborn fixed with that branch 👍 |
fixed! |
I'm still seeing this bug with remap-istanbul 0.11.0. Specifically, we have our gulp target generate sourcemaps using gulp-sourcemaps (2.6.4) and a remapping function to put "../../src" in them (which is the path from the built file back to its source map). For example, we have a file at FULLPATH/src/util.ts, which generates JS at FULLPATH/build/src/util.js. In the .map file I see "sourceRoot":"../../src" correctly noted. However, if I run remap-istanbul to generate the HTML coverage using: cat coverage/coverage-final.json | ./node_modules/.bin/remap-istanbul --output html-report --type html I get exceptions like:
Note that if I switch our sourcemaps to generate absolute paths for sourceRoot ("sourceRoot"="/FULLPATH/src") instead, everything works, except that those .map files will only ever work on my personal machine (or another which happens to have the repo cloned to the same path). Did this bug surface again, or is this separate from the previously reported 2016 issue? |
The istanbul spec calls for absolute paths, but we pass in relative ones. This is not just a nit, it causes real problems.
The text was updated successfully, but these errors were encountered: