Repository navigation
Add a public way of setting config values associated with a source - #4558
maxbrunsfeld wants to merge 6 commits into
Conversation
19876ac to
36f3c8c
Compare
There was a problem hiding this comment.
@benogle, @nathansobo: should I go ahead and roll this behavior into ::set? I did this first just to avoid changing more than one thing at a time.
I could also see leaving it as its own method, though.
There was a problem hiding this comment.
I'm not sure. The only time we want to set config values without a source is presumably when the source is implied to be the user settings. I'm not sure I understand the usage of source well enough to think clearly about this. Maybe we should discuss it one more time. Think through how source is currently used and could be used in the future.
|
Oh. It turns out that autocomplete writes to |
1432fdb to
97d2c43
Compare
|
It's kinda weird that it's |
There was a problem hiding this comment.
I think we need to clarify what we mean by source here. Maybe it's useful to say "associates the value with a given source, such as a path to a file on disk."
7497f7c to
2856eb7
Compare
This is a public way for adding settings associated with a source such as a package. It replaces ::addScopedSettings. Unlike that method, it validates settings using the schemas.
It was implicitly part of the schema already, but it used to be set in a way that bypassed schema validations
Currently only works when a scope descriptor is passed to ::get.
2856eb7 to
a0ad409
Compare
|
Closing in favor of #4567. |
Config::setConfig::unsetFromSourcepublic method to remove settings from a given sourcesourcesoption toConfig::getexcludeSourcesoption toConfig::getConfig::unsetto remove a setting from the user-config sourceConfig::unsetFromSourceto remove all settings or one setting from a given sourceis/get/restoreDefaultmethods and replace withgetandsetplussourceoptionsPreviously, the private method
::addScopedSettingswas used to associate config settings with a source other than the user's config file. It bypassed schema validation.This is being driven out by changes made in atom/snippets#86; to fix deprecation warnings required calling private methods on Config.