{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/32035128","id":32035128,"diff_hunk":"@@ -162,6 +168,51 @@ jl_value_t *jl_eval_module_expr(jl_expr_t *ex)\n     jl_current_module = last_module;\n     jl_current_task->current_module = task_last_m;\n \n+    arraylist_push(&module_stack, newm);\n+\n+    if (jl_current_module == jl_main_module) {\n+        while (module_stack.len > 0) {\n+            jl_module_load_time_initialize((jl_module_t *) arraylist_pop(&module_stack));\n+        }\n+\n+        const char *build_path = jl_options.build_path;","path":"src/toplevel.c","position":50,"original_position":50,"commit_id":"91ac41d6c01b28fd617473ac7e3d7223aae2609b","original_commit_id":"91ac41d6c01b28fd617473ac7e3d7223aae2609b","user":{"login":"JeffBezanson","id":744556,"avatar_url":"https://avatars.githubusercontent.com/u/744556?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffBezanson","html_url":"https://github.com/JeffBezanson","followers_url":"https://api.github.com/users/JeffBezanson/followers","following_url":"https://api.github.com/users/JeffBezanson/following{/other_user}","gists_url":"https://api.github.com/users/JeffBezanson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBezanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBezanson/subscriptions","organizations_url":"https://api.github.com/users/JeffBezanson/orgs","repos_url":"https://api.github.com/users/JeffBezanson/repos","events_url":"https://api.github.com/users/JeffBezanson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBezanson/received_events","type":"User","site_admin":false},"body":"Looks like the code from here should be in a separate function.","created_at":"2015-06-09T16:47:53Z","updated_at":"2015-06-09T16:47:53Z","html_url":"https://github.com/JuliaLang/julia/pull/8745#discussion_r32035128","pull_request_url":"https://api.github.com/repos/JuliaLang/julia/pulls/8745","_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/32035128"},"html":{"href":"https://github.com/JuliaLang/julia/pull/8745#discussion_r32035128"},"pull_request":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/8745"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/8745","id":23059530,"html_url":"https://github.com/JuliaLang/julia/pull/8745","diff_url":"https://github.com/JuliaLang/julia/pull/8745.diff","patch_url":"https://github.com/JuliaLang/julia/pull/8745.patch","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/8745","number":8745,"state":"open","locked":false,"title":"WIP: static compile part 4 (user-interface)","user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars.githubusercontent.com/u/330950?v=3","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"body":"(continuation of #8656 – as I make progress towards incremental module compilation, I'll push the code to this branch for comments and API discussion)\r\n\r\nsince Julia already has a strong tradition that file != module, I think the primary implementation of this needs to embrace that and use a `*.jlc` file independent of the filesystem. this unifies the behavior `using` and everything in `Base` across restarts. Therefore, a session could look something like the following:\r\n\r\n```\r\njulia> using A\r\nnote: cache file ~/.julia/v0.4/.lib/A.jlc cannot be used with this Julia image, ignoring file\r\nnote: regenerating cache file for module A with code from /home/user/.julia/v0.4/A/src/A.jl\r\n\r\njulia> using B\r\nnote: cache file ~/.julia/v0.4/.lib/B.jlc cannot be used with this Julia image, ignoring file\r\nnote: could not find `B.jl` in PATH to satisfy requested module dependency\r\nERROR: B not found\r\n in require at ./loading.jl:49\r\n in require at /Volumes/Lion/Users/jameson/Documents/julia/usr/lib/julia/sys.dylib\r\n\r\njulia> using C\r\nnote: regenerating cache file for module C with code from /home/user/.julia/v0.4/C/src/C.jl\r\n\r\njulia> using D\r\nnote: could not find `D.jl` in PATH to satisfy requested module dependency\r\nERROR: B not found\r\n in require at ./loading.jl:49\r\n in require at /Volumes/Lion/Users/jameson/Documents/julia/usr/lib/julia/sys.dylib\r\n\r\njulia> using D # this one is already in the session\r\n\r\njulia> using E # this one is already in the cache (`~/.julia/v0.4/E.jlc`)\r\n\r\njulia>\r\n```\r\n\r\nAnd invoking the cache file engine would look something like the following:\r\n```julia\r\n$ ./julia -f --build $HOME/.julia/v$(cut -d . -f 1,2 VERSION)\\\r\n    -J sys.ji -L LOAD_PATH.jl\r\n    ~/.julia/v0.4/FixedPointNumbers/src/FixedPointNumbers.jl\r\n```\r\nor via stdin:\r\n```julia\r\n$ ./julia -f --build $HOME/.julia/v$(cut -d . -f 1,2 VERSION)\\\r\n    -J sys.ji -\r\nempty!(LOAD_PATH)\r\npush!(LOAD_PATH, \"path1\")\r\npush!(LOAD_PATH, \"path2\")\r\ninclude(\"~/.julia/v0.4/FixedPointNumbers/src/FixedPointNumbers.jl\")\r\n^D\r\n```\r\n\r\nany logic to handle dependencies differently would be handled externally, e.g. https://github.com/malmaud/Autoreload.jl","created_at":"2014-10-21T02:50:47Z","updated_at":"2015-06-09T16:47:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"515331cfaaa74da845c88b378ef846a977bf0ec9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaLang/julia/pulls/8745/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/julia/pulls/8745/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/8745/comments","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/91ac41d6c01b28fd617473ac7e3d7223aae2609b","head":{"label":"JuliaLang:jn/static_compile_4","ref":"jn/static_compile_4","sha":"91ac41d6c01b28fd617473ac7e3d7223aae2609b","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","created_at":"2011-04-21T07:01:50Z","updated_at":"2015-06-09T12:47:48Z","pushed_at":"2015-06-09T16:21:39Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":187325,"stargazers_count":5651,"watchers_count":5651,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1188,"mirror_url":null,"open_issues_count":1288,"forks":1188,"open_issues":1288,"watchers":5651,"default_branch":"master"}},"base":{"label":"JuliaLang:master","ref":"master","sha":"bec99f3d42866a02e93274053f744cfc1b590521","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","created_at":"2011-04-21T07:01:50Z","updated_at":"2015-06-09T12:47:48Z","pushed_at":"2015-06-09T16:21:39Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":187325,"stargazers_count":5651,"watchers_count":5651,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1188,"mirror_url":null,"open_issues_count":1288,"forks":1188,"open_issues":1288,"watchers":5651,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/8745"},"html":{"href":"https://github.com/JuliaLang/julia/pull/8745"},"issue":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/8745"},"comments":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/8745/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/8745/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/8745/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/julia/statuses/91ac41d6c01b28fd617473ac7e3d7223aae2609b"}}}}