You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Goto-definition combined with .d.ts.map file produces location past the end of the file #24866
Is the problem that the generated sourcemaps is wrong or that we are capable of returning a position beyond the file's bounds when an invalid sourcemap is present?
Andy (Andrewkraft) (@Andy-MS) So it's worth noting that while we "fixed" your test, it's still entirely possible for us to return a position outside the bounds of a file for the end of a span we return (though probably much less likely now, since every identifier is actually sourcemapped). Do we need to guard against that anywhere?
Activity
weswigham commentedon Jun 11, 2018
Is the problem that the generated sourcemaps is wrong or that we are capable of returning a position beyond the file's bounds when an invalid sourcemap is present?
weswigham commentedon Jun 11, 2018
There is! Some of the declaration map tests make use of it.
weswigham commentedon Jun 12, 2018
I'm going to hazard a guess that #24886 fixed this.
weswigham commentedon Jun 15, 2018
And we haven't done an lkg but only use light to build, so the change can't be seen in our own project yet.
weswigham commentedon Jun 15, 2018
This fourslash test does it
weswigham commentedon Jun 15, 2018
Andy (Andrewkraft) (@Andy-MS) I'm seeing it go the the right file, but what looks like at least one declaration too far:
Although what you're seeing is what happens when the language server is
vscode's builtin2.9.1, instead of a more recent build with #24886 in.weswigham commentedon Jun 27, 2018
Andy (Andrewkraft) (@Andy-MS) So it's worth noting that while we "fixed" your test, it's still entirely possible for us to return a position outside the bounds of a file for the end of a span we return (though probably much less likely now, since every identifier is actually sourcemapped). Do we need to guard against that anywhere?