{"action":"created","comment":{"url":"https://api.github.com/repos/atom/atom/pulls/comments/166057115","pull_request_review_id":94082634,"id":166057115,"diff_hunk":"@@ -606,36 +646,56 @@ class Config {\n   // Returns an {Array} of {Object}s with the following keys:\n   //  * `scopeDescriptor` The {ScopeDescriptor} with which the value is associated\n   //  * `value` The value for the key-path\n-  getAll (keyPath, options) {\n+  getAll (keyPath, options = {}) {\n     let globalValue, result, scope\n-    if (options != null) { ({scope} = options) }\n-\n-    if (scope != null) {\n-      let legacyScopeDescriptor\n-      const scopeDescriptor = ScopeDescriptor.fromObject(scope)\n-      result = this.scopedSettingsStore.getAll(\n-          scopeDescriptor.getScopeChain(),\n-          keyPath,\n-          options\n-        )\n-      legacyScopeDescriptor = this.getLegacyScopeDescriptor(scopeDescriptor)\n-      if (legacyScopeDescriptor) {\n-        result.push(...Array.from(this.scopedSettingsStore.getAll(\n-            legacyScopeDescriptor.getScopeChain(),\n+    if (options != null) {\n+      ({scope} = options)\n+    }\n+\n+    const allResults = []\n+    const settings = [this.dirtySettings, ...this.pathSettingsMap.values(), this.projectSettings, this.globalSettings]\n+\n+    for (let setting of settings) {\n+      result = []\n+      if (scope != null) {\n+        let legacyScopeDescriptor\n+        const scopeDescriptor = ScopeDescriptor.fromObject(scope)\n+        result = result.concat(setting.scopedSettings.getAll(\n+            scopeDescriptor.getScopeChain(),\n             keyPath,\n             options\n-          ) || []))\n+          ))\n+        legacyScopeDescriptor = this.getLegacyScopeDescriptor(scopeDescriptor)\n+        if (legacyScopeDescriptor) {\n+          result.push(...Array.from(setting.scopedSettings.getAll(\n+              legacyScopeDescriptor.getScopeChain(),\n+              keyPath,\n+              options\n+            ) || []))\n+        }\n       }\n-    } else {\n-      result = []\n+      allResults.push(result)\n     }\n \n-    globalValue = this.getRawValue(keyPath, options)\n+    const reducedResults = this.reduceAllResults(allResults)\n+\n+    delete options.scope\n+    globalValue = this.get(keyPath, options)","path":"src/config.js","position":141,"original_position":141,"commit_id":"4c0ddaba7757c5c41b6765641530bd4f899c299d","original_commit_id":"4c0ddaba7757c5c41b6765641530bd4f899c299d","user":{"login":"wbinnssmith","id":755844,"avatar_url":"https://avatars0.githubusercontent.com/u/755844?v=4","gravatar_id":"","url":"https://api.github.com/users/wbinnssmith","html_url":"https://github.com/wbinnssmith","followers_url":"https://api.github.com/users/wbinnssmith/followers","following_url":"https://api.github.com/users/wbinnssmith/following{/other_user}","gists_url":"https://api.github.com/users/wbinnssmith/gists{/gist_id}","starred_url":"https://api.github.com/users/wbinnssmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbinnssmith/subscriptions","organizations_url":"https://api.github.com/users/wbinnssmith/orgs","repos_url":"https://api.github.com/users/wbinnssmith/repos","events_url":"https://api.github.com/users/wbinnssmith/events{/privacy}","received_events_url":"https://api.github.com/users/wbinnssmith/received_events","type":"User","site_admin":false},"body":"`globalValue = this.get(keyPath, _.without(options, 'scope'))` here should take care of the issue above 😄 ","created_at":"2018-02-05T18:04:27Z","updated_at":"2018-02-05T18:21:09Z","html_url":"https://github.com/atom/atom/pull/16654#discussion_r166057115","pull_request_url":"https://api.github.com/repos/atom/atom/pulls/16654","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/atom/atom/pulls/comments/166057115"},"html":{"href":"https://github.com/atom/atom/pull/16654#discussion_r166057115"},"pull_request":{"href":"https://api.github.com/repos/atom/atom/pulls/16654"}}},"pull_request":{"url":"https://api.github.com/repos/atom/atom/pulls/16654","id":166126203,"html_url":"https://github.com/atom/atom/pull/16654","diff_url":"https://github.com/atom/atom/pull/16654.diff","patch_url":"https://github.com/atom/atom/pull/16654.patch","issue_url":"https://api.github.com/repos/atom/atom/issues/16654","number":16654,"state":"open","locked":false,"title":"WIP: Add support for project and path specific configs. ","user":{"login":"philipfweiss","id":1817497,"avatar_url":"https://avatars2.githubusercontent.com/u/1817497?v=4","gravatar_id":"","url":"https://api.github.com/users/philipfweiss","html_url":"https://github.com/philipfweiss","followers_url":"https://api.github.com/users/philipfweiss/followers","following_url":"https://api.github.com/users/philipfweiss/following{/other_user}","gists_url":"https://api.github.com/users/philipfweiss/gists{/gist_id}","starred_url":"https://api.github.com/users/philipfweiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipfweiss/subscriptions","organizations_url":"https://api.github.com/users/philipfweiss/orgs","repos_url":"https://api.github.com/users/philipfweiss/repos","events_url":"https://api.github.com/users/philipfweiss/events{/privacy}","received_events_url":"https://api.github.com/users/philipfweiss/received_events","type":"User","site_admin":false},"body":"Work in progress PR to give atom support for project specific configuration files. \r\n\r\n### Requirements\r\n\r\n### Description of the Change\r\n\r\nThe purpose of this change is to add the ability for atom to act upon path and project specific configuration files (instead of just a global `~/.atom/config.{json, cson}`. After these changes, key/value pairs set within a `.atom/config.{json, cson}` on any  mounted root will be honored by the editor. \r\n\r\nThis pull request includes mostly changes to the internals of atom.config. While all previous APIs (even private class methods of atom.config) still work, their implementation has in many cases been moved out to more generic functions that can be called on arbitrary setting contexts. \r\n\r\nPreviously, the only settings context in atom was the global context, which were acted upon by the various methods of the atom.config class. There are now multiple settings contexts, each with different precedences. While `atom.config.set` still acts upon only the global context, `atom.config.get` now looks through all of the settingsContext objects, grabbing values in order of precedence. The settings contexts are:\r\n\r\n1. Dirty Settings. (any setting changed by atom.config.set within the current atom session will be added to the dirty settings, which have the highest precedence. This is to prevent issues where a value is set by a package, but then cannot be retrieved because a settingsContext of higher precedence has already defined it). \r\n\r\n2. Project Settings. Atom config now has the concept of a \"project\", which packages can write settings to by calling `atom.config.resetProjectSettings`. \r\n\r\n3. Path Settings. Atom config now stores settings contexts for each of the roots mounted in the current atom session. \r\n\r\n4. Global Settings. This is the original settings context found in `~/.atom/config.{json, cson}`\r\n\r\n### Alternate Designs\r\n\r\n### Why Should This Be In Core?\r\n\r\nTo allow users of atom to have project and path specific configuration, instead of just a personal .atom directory. It lays the groundwork for other features that could b\r\n\r\n### Benefits\r\n\r\nWIP\r\n\r\n### Possible Drawbacks\r\n\r\nWIP\r\n\r\n### Verification Process\r\nWIP\r\n\r\n### Applicable Issues\r\n\r\nWIP","created_at":"2018-01-30T23:24:41Z","updated_at":"2018-02-05T18:21:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd4eedff4c7677a70de4da637d45a3564a58faa7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"matthewwithanm","id":126263,"avatar_url":"https://avatars0.githubusercontent.com/u/126263?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewwithanm","html_url":"https://github.com/matthewwithanm","followers_url":"https://api.github.com/users/matthewwithanm/followers","following_url":"https://api.github.com/users/matthewwithanm/following{/other_user}","gists_url":"https://api.github.com/users/matthewwithanm/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewwithanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewwithanm/subscriptions","organizations_url":"https://api.github.com/users/matthewwithanm/orgs","repos_url":"https://api.github.com/users/matthewwithanm/repos","events_url":"https://api.github.com/users/matthewwithanm/events{/privacy}","received_events_url":"https://api.github.com/users/matthewwithanm/received_events","type":"User","site_admin":false},{"login":"captbaritone","id":162735,"avatar_url":"https://avatars2.githubusercontent.com/u/162735?v=4","gravatar_id":"","url":"https://api.github.com/users/captbaritone","html_url":"https://github.com/captbaritone","followers_url":"https://api.github.com/users/captbaritone/followers","following_url":"https://api.github.com/users/captbaritone/following{/other_user}","gists_url":"https://api.github.com/users/captbaritone/gists{/gist_id}","starred_url":"https://api.github.com/users/captbaritone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captbaritone/subscriptions","organizations_url":"https://api.github.com/users/captbaritone/orgs","repos_url":"https://api.github.com/users/captbaritone/repos","events_url":"https://api.github.com/users/captbaritone/events{/privacy}","received_events_url":"https://api.github.com/users/captbaritone/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/atom/atom/pulls/16654/commits","review_comments_url":"https://api.github.com/repos/atom/atom/pulls/16654/comments","review_comment_url":"https://api.github.com/repos/atom/atom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/atom/issues/16654/comments","statuses_url":"https://api.github.com/repos/atom/atom/statuses/4c0ddaba7757c5c41b6765641530bd4f899c299d","head":{"label":"atom:fb-pw-project-config-3","ref":"fb-pw-project-config-3","sha":"4c0ddaba7757c5c41b6765641530bd4f899c299d","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars2.githubusercontent.com/u/1089146?v=4","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":3228505,"name":"atom","full_name":"atom/atom","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars2.githubusercontent.com/u/1089146?v=4","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/atom","description":":atom: The hackable text editor","fork":false,"url":"https://api.github.com/repos/atom/atom","forks_url":"https://api.github.com/repos/atom/atom/forks","keys_url":"https://api.github.com/repos/atom/atom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/atom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/atom/teams","hooks_url":"https://api.github.com/repos/atom/atom/hooks","issue_events_url":"https://api.github.com/repos/atom/atom/issues/events{/number}","events_url":"https://api.github.com/repos/atom/atom/events","assignees_url":"https://api.github.com/repos/atom/atom/assignees{/user}","branches_url":"https://api.github.com/repos/atom/atom/branches{/branch}","tags_url":"https://api.github.com/repos/atom/atom/tags","blobs_url":"https://api.github.com/repos/atom/atom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/atom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/atom/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/atom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/atom/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/atom/languages","stargazers_url":"https://api.github.com/repos/atom/atom/stargazers","contributors_url":"https://api.github.com/repos/atom/atom/contributors","subscribers_url":"https://api.github.com/repos/atom/atom/subscribers","subscription_url":"https://api.github.com/repos/atom/atom/subscription","commits_url":"https://api.github.com/repos/atom/atom/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/atom/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/atom/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/atom/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/atom/contents/{+path}","compare_url":"https://api.github.com/repos/atom/atom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/atom/merges","archive_url":"https://api.github.com/repos/atom/atom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/atom/downloads","issues_url":"https://api.github.com/repos/atom/atom/issues{/number}","pulls_url":"https://api.github.com/repos/atom/atom/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/atom/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/atom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/atom/labels{/name}","releases_url":"https://api.github.com/repos/atom/atom/releases{/id}","deployments_url":"https://api.github.com/repos/atom/atom/deployments","created_at":"2012-01-20T18:18:21Z","updated_at":"2018-02-05T18:10:30Z","pushed_at":"2018-02-05T13:17:37Z","git_url":"git://github.com/atom/atom.git","ssh_url":"git@github.com:atom/atom.git","clone_url":"https://github.com/atom/atom.git","svn_url":"https://github.com/atom/atom","homepage":"https://atom.io","size":295036,"stargazers_count":43228,"watchers_count":43228,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8497,"mirror_url":null,"archived":false,"open_issues_count":922,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8497,"open_issues":922,"watchers":43228,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"669b22ce1ec1898ac139b577e68a7ae17cefb3ce","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars2.githubusercontent.com/u/1089146?v=4","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":3228505,"name":"atom","full_name":"atom/atom","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars2.githubusercontent.com/u/1089146?v=4","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/atom","description":":atom: The hackable text editor","fork":false,"url":"https://api.github.com/repos/atom/atom","forks_url":"https://api.github.com/repos/atom/atom/forks","keys_url":"https://api.github.com/repos/atom/atom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/atom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/atom/teams","hooks_url":"https://api.github.com/repos/atom/atom/hooks","issue_events_url":"https://api.github.com/repos/atom/atom/issues/events{/number}","events_url":"https://api.github.com/repos/atom/atom/events","assignees_url":"https://api.github.com/repos/atom/atom/assignees{/user}","branches_url":"https://api.github.com/repos/atom/atom/branches{/branch}","tags_url":"https://api.github.com/repos/atom/atom/tags","blobs_url":"https://api.github.com/repos/atom/atom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/atom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/atom/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/atom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/atom/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/atom/languages","stargazers_url":"https://api.github.com/repos/atom/atom/stargazers","contributors_url":"https://api.github.com/repos/atom/atom/contributors","subscribers_url":"https://api.github.com/repos/atom/atom/subscribers","subscription_url":"https://api.github.com/repos/atom/atom/subscription","commits_url":"https://api.github.com/repos/atom/atom/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/atom/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/atom/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/atom/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/atom/contents/{+path}","compare_url":"https://api.github.com/repos/atom/atom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/atom/merges","archive_url":"https://api.github.com/repos/atom/atom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/atom/downloads","issues_url":"https://api.github.com/repos/atom/atom/issues{/number}","pulls_url":"https://api.github.com/repos/atom/atom/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/atom/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/atom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/atom/labels{/name}","releases_url":"https://api.github.com/repos/atom/atom/releases{/id}","deployments_url":"https://api.github.com/repos/atom/atom/deployments","created_at":"2012-01-20T18:18:21Z","updated_at":"2018-02-05T18:10:30Z","pushed_at":"2018-02-05T13:17:37Z","git_url":"git://github.com/atom/atom.git","ssh_url":"git@github.com:atom/atom.git","clone_url":"https://github.com/atom/atom.git","svn_url":"https://github.com/atom/atom","homepage":"https://atom.io","size":295036,"stargazers_count":43228,"watchers_count":43228,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8497,"mirror_url":null,"archived":false,"open_issues_count":922,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8497,"open_issues":922,"watchers":43228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/atom/pulls/16654"},"html":{"href":"https://github.com/atom/atom/pull/16654"},"issue":{"href":"https://api.github.com/repos/atom/atom/issues/16654"},"comments":{"href":"https://api.github.com/repos/atom/atom/issues/16654/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/atom/pulls/16654/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/atom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/atom/pulls/16654/commits"},"statuses":{"href":"https://api.github.com/repos/atom/atom/statuses/4c0ddaba7757c5c41b6765641530bd4f899c299d"}},"author_association":"NONE"}}
{"actor":{"display_login":"wbinnssmith"}}