Skip to content
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

Multiple projects linked by npm link do not compile properly within vscode #9585

Closed
kayahr opened this issue Jul 9, 2016 · 0 comments
Closed
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@kayahr
Copy link

kayahr commented Jul 9, 2016

TypeScript Version: 2.0.0-dev.20160707
VSCode Version: 1.3.0
OS Version: Debian GNU/Linux 8.5

This issue is related to #6365 which is fixed in TypeScript 2.0 but for some reason it can still be reproduced in vscode configured to use TypeScript 2.0.

Steps to reproduce:

  1. Globally install TypeScript 2.0 with "npm install -g typescript@next"

  2. Install vscode 1.3.0

  3. Configure vscode to use the globally installed TypeScript 2.0 by setting the typescript.tsdk path in the user settings.

  4. Unpack the projects.zip
    archive somewhere.

  5. Run npm link in projects/base.

  6. Run npm link base in projects/ui.

  7. Run npm link in projects/ui.

  8. Run npm link base in projects/application.

  9. Run npm link ui in projects/application.

  10. Run tsc in projects/application and notice that it compiles correctly.

  11. Now open projects/application in vscode and open the file src/main/Impl.ts. The following error is displayed:

    Class 'TestImpl' incorrectly implements interface 'Test'.
      Types of property 'getPoint' are incompatible.
        Type '() => Point' is not assignable to type '() => Point'.
          Type 'Point' is not assignable to type 'Point'.
            Types have separate declarations of a private property 'x'.
    
  12. Press Ctrl-Shift-B to compile the project with the command line compiler. The error disappears.

  13. Edit the file (inserting a whitespace for example) and the error re-appears.

So while the project compiles fine on the command line (Running tsc directly) it doesn't compile within vscode which uses the exact same compiler.

Here is a screenshot of the error message:

screenshot

@mhegazy mhegazy added the Bug A bug in TypeScript label Jul 19, 2016
@mhegazy mhegazy added this to the TypeScript 2.0.1 milestone Jul 19, 2016
@mhegazy mhegazy assigned ghost Jul 19, 2016
@ghost ghost closed this as completed in #10068 Aug 1, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 7, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants