Skip to content

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

Closed
@kayahr

Description

@kayahr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions