{"action":"created","comment":{"url":"https://api.github.com/repos/atom/atom/pulls/comments/171739628","pull_request_review_id":100647480,"id":171739628,"diff_hunk":"@@ -360,6 +360,7 @@ const ScopeDescriptor = require('./scope-descriptor')\n // * Don't depend on (or write to) configuration keys outside of your keypath.\n //\n const schemaEnforcers = {}\n+const PROJECT = '__atomproject__'","path":"src/config.js","position":4,"original_position":4,"commit_id":"9d95fd613e176d5b55522f2d003df6a9eda44fb3","original_commit_id":"9d95fd613e176d5b55522f2d003df6a9eda44fb3","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":"That was my original implementation, but what if in the future configs sourced to individual files becomes common? Could that lead to collisions? \r\n\r\nMaybe I could do something like `project__${source}`?","created_at":"2018-03-02T00:50:23Z","updated_at":"2018-03-02T00:50:23Z","html_url":"https://github.com/atom/atom/pull/16845#discussion_r171739628","pull_request_url":"https://api.github.com/repos/atom/atom/pulls/16845","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/atom/atom/pulls/comments/171739628"},"html":{"href":"https://github.com/atom/atom/pull/16845#discussion_r171739628"},"pull_request":{"href":"https://api.github.com/repos/atom/atom/pulls/16845"}},"in_reply_to_id":171737088},"pull_request":{"url":"https://api.github.com/repos/atom/atom/pulls/16845","id":171536214,"html_url":"https://github.com/atom/atom/pull/16845","diff_url":"https://github.com/atom/atom/pull/16845.diff","patch_url":"https://github.com/atom/atom/pull/16845.patch","issue_url":"https://api.github.com/repos/atom/atom/issues/16845","number":16845,"state":"open","locked":false,"title":"Add the concept of an `atomproject` file to atom. ","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":"### Description of the Change\r\n\r\nAdds explicit project configs to Atom. Ie:  One can now create a `*.atomproject.{json, cson}` containing an array of root paths, as well as an associated config. Opening this file from the command line with the -p flag (ie: `atom -p ./foo.atomproject.json` will, in a new window, open up all the paths specified in the file, as well as layer the configurations specified in the file in memory on top of the global config, at a level of precedence higher than settings from ~/atom/config.json. Atom windows not opened through the -p flag will not have any of the project specific settings. \r\n\r\nThis PR does not add the ability to launch atom from a project file through the UI, although it would be fairly simple to implement using the APIs (ie: `atom.project.replace`) added in this PR. \r\n\r\nPlease note that this PR is separate from (RFC-001](#16698). As @damieng has stated elsewhere, this RFC will be tweaked to be for the root-folder level config that LSP needs which IDE team will develop. That RFC will only deal with root folder configs (not project level). \r\n\r\nExample of launching an atomproject on Giphy:\r\nhttps://giphy.com/gifs/1wqpNX1QdxAflmELbh/fullscreen\r\n\r\n\r\n### Alternate Designs\r\n\r\nWhen a user invokes` atom -p. *.atomproject.json`, `command-line-parser.js` checks for a -p flag, and if it finds it, passes the data from the file over the process boundary to the newly created atom window. There, it calls `atom.project.replace` with the contents of this file. This API, `atom.project.replace`, uses `project.setPaths` to replace the paths on the atom window. An alternative way to do this could have been to use the `pathsToOpen` array in `parse-command-line.js`. Doing this would allow other command line options  (ie: --test) to use the paths field of the atomproject file as well. I chose not to use this approach, and instead to just use `project.setPaths`. This is so that `replace` does all of the work of replacing an atomproject, instead of just doing most of it and delegating the paths bit to the Atom application process launcher. Additionally, this design simplifies the task of implementing UI to swap atomprojects. \r\n\r\nIn terms of layering project settings on top of the global config, this PR takes a very different approach to an earlier PR which was meant to add root-folder level config. First, there is no \"dirty state\" (settings that have been set within the current atom session), or \"settingsContexts\" (seperate in-memory settings objects) - instead, project configs are just implemented using the existing source properties on the config settings. No settings are saved to disk, and only layer on top of the atom window spawned for the project. \r\n\r\n### Why Should This Be In Core?\r\n\r\nThis change allows users to set config settings for a set of paths, which is useful for teams or individuals who want settings specific to a particular project. It also lays the groundwork for features like suggested packages (which could live inside a .atomproject file). \r\n\r\n### Verification Process\r\n\r\nUnit testing in config-spec, project-spec, and extensive manual testing of atomproject files. \r\n\r\n### Applicable Issues\r\n\r\n(RFC-001)(#16698)\r\n","created_at":"2018-02-27T01:04:36Z","updated_at":"2018-03-02T00:50:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"612e30c39a63863df948ed4f53797ab14fb3cb98","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},{"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},{"login":"lee-dohm","id":1038121,"avatar_url":"https://avatars0.githubusercontent.com/u/1038121?v=4","gravatar_id":"","url":"https://api.github.com/users/lee-dohm","html_url":"https://github.com/lee-dohm","followers_url":"https://api.github.com/users/lee-dohm/followers","following_url":"https://api.github.com/users/lee-dohm/following{/other_user}","gists_url":"https://api.github.com/users/lee-dohm/gists{/gist_id}","starred_url":"https://api.github.com/users/lee-dohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lee-dohm/subscriptions","organizations_url":"https://api.github.com/users/lee-dohm/orgs","repos_url":"https://api.github.com/users/lee-dohm/repos","events_url":"https://api.github.com/users/lee-dohm/events{/privacy}","received_events_url":"https://api.github.com/users/lee-dohm/received_events","type":"User","site_admin":true}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/atom/atom/pulls/16845/commits","review_comments_url":"https://api.github.com/repos/atom/atom/pulls/16845/comments","review_comment_url":"https://api.github.com/repos/atom/atom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/atom/issues/16845/comments","statuses_url":"https://api.github.com/repos/atom/atom/statuses/9d95fd613e176d5b55522f2d003df6a9eda44fb3","head":{"label":"atom:fb-pw-simple-project-config","ref":"fb-pw-simple-project-config","sha":"9d95fd613e176d5b55522f2d003df6a9eda44fb3","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-03-02T00:47:13Z","pushed_at":"2018-03-02T00:16:40Z","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":297603,"stargazers_count":43669,"watchers_count":43669,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8694,"mirror_url":null,"archived":false,"open_issues_count":910,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8694,"open_issues":910,"watchers":43669,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"8cb08edda001deb216944331498eab1b88b2f503","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-03-02T00:47:13Z","pushed_at":"2018-03-02T00:16:40Z","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":297603,"stargazers_count":43669,"watchers_count":43669,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8694,"mirror_url":null,"archived":false,"open_issues_count":910,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8694,"open_issues":910,"watchers":43669,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/atom/pulls/16845"},"html":{"href":"https://github.com/atom/atom/pull/16845"},"issue":{"href":"https://api.github.com/repos/atom/atom/issues/16845"},"comments":{"href":"https://api.github.com/repos/atom/atom/issues/16845/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/atom/pulls/16845/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/atom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/atom/pulls/16845/commits"},"statuses":{"href":"https://api.github.com/repos/atom/atom/statuses/9d95fd613e176d5b55522f2d003df6a9eda44fb3"}},"author_association":"NONE"}}
{"actor":{"display_login":"philipfweiss"}}