-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compiled folder structure wrong when using folder link #10364
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
Comments
@vladima would you be able to take a look? |
this looks like another manifestation of the issue in #9552. |
I'm using Parallels with Shared Folders and I have symlinked my projects folder to c:\projects.
This happens for both npm packages and project files. |
@flts I'm seeing the same issue with Typescript 2.0.2 and 2.0.3 when using |
I'm facing same issues. It would be nice to have it working in next release. |
I was able to work around the problem,: basically the structure is like this:
each of the references to part of the trick (of this workaround) is that you need to make sure that none of the linked module dependencies are installed into the consuming project's folder. for me, this was accomplished by deleting everything under my entire hope that helps someone. good luck! |
I was able to reproduce this. mkdir shared
echo 'export const x = 0;' > shared/abc.ts
mkdir src; cd src
ln -s ../shared shared
echo 'import { x } from "./shared/abc"; x + 1;' > app.ts
echo '{ "compilerOptions": { "outDir": "bin" } }' > tsconfig.json
tsc
find bin -type f Produces:
I would expect just I also wrote a test case, but the test harness only seems to output 2 files. // @noImplicitReferences: true
// @traceResolution: true
// Test of GH#10364
// @filename: /shared/abc.ts
// @symlink: /src/shared/abc.ts
export const x = 0;
// @filename: /src/app.ts
import { x } from './shared/abc';
x + 1;
// @filename: /src/tsconfig.json
{
"compilerOptions": {
"outDir": "bin"
}
} |
TypeScript Version: 2.0.0 (on Windows)
Project structure
Code
And run cmd on Windows to create folder link:
Finally run compile command:
Expected behavior:
file structure in folder dist as below:
It works well on TypeScript@1.8.0,
and can't work after I updated it to 2.0.0.
Actual behavior:
Note that [shared] and [src] were placed at different with it on 1.8.0
The same problem on Linux
using command below to create folder link
The text was updated successfully, but these errors were encountered: