-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
setDiagnosticsOptions no longer works after worker loaded #105
Comments
@remcohaszing it seems that this PR broke this: #99 The JSON worker does the same thing - when the diagnostics options change, we must kill the worker so it restarts with the right options (e.g. schemas). Since we removed this handler, the worker never stops and the changes to not take effect. I added logging to the |
It seems that "unloading a language" is different from restarting the worker when settings change - since this event chain is being fired from within the plugin when |
Sorry for the repeat comments - I put a PR together to restore this, but I do not have permissions in this repo. Happy to share if you would like! |
Hi @patrickshipe. Thanks for identifying and diagnosing this problem. I think I found the problem as well, but I want to give you a chance to propose your fix. :) In order to make a change in a repository on GitHub you don’t have permission on, you’ll need to:
For more info see the GitHub’s Fork a repo I’m looking forward to your fix! |
Thank you for the tips @remcohaszing - first time using GitHub to contribute to an outside project! PR created: #109 |
It seems that somewhere between monaco-yaml version 3 and 3.2, calling
setDiagnosticsOptions
to change schemas no longer works - the schemas seem frozen to what they were when the worker was first loaded. The options change, but it looks like a no-op – we don't try to load any new schemas. It seems to work in Monaco's JSON plugin just fine (if I callsetDiagnosticsOptions
with a changed schema, it takes effect even for an active Monaco editor).I tried digging around to find out what is causing this, but it looks like the code changed significantly from 3.0 to 3.2 - any thoughts?
The text was updated successfully, but these errors were encountered: