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

Plugin User Preferences are ignored #4773

Closed
tsmaeder opened this issue Apr 1, 2019 · 4 comments
Closed

Plugin User Preferences are ignored #4773

tsmaeder opened this issue Apr 1, 2019 · 4 comments
Labels
bug bugs found in the application plug-in system issues related to the plug-in system preferences issues related to preferences

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented Apr 1, 2019

I tried to change the startup parameters for jdt.ls in the vscode-java plugin (installed via "deploy plugin by id") by setting the preference key java.jdt.ls.vmargs. However, the java process would always use the default value for that preference.
Debugging in Chrome showed that the preference value from the user preferences is rejected, because the key java.jdt.ls.vmargs is not present in the combined preferences schema in the PreferenceSchemaProvider. In fact, no preference prefixed "java" was present in the schema when the user preferences were validated and thus all java preferences would be rejected as invalid.
The problem seems to be that the user preferences are read before the contributions from PluginContributionHandler.
Note that this problem seems to be timing dependent: sometimes the schema update happens before the reading of the user prefs and everything works fine.

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Apr 1, 2019

I noticed that "setSchema()" generates a preferences changed event, but the "newValue" that is propagated with this even is not the value from the user preferences, but the default value. The correct thing to do would be to report the value from the user preferences.

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Apr 1, 2019

The fact that the reported value is wrong would not really matter (the prefs in the plugin container are reinitialized with all prefs from the client side), except that parsing the user preferences throws away any keys that are not in the preference schema, and that the preferences are not invalidated and re-read when the schema changes.

@tsmaeder tsmaeder changed the title Plugin Preference Schemas are ignored Plugin User Preferences are ignored Apr 1, 2019
@akurinnoy
Copy link
Contributor

@tsmaeder this issue should be fixed by #4743

@akosyakov akosyakov added bug bugs found in the application plug-in system issues related to the plug-in system preferences issues related to preferences labels Apr 8, 2019
@akosyakov
Copy link
Member

should be fixed by #4947

@tsmaeder please reopen if not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system preferences issues related to preferences
Projects
None yet
Development

No branches or pull requests

3 participants