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

Regression: Multiple projects linked by npm link do not compile properly within vscode #12080

Closed
kayahr opened this issue Nov 7, 2016 · 5 comments

Comments

@kayahr
Copy link

kayahr commented Nov 7, 2016

TypeScript Version: 2.0.6, 2.0.7 and 2.1.0-dev.20161107
VSCode Version: 1.7.1
OS Version: Debian GNU/Linux 8.6

This is a regression of #9585. The original problem was fixed in TypeScript 2.0.2 but since 2.0.6 the problem is back. Here is a copy of the reproduction instructions which are still correct (But I haven't made a new screenshot because it would just show the same error with a different TypeScript version):

Steps to reproduce:

  1. Globally install TypeScript (Current is 2.0.7) with "npm install -g typescript"

  2. Install latest vscode (Current is 1.7.1)

  3. Configure vscode to use the globally installed TypeScript 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

@kayahr kayahr assigned ghost Nov 7, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Nov 7, 2016

@andy-ms can you take a look.

@ghost
Copy link

ghost commented Nov 7, 2016

@kayahr, just to be sure, could you test this out on your computer with tomorrow's build?

@kayahr
Copy link
Author

kayahr commented Nov 8, 2016

Yes, it works with 2.1.0-dev.20161108. In 2.0.8 it is still broken. Will this fix be merged into the release branch so it will land in 2.0.9?

@mhegazy
Copy link
Contributor

mhegazy commented Nov 8, 2016

The fix will be in the final release of TypeScript 2.1

@kayahr
Copy link
Author

kayahr commented Nov 9, 2016

No chance to get this fix in 2.0? It was fixed before for 2.0.2 and now its broken again which means we are stuck at 2.0.2 until 2.1 is released.

@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants