{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12458","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12458/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12458/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12458/events","html_url":"https://github.com/JuliaLang/julia/pull/12458","id":99060510,"number":12458,"title":"automatic recompilation of stale cache files","user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/precompile","name":"precompile","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/11","html_url":"https://github.com/JuliaLang/julia/milestones/0.4.0","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/11/labels","id":748886,"number":11,"title":"0.4.0","description":"For tracking release-defining items for 0.4: important new features, breaking changes, and blocking bugs.\r\n\r\nAfter a brief period for deciding scope, adding issues to this milestone is not allowed. Once the items in this milestone are done, 0.4 will enter its stabilizing period and a release candidate can be made soon after.","creator":{"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},"open_issues":4,"closed_issues":73,"state":"open","created_at":"2014-08-10T18:13:46Z","updated_at":"2015-08-05T08:44:36Z","due_on":"2015-06-20T18:30:00Z","closed_at":null},"comments":10,"created_at":"2015-08-04T20:56:21Z","updated_at":"2015-08-05T17:47:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/12458","html_url":"https://github.com/JuliaLang/julia/pull/12458","diff_url":"https://github.com/JuliaLang/julia/pull/12458.diff","patch_url":"https://github.com/JuliaLang/julia/pull/12458.patch"},"body":"This fixes #12259 by automating the recompilation of stale cache files whenever you `require` a module (e.g. by `using`) and a stale cache file is found.  Currently, staleness is judged by timestamps; other mechanisms like checksums are left to future PRs.\r\n\r\nFor example, here is a typical session after I had done `Base.compile(:PyPlot)` and then updated a file in Compat:\r\n```\r\njulia> using PyPlot\r\nINFO: Recompiling stale cache file /Users/stevenj/.julia/lib/v0.4/Compat.ji for module Compat.\r\nINFO: Recompiling stale cache file /Users/stevenj/.julia/lib/v0.4/LaTeXStrings.ji for module LaTeXStrings.\r\nINFO: Recompiling stale cache file /Users/stevenj/.julia/lib/v0.4/PyPlot.ji for module PyPlot.\r\nINFO: Recompiling stale cache file /Users/stevenj/.julia/lib/v0.4/PyCall.ji for module PyCall.\r\nINFO: Recompiling stale cache file /Users/stevenj/.julia/lib/v0.4/Color.ji for module Color.\r\nINFO: Recompiling stale cache file /Users/stevenj/.julia/lib/v0.4/FixedPointNumbers.ji for module FixedPointNumbers.\r\n```\r\nThis patch supersedes #12445.\r\n\r\nLike #12445, it adds a list of the dependency files to the `.ji` file, with a new `include_dependency(path)` function to manually supply non-`include` dependencies for a module.\r\n\r\n(Also as discussed in #12445, I changed the serialization metadata to use bigendian rather than littleendian storage, for ease of reading back in via `ntoh`.)\r\n\r\nOnce #12448 lands, it will be easy to add other information about the dependencies (e.g. checksums) if that is judged necessary in the future, but I think it is better to develop that incrementally.  (Merging a hash/checksum algorithm is a nontrivial task that is best left to a separate PR.)\r\n\r\nNote that you still have to manually `Base.compile` a module at least once—this PR only automates the *recompilation* of the image.  A separate PR can implement a `@cacheable` tag (or whatever) to allow modules to opt-in for automatic initial compilation."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/128088952","html_url":"https://github.com/JuliaLang/julia/pull/12458#issuecomment-128088952","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12458","id":128088952,"user":{"login":"timholy","id":1525481,"avatar_url":"https://avatars.githubusercontent.com/u/1525481?v=3","gravatar_id":"","url":"https://api.github.com/users/timholy","html_url":"https://github.com/timholy","followers_url":"https://api.github.com/users/timholy/followers","following_url":"https://api.github.com/users/timholy/following{/other_user}","gists_url":"https://api.github.com/users/timholy/gists{/gist_id}","starred_url":"https://api.github.com/users/timholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timholy/subscriptions","organizations_url":"https://api.github.com/users/timholy/orgs","repos_url":"https://api.github.com/users/timholy/repos","events_url":"https://api.github.com/users/timholy/events{/privacy}","received_events_url":"https://api.github.com/users/timholy/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T17:47:40Z","updated_at":"2015-08-05T17:47:40Z","body":"LGTM"}}