Skip to content

Projects with "useSingleInferredProject"=false are disconnected from Configured Project randomly #14838

Closed

Description

  1. Create two files "foo.ts" and "bar.ts"
    foo.ts
    export class Bar {}
    bar.ts
    import {Bar} from "./foo"

  2. Create the tsconfig:
    { "exclude": [ "bar.ts"] }

  3. Start tsserver with the option useSingleInferredProject=false

  4. Open "bar.ts" file. The file will be connected to "Configured Project" with the tsconfig.json

  5. Open "foo.ts" file. The file will be connected to "Inferred Project". The file "bar.ts" will be connect to the "Inferred Project" also (it is ok) but the file "bar.ts" will be disconnected from the "Configured Project" and it is very unexpected behaviour.

I found the cause:
Here: Link to code
definitely must be isRootFileInInferredProject(f) instead of isRootFileInInferredProject(info)

Activity

  1. zhengbli commented on Apr 7, 2017

    @zhengbli

    Andrey Starovoyt (@anstarovoyt) thanks for the find! I just found the cause as well and searched the issues then found your post :)

  2. added
    Fixed
    on Apr 11, 2017
  3. locked and limited conversation to collaborators on Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions