Repository navigation
Output directory messed up if tsc is triggered as VS Code task. #8837
Description
Activity
Possibly related to microsoft/vscode#6719 ?
- addedBugA bug in TypeScriptA bug in TypeScriptNeeds More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarified
on Jun 7, 2016 Zhengbo Li (@zhengbli) any thoughts?
Seems to be a VSCode task runner issue with node v6, the same as microsoft/vscode#6719. Running tsc from command line doesn't repro the error.
- addedExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
on Jun 8, 2016 The regression occurs in the cd1af12 commit.
This (L590, program.ts) seems to be the offending change. It changes the capitalisation of the Windows drive letter (lower to upper in the case of microsoft/vscode#6719).
When run from the command line, the drive letter is already capitalised and stays capitalised.
Evidence that Carl (@Seikho) has identified the problem.
After further digging, it's a change from Node v5 to Node v6 in the behaviour of
fs.realpathwhich is used in L547 sys.ts.In node v5:
$ node > process.version 'v5.11.1' > require('fs').realpathSync('c:\\projects') 'c:\\projects' >In node v6:
$ node > process.version 'v6.2.0' > require('fs').realpathSync('c:\\projects') 'C:\\projects' >Reacted by Troy GerwienZhengbo Li (@zhengbli) could the 'external' tag be removed, and this be dealt with in TypeScript? See microsoft/vscode#6719 (comment).
EDIT: See also comment from node.js contributor about this: nodejs/node#6624 (comment)
Important observations from microsoft/vscode#6719:
- make sure the symlink code works with drive letters created with subst as well. I have such a setup where I mapped C:\users\dirkb\projects => P:\ and this seems to fail with the latest build TS with wired error messages. See comment: Strange build behaviour building TypeScript from VSCode with Node v6 on Windows vscode#6719 (comment)
- there seems to be issue with drive letter in node 6.x: See On Windows, Node can be inconsistent in what case builtin functions use for drive letters nodejs/node#6624
- removedExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
on Jun 10, 2016 Carl (@Seikho) Thanks for the finding! The issue should be able to address from TypeScript side.
Zhengbo Li (@zhengbli) shouldn't this be addressed in 2.0. It works in 1.8.x and is broken in @next. I am asking since it is tagged for 2.1
Reacted by Troy Gerwien, vilicvane and mihailikFixing in @next would be great - We've had to disable the VSCode build task for all our affected projects since this surfaced, which is a minor hassle but still a hassle.
- removedNeeds More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarified
on Jun 16, 2016 - addedFixedA PR has been merged for this issueA PR has been merged for this issue
on Jun 20, 2016 - locked and limited conversation to collaborators
on Jun 19, 2018
This only happens if tsc is executed via Code.
TypeScript Version:
nightly (1.9.0-dev.20160525-1.0)
Code
.vscode/tasks.json
tsconfig.json
src/foo/bar.ts
src/biu/pia.js
// Empty file.Expected behavior:
Compiles correctly.
Actual behavior:
And if you put another .ts file and import it in
src/foo.bar.ts, it would be output as .js file nested to its .ts source.