This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
New config API - #4631
Merged
Merged
New config API#4631
Conversation
1 of 3 tasks
Default it to the user’s config if no source is specified.
If the option is supplied, we will only retrieve values from the specified sources.
Before, values loaded from the config file were set in a way that allowed any key to be set in the root object. Now, these values are set in a way that's similar to how ::set works.
Deprecate using the scope as an optional first argument
Deprecate passing the scope as an optional first argument
Deprecate Config::restoreDefault
maxbrunsfeld
force-pushed
the
mb-new-config-api
branch
from
December 16, 2014 22:01
1baeb92 to
b8f239c
Compare
Contributor
Author
|
@benogle, @kevinsawicki - I think this is ready to go. It implements the API that @nathansobo outlined in #4567, with these differences:
I've rebased the branch from #4567 onto this one, so that we can easily continue with the refactor after the holidays. |
Contributor
There was a problem hiding this comment.
We usually don't use parens around the toBe params
Contributor
There was a problem hiding this comment.
...and this is why I am a fan of fully-parenthesized CoffeeScript, otherwise there are inconsistencies all over (not that i'm suggesting we change our style guide or anything)
Contributor
There was a problem hiding this comment.
Yeah, I totally agree it is inconsistent overall, but this added line is inconsistent with the previous 2 which is why I brought it up.
Also, simplify the shim in ::isDefault
maxbrunsfeld
force-pushed
the
mb-new-config-api
branch
from
December 16, 2014 22:28
ab28a24 to
9a2cc36
Compare
22 of 24 tasks
maxbrunsfeld
added a commit
that referenced
this pull request
Dec 19, 2014
This reverts commit dc2a453. Conflicts: spec/config-spec.coffee src/config.coffee
maxbrunsfeld
added a commit
that referenced
this pull request
Dec 20, 2014
This reverts commit dc2a453. Conflicts: spec/config-spec.coffee src/config.coffee
maxbrunsfeld
added a commit
that referenced
this pull request
Dec 22, 2014
This reverts commit dc2a453. Conflicts: spec/config-spec.coffee src/config.coffee
maxbrunsfeld
added a commit
that referenced
this pull request
Dec 23, 2014
This reverts commit dc2a453. Conflicts: spec/config-spec.coffee src/config.coffee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the config API, but does not change the way global properties are stored. They still aren't stored in the scoped property store.
Refs #4567.
Steps
Config::getand::settake trailing options hashessourceoption toConfig::set::setsourcesandexcludeSourcesoptions toConfig::getConfig::unsetConfig::observeand::onDidChangeconsistent with::getby taking a scope as an option instead of the first argument.sourcewithout a scope selector (To be fixed by Improve Config API with regard to scoped settings #4567).::isDefaultand::getDefaultin favor of using thesourceoption to::get