{"action":"created","comment":{"url":"https://api.github.com/repos/myst-lang/myst/pulls/comments/191273886","pull_request_review_id":123812687,"id":191273886,"diff_hunk":"@@ -50,28 +50,10 @@ module Myst\n     # The set of directories that should be considered when performing lookups\n     # with bare paths (not explicitly relative).\n     def load_dirs\n-      @load_dirs ||= begin\n-        paths = [] of String\n-        # Use any specified environment paths first.\n-        if env_paths = ENV[\"MYST_PATH\"]?\n-          paths.concat(env_paths.split(':'))\n-        end\n-        paths.concat([\n-          # Then add the current working directory.\n-          Dir.current,\n-          # Finally, the directory where the executable is installed. This is\n-          # not _guaranteed_ on all systems, but support is good enough, so a\n-          # non-nil assertion is made.\n-          #\n-          # This assumes that the executable exists under a `bin/` folder. The\n-          # path added here will be the directory that contains `bin`.\n-          #\n-          # This is needed to locate the stdlib.\n-          File.dirname(File.dirname(File.join(Process.executable_path.not_nil!)))\n-        ])\n-\n-        paths\n-      end.as(Array(String))\n+      @load_dirs ||= [\n+        Dir.current,\n+        ENV[\"MYST_HOME\"]?","path":"src/myst/interpreter/nodes/require.cr","position":28,"original_position":28,"commit_id":"f6182893cc582698c9965444e06b51a060d27b4d","original_commit_id":"f6182893cc582698c9965444e06b51a060d27b4d","user":{"login":"faultyserver","id":783733,"avatar_url":"https://avatars1.githubusercontent.com/u/783733?v=4","gravatar_id":"","url":"https://api.github.com/users/faultyserver","html_url":"https://github.com/faultyserver","followers_url":"https://api.github.com/users/faultyserver/followers","following_url":"https://api.github.com/users/faultyserver/following{/other_user}","gists_url":"https://api.github.com/users/faultyserver/gists{/gist_id}","starred_url":"https://api.github.com/users/faultyserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faultyserver/subscriptions","organizations_url":"https://api.github.com/users/faultyserver/orgs","repos_url":"https://api.github.com/users/faultyserver/repos","events_url":"https://api.github.com/users/faultyserver/events{/privacy}","received_events_url":"https://api.github.com/users/faultyserver/received_events","type":"User","site_admin":false},"body":"I think it definitely needs more discussion. Ideally `load_dirs` wouldn't even live here and we could have a more authoritative place for configurable things like this (probably with dependency injection as well? for embedded versions).","created_at":"2018-05-28T21:31:14Z","updated_at":"2018-05-28T21:31:14Z","html_url":"https://github.com/myst-lang/myst/pull/194#discussion_r191273886","pull_request_url":"https://api.github.com/repos/myst-lang/myst/pulls/194","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/myst-lang/myst/pulls/comments/191273886"},"html":{"href":"https://github.com/myst-lang/myst/pull/194#discussion_r191273886"},"pull_request":{"href":"https://api.github.com/repos/myst-lang/myst/pulls/194"}},"in_reply_to_id":191272635},"pull_request":{"url":"https://api.github.com/repos/myst-lang/myst/pulls/194","id":190994068,"html_url":"https://github.com/myst-lang/myst/pull/194","diff_url":"https://github.com/myst-lang/myst/pull/194.diff","patch_url":"https://github.com/myst-lang/myst/pull/194.patch","issue_url":"https://api.github.com/repos/myst-lang/myst/issues/194","number":194,"state":"open","locked":false,"title":"Use `MYST_HOME` environment variable for configuring load dirs.","user":{"login":"faultyserver","id":783733,"avatar_url":"https://avatars1.githubusercontent.com/u/783733?v=4","gravatar_id":"","url":"https://api.github.com/users/faultyserver","html_url":"https://github.com/faultyserver","followers_url":"https://api.github.com/users/faultyserver/followers","following_url":"https://api.github.com/users/faultyserver/following{/other_user}","gists_url":"https://api.github.com/users/faultyserver/gists{/gist_id}","starred_url":"https://api.github.com/users/faultyserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faultyserver/subscriptions","organizations_url":"https://api.github.com/users/faultyserver/orgs","repos_url":"https://api.github.com/users/faultyserver/repos","events_url":"https://api.github.com/users/faultyserver/events{/privacy}","received_events_url":"https://api.github.com/users/faultyserver/received_events","type":"User","site_admin":false},"body":"The old `MYST_PATH` that allowed multiple paths similar to `$PATH` has been removed in favor of `MYST_HOME`, which _should_ always point to the install location of the currently-active version of Myst. This is both simpler in terms of the implementation, and more intuitive to reason about \r\n\r\nThis should correspond with changes coming in `mtenv` that will set `MYST_HOME` in the shim before running `myst`.\r\n\r\nFor now, users who do not use `mtenv` will have to set this manually, though we can probably check and ensure it is set as part of the VM setup. I think this should probably emit a warning and notify the user what the VM will use in its place, since it might not always be accurate (e.g., if a user wrongly installed myst directly into `/usr/local/bin` without moving the standard library as well).\r\n\r\nPerhaps a better solution would be to disallow execution if `MYST_HOME` is not set?","created_at":"2018-05-28T20:40:11Z","updated_at":"2018-05-28T21:31:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2163ef36f0252736a76c2f9f4ef22fee0fa27fd5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/myst-lang/myst/milestones/6","html_url":"https://github.com/myst-lang/myst/milestone/6","labels_url":"https://api.github.com/repos/myst-lang/myst/milestones/6/labels","id":3233861,"number":6,"title":"Next","description":"","creator":{"login":"faultyserver","id":783733,"avatar_url":"https://avatars1.githubusercontent.com/u/783733?v=4","gravatar_id":"","url":"https://api.github.com/users/faultyserver","html_url":"https://github.com/faultyserver","followers_url":"https://api.github.com/users/faultyserver/followers","following_url":"https://api.github.com/users/faultyserver/following{/other_user}","gists_url":"https://api.github.com/users/faultyserver/gists{/gist_id}","starred_url":"https://api.github.com/users/faultyserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faultyserver/subscriptions","organizations_url":"https://api.github.com/users/faultyserver/orgs","repos_url":"https://api.github.com/users/faultyserver/repos","events_url":"https://api.github.com/users/faultyserver/events{/privacy}","received_events_url":"https://api.github.com/users/faultyserver/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":13,"state":"open","created_at":"2018-04-02T02:41:17Z","updated_at":"2018-05-28T20:40:11Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/myst-lang/myst/pulls/194/commits","review_comments_url":"https://api.github.com/repos/myst-lang/myst/pulls/194/comments","review_comment_url":"https://api.github.com/repos/myst-lang/myst/pulls/comments{/number}","comments_url":"https://api.github.com/repos/myst-lang/myst/issues/194/comments","statuses_url":"https://api.github.com/repos/myst-lang/myst/statuses/f6182893cc582698c9965444e06b51a060d27b4d","head":{"label":"faultyserver:feature/MYST_HOME","ref":"feature/MYST_HOME","sha":"f6182893cc582698c9965444e06b51a060d27b4d","user":{"login":"faultyserver","id":783733,"avatar_url":"https://avatars1.githubusercontent.com/u/783733?v=4","gravatar_id":"","url":"https://api.github.com/users/faultyserver","html_url":"https://github.com/faultyserver","followers_url":"https://api.github.com/users/faultyserver/followers","following_url":"https://api.github.com/users/faultyserver/following{/other_user}","gists_url":"https://api.github.com/users/faultyserver/gists{/gist_id}","starred_url":"https://api.github.com/users/faultyserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faultyserver/subscriptions","organizations_url":"https://api.github.com/users/faultyserver/orgs","repos_url":"https://api.github.com/users/faultyserver/repos","events_url":"https://api.github.com/users/faultyserver/events{/privacy}","received_events_url":"https://api.github.com/users/faultyserver/received_events","type":"User","site_admin":false},"repo":{"id":115817319,"name":"myst","full_name":"faultyserver/myst","owner":{"login":"faultyserver","id":783733,"avatar_url":"https://avatars1.githubusercontent.com/u/783733?v=4","gravatar_id":"","url":"https://api.github.com/users/faultyserver","html_url":"https://github.com/faultyserver","followers_url":"https://api.github.com/users/faultyserver/followers","following_url":"https://api.github.com/users/faultyserver/following{/other_user}","gists_url":"https://api.github.com/users/faultyserver/gists{/gist_id}","starred_url":"https://api.github.com/users/faultyserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faultyserver/subscriptions","organizations_url":"https://api.github.com/users/faultyserver/orgs","repos_url":"https://api.github.com/users/faultyserver/repos","events_url":"https://api.github.com/users/faultyserver/events{/privacy}","received_events_url":"https://api.github.com/users/faultyserver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/faultyserver/myst","description":"Personal fork of https://github.com/myst-lang/myst for feature development.","fork":true,"url":"https://api.github.com/repos/faultyserver/myst","forks_url":"https://api.github.com/repos/faultyserver/myst/forks","keys_url":"https://api.github.com/repos/faultyserver/myst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faultyserver/myst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faultyserver/myst/teams","hooks_url":"https://api.github.com/repos/faultyserver/myst/hooks","issue_events_url":"https://api.github.com/repos/faultyserver/myst/issues/events{/number}","events_url":"https://api.github.com/repos/faultyserver/myst/events","assignees_url":"https://api.github.com/repos/faultyserver/myst/assignees{/user}","branches_url":"https://api.github.com/repos/faultyserver/myst/branches{/branch}","tags_url":"https://api.github.com/repos/faultyserver/myst/tags","blobs_url":"https://api.github.com/repos/faultyserver/myst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faultyserver/myst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faultyserver/myst/git/refs{/sha}","trees_url":"https://api.github.com/repos/faultyserver/myst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faultyserver/myst/statuses/{sha}","languages_url":"https://api.github.com/repos/faultyserver/myst/languages","stargazers_url":"https://api.github.com/repos/faultyserver/myst/stargazers","contributors_url":"https://api.github.com/repos/faultyserver/myst/contributors","subscribers_url":"https://api.github.com/repos/faultyserver/myst/subscribers","subscription_url":"https://api.github.com/repos/faultyserver/myst/subscription","commits_url":"https://api.github.com/repos/faultyserver/myst/commits{/sha}","git_commits_url":"https://api.github.com/repos/faultyserver/myst/git/commits{/sha}","comments_url":"https://api.github.com/repos/faultyserver/myst/comments{/number}","issue_comment_url":"https://api.github.com/repos/faultyserver/myst/issues/comments{/number}","contents_url":"https://api.github.com/repos/faultyserver/myst/contents/{+path}","compare_url":"https://api.github.com/repos/faultyserver/myst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faultyserver/myst/merges","archive_url":"https://api.github.com/repos/faultyserver/myst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faultyserver/myst/downloads","issues_url":"https://api.github.com/repos/faultyserver/myst/issues{/number}","pulls_url":"https://api.github.com/repos/faultyserver/myst/pulls{/number}","milestones_url":"https://api.github.com/repos/faultyserver/myst/milestones{/number}","notifications_url":"https://api.github.com/repos/faultyserver/myst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faultyserver/myst/labels{/name}","releases_url":"https://api.github.com/repos/faultyserver/myst/releases{/id}","deployments_url":"https://api.github.com/repos/faultyserver/myst/deployments","created_at":"2017-12-30T19:06:48Z","updated_at":"2018-05-13T18:21:42Z","pushed_at":"2018-05-28T20:20:23Z","git_url":"git://github.com/faultyserver/myst.git","ssh_url":"git@github.com:faultyserver/myst.git","clone_url":"https://github.com/faultyserver/myst.git","svn_url":"https://github.com/faultyserver/myst","homepage":"http://myst-lang.org","size":1204,"stargazers_count":0,"watchers_count":0,"language":"Crystal","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"myst-lang:master","ref":"master","sha":"fb5c6c04f9885f21469c11a637d2dfd04a454d48","user":{"login":"myst-lang","id":29179527,"avatar_url":"https://avatars2.githubusercontent.com/u/29179527?v=4","gravatar_id":"","url":"https://api.github.com/users/myst-lang","html_url":"https://github.com/myst-lang","followers_url":"https://api.github.com/users/myst-lang/followers","following_url":"https://api.github.com/users/myst-lang/following{/other_user}","gists_url":"https://api.github.com/users/myst-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/myst-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myst-lang/subscriptions","organizations_url":"https://api.github.com/users/myst-lang/orgs","repos_url":"https://api.github.com/users/myst-lang/repos","events_url":"https://api.github.com/users/myst-lang/events{/privacy}","received_events_url":"https://api.github.com/users/myst-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":93328899,"name":"myst","full_name":"myst-lang/myst","owner":{"login":"myst-lang","id":29179527,"avatar_url":"https://avatars2.githubusercontent.com/u/29179527?v=4","gravatar_id":"","url":"https://api.github.com/users/myst-lang","html_url":"https://github.com/myst-lang","followers_url":"https://api.github.com/users/myst-lang/followers","following_url":"https://api.github.com/users/myst-lang/following{/other_user}","gists_url":"https://api.github.com/users/myst-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/myst-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myst-lang/subscriptions","organizations_url":"https://api.github.com/users/myst-lang/orgs","repos_url":"https://api.github.com/users/myst-lang/repos","events_url":"https://api.github.com/users/myst-lang/events{/privacy}","received_events_url":"https://api.github.com/users/myst-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/myst-lang/myst","description":"A structured, dynamic, general-purpose language.","fork":false,"url":"https://api.github.com/repos/myst-lang/myst","forks_url":"https://api.github.com/repos/myst-lang/myst/forks","keys_url":"https://api.github.com/repos/myst-lang/myst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/myst-lang/myst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/myst-lang/myst/teams","hooks_url":"https://api.github.com/repos/myst-lang/myst/hooks","issue_events_url":"https://api.github.com/repos/myst-lang/myst/issues/events{/number}","events_url":"https://api.github.com/repos/myst-lang/myst/events","assignees_url":"https://api.github.com/repos/myst-lang/myst/assignees{/user}","branches_url":"https://api.github.com/repos/myst-lang/myst/branches{/branch}","tags_url":"https://api.github.com/repos/myst-lang/myst/tags","blobs_url":"https://api.github.com/repos/myst-lang/myst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/myst-lang/myst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/myst-lang/myst/git/refs{/sha}","trees_url":"https://api.github.com/repos/myst-lang/myst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/myst-lang/myst/statuses/{sha}","languages_url":"https://api.github.com/repos/myst-lang/myst/languages","stargazers_url":"https://api.github.com/repos/myst-lang/myst/stargazers","contributors_url":"https://api.github.com/repos/myst-lang/myst/contributors","subscribers_url":"https://api.github.com/repos/myst-lang/myst/subscribers","subscription_url":"https://api.github.com/repos/myst-lang/myst/subscription","commits_url":"https://api.github.com/repos/myst-lang/myst/commits{/sha}","git_commits_url":"https://api.github.com/repos/myst-lang/myst/git/commits{/sha}","comments_url":"https://api.github.com/repos/myst-lang/myst/comments{/number}","issue_comment_url":"https://api.github.com/repos/myst-lang/myst/issues/comments{/number}","contents_url":"https://api.github.com/repos/myst-lang/myst/contents/{+path}","compare_url":"https://api.github.com/repos/myst-lang/myst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/myst-lang/myst/merges","archive_url":"https://api.github.com/repos/myst-lang/myst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/myst-lang/myst/downloads","issues_url":"https://api.github.com/repos/myst-lang/myst/issues{/number}","pulls_url":"https://api.github.com/repos/myst-lang/myst/pulls{/number}","milestones_url":"https://api.github.com/repos/myst-lang/myst/milestones{/number}","notifications_url":"https://api.github.com/repos/myst-lang/myst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/myst-lang/myst/labels{/name}","releases_url":"https://api.github.com/repos/myst-lang/myst/releases{/id}","deployments_url":"https://api.github.com/repos/myst-lang/myst/deployments","created_at":"2017-06-04T17:11:03Z","updated_at":"2018-05-26T22:14:12Z","pushed_at":"2018-05-28T20:40:12Z","git_url":"git://github.com/myst-lang/myst.git","ssh_url":"git@github.com:myst-lang/myst.git","clone_url":"https://github.com/myst-lang/myst.git","svn_url":"https://github.com/myst-lang/myst","homepage":"http://myst-lang.org","size":1203,"stargazers_count":51,"watchers_count":51,"language":"Crystal","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":9,"open_issues":13,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/myst-lang/myst/pulls/194"},"html":{"href":"https://github.com/myst-lang/myst/pull/194"},"issue":{"href":"https://api.github.com/repos/myst-lang/myst/issues/194"},"comments":{"href":"https://api.github.com/repos/myst-lang/myst/issues/194/comments"},"review_comments":{"href":"https://api.github.com/repos/myst-lang/myst/pulls/194/comments"},"review_comment":{"href":"https://api.github.com/repos/myst-lang/myst/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/myst-lang/myst/pulls/194/commits"},"statuses":{"href":"https://api.github.com/repos/myst-lang/myst/statuses/f6182893cc582698c9965444e06b51a060d27b4d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"faultyserver"}}