-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Shared external module causes compiler to lockup #5695
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 can you take a look |
@david-driscoll I've tried to repro it but with no luck however this sounds like a serious issue. Can you please share a self contained repro so we can address it properly? |
Sure, I can recreate it on demand with my current solution, so I'll try zipping it up and double checking it still fails, then post a link. |
thanks! |
So creating a zip failed to extract if you're on windows (like myself) because of long paths. I've created a batch file that will setup the scenario, of course feel free to review it for an malicious code. It's just pulling down a few git repos, running npm install for those repos and setting up the same symlinks. |
I can see what is going on. Good news is that is not not related to module resolution - all files are resolved without any issues. The issue is that from compiler perspective it sees two different set of typings for RxJS: one in |
@vladima any traction on this issue, still seems to be a problem. Any proposed work arounds perhaps? |
@david-driscoll TypeScript compiler currently does not follow symlinks so in your scenario it views RxJS in
|
I am having the exact same issue with It doesn't like it when I symlink the core package into my plugin package because rxjs occurs in both paths To me it seems that TypeScript could just look in |
#8486 have added ability to follow symlinks during module resolution . Script this change should already be available in nightly builds, managed part and version of |
I have a very strange issue that I've finally figured out the cause of, as it's really very strange.
It appears that if there is a dependency, that exists in two locations, and it defines typings as
external
, thentsc
gets confused and cannot reason about them both.Setup
tsc
as well.My folder structure looks like:
c:\Dev\Omnisharp\omnisharp-atom
\node_modules\omnisharp-client
symlink toc:\Dev\Omnisharp\omnisharp-node-client
\node_modules\@reactive\rxjs
symlink toc:\Dev\reactivex\RxJS
c:\Dev\Omnisharp\omnisharp-node-client
\node_modules\@reactive\rxjs
symlink toc:\Dev\reactivex\RxJS
c:\Dev\reactivex\RxJS
Everything is typically working great, I'm working on typings for RxJS 5.0, and updating
omnisharp-client
without issue.When I got to
omnisharp-atom
an issue revealed itself, if I defineObservable<T>
as a return type for a method, with the above setup, thentsc
get's confused and fails to compile. It gets into some sort of infinite loop.Working
If I update things so that they look like:
c:\Dev\Omnisharp\omnisharp-atom
\node_modules\omnisharp-client
(no symlink)(removed)\node_modules\@reactive\rxjs
\node_modules\@reactive\rxjs
symlink toc:\Dev\reactivex\RxJS
Then everything is happy and works as expected.
Without symlinks
If I update things so that they look like:
c:\Dev\Omnisharp\omnisharp-atom
\node_modules\omnisharp-client
(no symlink)\node_modules\@reactive\rxjs
(symlink or non-symlink)\node_modules\@reactive\rxjs
symlink toc:\Dev\reactivex\RxJS
Then
tsc
fails to operate and will sit and consume CPU forever until it is killed.The text was updated successfully, but these errors were encountered: