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

configFileDiag not returning errors for missing project reference path #25741

Closed
mjbvz opened this issue Jul 17, 2018 · 2 comments
Closed

configFileDiag not returning errors for missing project reference path #25741

mjbvz opened this issue Jul 17, 2018 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jul 17, 2018

TypeScript Version: 3.0.1-insider.20180713

Search Terms:

  • tsconfig
  • configFileDiag
  • tsserver

Code
Create a simple tsconfig that references a non-existant project path:

{
    "references": [
        {
            "path": "./no-such-tsconfig.json"
        }
    ]
}

Save the file and see a configFileDiag response from tsserver

Expected behavior:
configFileDiag returns a diagnostic for the invalid path

Actual behavior:
No diagnostics are returned

Let me know if there is another way we are supposed to be getting diagnostics for config file issues.

Related Issues:

@mhegazy mhegazy added the Bug A bug in TypeScript label Jul 17, 2018
@mhegazy mhegazy added this to the TypeScript 3.1 milestone Jul 17, 2018
@sheetalkamat
Copy link
Member

These errors are reported as compilerOptions diagnostics just like when having tsconfig.json as:

{ "compilerOptions": {
    "allowJs": true,
"declaration": true
}
}

will report errors

tsconfig.json:2:5 - error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.

2     "allowJs": true,
      ~~~~~~~~~

tsconfig.json:3:1 - error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.

3 "declaration": true
  ~~~~~~~~~~~~~

You need to be calling semanticDiagnosticsSync on configFile when project is open to get these errors.

@mhegazy
Copy link
Contributor

mhegazy commented Jul 20, 2018

@sheetalkamat should not this be in ConfigFileDiagnosticEvent instead? VSCode does not use any of the sync APIs and nor should they. I think we either need to send the errors back in the event or in the getErr command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants