Skip to content

TSServer broken with path mappings & empty include #10321

@DanielRosenwasser

Description

@DanielRosenwasser

TypeScript Version: 2.1.0-dev.20160812

After having played around with this issue, the smallest repro I can come up with is to use at least one path mapping entry, and one glob that doesn't reference anything that exists on disk in the include field.

Repro Steps

First, set up a project.

image

./src/component/hello.ts

export interface Hi {
    hi: number;
}

tsconfig.json

{
    "compilerOptions": {
        "module": "commonjs",
        "outDir": "./built",
        "baseUrl": ".",
        "paths": {
            "*": ["*"]
        }
    },
    "include": [
        "src/**/*",
        "wat/**/*"
    ]
}

Now try to get quick info somewhere in hello.ts.

Expected: quick info!
Actual: The following stack trace is what I get (with the changes in #10318)

Response received: quickinfo (2). Request took 0 ms. Success: false . Message: Error processing request. No Project.
Error: No Project.
    at Object.Errors.NoProject (C:\Users\drosen\TypeScript2\built\local\tsserver.js:60501:53)
    at IOSession.Session.getQuickInfo (C:\Users\drosen\TypeScript2\built\local\tsserver.js:61063:34)
    at Session.handlers._a.(anonymous function) (C:\Users\drosen\TypeScript2\built\local\tsserver.js:60555:50)
    at IOSession.Session.executeCommand (C:\Users\drosen\TypeScript2\built\local\tsserver.js:61452:28)
    at IOSession.Session.onMessage (C:\Users\drosen\TypeScript2\built\local\tsserver.js:61469:35)
    at Interface.<anonymous> (C:\Users\drosen\TypeScript2\built\local\tsserver.js:63830:27)
    at emitOne (events.js:90:13)
    at Interface.emit (events.js:182:7)
    at Interface._onLine (readline.js:211:10)
    at Interface.<anonymous> (readline.js:341:12)

However, tsc will handle the project just fine.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions