-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
VSCode doesn't respect sourceRoot in declarationMaps #25322
Comments
@michaelaird what command line options are you compiling with (your tsconfig and/or command line settings) when you're using |
When I compile from the command line using tsc I’m only using -p to point
at the tsconfig file.
I think the issue is VSCode ignoring sourceRoot. Not the difference in
output.
(edited because autocorrect on my phone converted tsconfig to "taco gig" :) )
|
Hmmmmm the only differences I see are that we set AFAIK these should function identically. - in both cases applying the sourceRoot to the sourcemaps's dir and joining the filename should yield the same final path. If anything, But anyway - I think I'm going to need more to reproduce your issue; both of those sourcemaps should work fine. Also it'd be nice if you could check if the issue still repros when you use |
I am seeing the same problem with TS 2.9.2, the sourcemaps for *.d.ts files, generated by gulp-sourcemaps are unusable in VS Code (latest insiders), since the navigation is completely disabled. In the latest TS@next, the navigation is restored, but I end up in the *.d.ts file, NOT the actual *.ts file. The difference between the tsc's generated maps and the ones generated via gulp-sourcemaps, is that:
So, the end-result should be the same, but it is not, VS Code properly works with the first version. |
@weswigham I can share a small repro project. where should I send it? |
If public, here. Failing that, mhegazy at Microsoft dot com is a decent option. In any case, in pretty sure I know the issue. In |
@weswigham I sent a small repro to @mhegazy . Edit: attaching the repro here because MS's email server is too smart. |
This still fails when project references are used. Here's a repro: |
@weswigham can you take a look |
@michaelaird The |
Yep. you're right. i'll fight with gulp-sourcemaps to sort out the relative paths. sorry about the false alarm! |
@michaelaird have you figured out how to get |
TypeScript Version: 2.9.2
I'm running into an issue when building declaration maps with gulp-typescript/gulp-sourcemaps.
the output of gulp-sourcemaps does this:
where the output of tsc does this:
Expected behavior:
VSCode should respect sourceRoot and find the source code
Actual behavior:
VSCode can't find the declaration when navigating.
I can provide a simple repro if needed.
Note
In VSCode, when you try to navigate it does nothing. In VS 15.8.0 Preview 3 it navigates to the d.ts file.
The text was updated successfully, but these errors were encountered: