-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
[json] problem from unaccessible schema is distracting #51032
Comments
Why do you think it is a bug? What do you suggest as improvement? |
Caching |
|
Yes, schemas are cached, but we are pretty aggressive in reseting the cache for example on json settings changes. One reason for that is also that the server data can update any time. What you get is a problem of severity information in the problems view. I personally don't find it very distractive but rather important information that explains why you don't get any validation and code assist on this file. Connectivity is one reason, but you might also have mistyped the URL or have proxy issues. Just logging that to the dev console is IMO not the right thing to do. The typical user doesn't have the dev tools open. I'm happy to keep this request open for votes from other users. |
I use F8 frequently to fix all errors in the project before committing, it's annoying that tsconfig.json keeps opening with an error that I cannot be "fixed".
Wouldn't these return different error messages and can be handled separately? |
@aeschli Having a non-actionable error/warning that cannot be removed is indeed distracting. Having a setting that controls this attempt to refresh the schema cache can help in 2 ways
Thoughts? |
@ramya-rao-a a setting is all good and fine, but I don't want to go and manually change a bunch of settings when I'm offline for a while just to avoid online-related error message. It should silently fail and use a cached copy if no network is detected as having the absolute latest schema version isn't critical to operation. |
Slightly related, I get the same thing except it's trying to load the package.json schema. I work in a closed environment so that schema is never going to be loaded. I also like to use the built-in console as I develop so I always see "Problems (1)". |
@aeschli is this a good candidate for help wanted/good first issue? |
Yes, good idea. |
This commit adds a middleware to the JSON Language Feature client which intercepts diagnostics for schema resolution errors, and shows them in the status bar instead of treating them as code errors. Fixes microsoft#51032
fixed by #60219 |
I was on a plane without internet working and this popped up in the tsconfig.json. A silent failure would have been better in this case as I know I don't have internet:
The text was updated successfully, but these errors were encountered: