Skip to content

TSServer: config file diagnostics event not sent if config file changes #10473

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

Closed
dbaeumer opened this issue Aug 22, 2016 · 19 comments
Closed

TSServer: config file diagnostics event not sent if config file changes #10473

dbaeumer opened this issue Aug 22, 2016 · 19 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@dbaeumer
Copy link
Member

TypeScript Version: 2.0.0
Code
tsconfig.json

{
    "compilerOptions": {
        "module": "commonjs",
        "aaa": 10
    }
}

The server sends and event

Event received: configFileDiag (0).
Data: {
    "triggerFile": "p:/mseng/VSCode/Playgrounds/ts-2.0/test.ts",
    "configFile": "p:/mseng/VSCode/Playgrounds/ts-2.0/tsconfig.json",
    "diagnostics": [
        {
            "text": "Unknown compiler option 'aaa'."
        }
    ]
}

which is correct. Fix the error in the tsconfig.json and save.

Observe: no configFileDiag update is sent. We either need an event to reqeuest configFileDiag or it should automatically happen when the tsconfig.json file is saved and recognized by the server.

@mhegazy
Copy link
Contributor

mhegazy commented Aug 22, 2016

should be handled by #10418

@mhegazy mhegazy added the Bug A bug in TypeScript label Aug 22, 2016
@mhegazy mhegazy added this to the TypeScript 2.0.1 milestone Aug 22, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Aug 22, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Aug 22, 2016

the fix should be in the nightly today

@mhegazy mhegazy closed this as completed Aug 22, 2016
@dbaeumer
Copy link
Member Author

@mhegazy I tested this today with TS 2.0.3 and this is still not working. An error is reported once and even if I change and save the tsconfig.json the errors are not rechecked.

@dbaeumer dbaeumer reopened this Sep 26, 2016
@dbaeumer
Copy link
Member Author

@mhegazy would it be possible to fix this for 2.0.5

@mhegazy mhegazy removed the Fixed A PR has been merged for this issue label Sep 26, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Sep 26, 2016

@zhengbli can you take a look? this should have been fixed already?

@dbaeumer
Copy link
Member Author

@mhegazy sorry for the swirl. Made a mistake during debugging. Will check and and reopen if it is really still an issue.

@dbaeumer
Copy link
Member Author

OK. Now I see. The triggerFile is in that case tsconfig.json which I need to handle differently.

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 26, 2016
@dbaeumer
Copy link
Member Author

@mhegazy @zhengbli there is still a problem. When an error exist, you fix it and save the tsconfig.json file no notification is sent that no errors exists anymore. The server only sends if errors exists. To clear the error list I need a notification in the no error case as well.

@zhengbli
Copy link
Contributor

I have a fix locally, will send out an PR once the merge between master and release-2.0.5 at #11197 is done so I don't need to repeat that effort.

@mhegazy mhegazy removed this from the TypeScript 2.0.5 milestone Oct 5, 2016
@zhengbli zhengbli added the Fixed A PR has been merged for this issue label Oct 10, 2016
@dbaeumer
Copy link
Member Author

Please see: #11615

@dbaeumer
Copy link
Member Author

When will this land in 2.0.6 ?

@zhengbli
Copy link
Contributor

This should go with the next release, as it has already been ported to the release branch (release-2.0.5). @mhegazy may know better about the release schedule.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 17, 2016

We will publish an insider drop today.

@dbaeumer
Copy link
Member Author

I tested this again on 2.0.9 and this is still not working. Here is what I do:

  • create a tsconfig.json with an invalid property
  • open a TS file which activates the tsconfig.json
  • you correctly get an error
  • change the wrong property to another invalid property name

Observe: you don't get an event informing you about the new invalid property name

  • change the property name to a valid property name

Observe: you don't get an event informing you that no error exists

@dbaeumer dbaeumer reopened this Nov 15, 2016
@dbaeumer
Copy link
Member Author

@mhegazy @zhengbli can you please have a look

@dbaeumer
Copy link
Member Author

If you close and reopen the TS file then the tsconfig.json gets revalidated.

@mhegazy mhegazy modified the milestones: TypeScript 2.1.3, TypeScript 2.0.6 Nov 15, 2016
@mhegazy mhegazy removed the Fixed A PR has been merged for this issue label Nov 17, 2016
@zhengbli
Copy link
Contributor

This should be fixed in master now, @dbaeumer can you give it a try? thanks

@zhengbli zhengbli added the Fixed A PR has been merged for this issue label Nov 22, 2016
@alex-kinokon
Copy link

Is this supposed to land in 2.1?

@dbaeumer
Copy link
Member Author

@mjbvz can you have a look. To test it when this lands in 2.1.3 you need to uncomment the code here: https://github.com/Microsoft/vscode/blob/master/extensions/typescript/src/typescriptMain.ts#L374

mjbvz added a commit to mjbvz/vscode that referenced this issue Feb 1, 2017
mjbvz added a commit to microsoft/vscode that referenced this issue Feb 1, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants