{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12445","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12445/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12445/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12445/events","html_url":"https://github.com/JuliaLang/julia/pull/12445","id":98831580,"number":12445,"title":"store/retrieve dependencies in .ji file","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":null,"comments":1,"created_at":"2015-08-03T20:21:59Z","updated_at":"2015-08-03T20:24:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/12445","html_url":"https://github.com/JuliaLang/julia/pull/12445","diff_url":"https://github.com/JuliaLang/julia/pull/12445.diff","patch_url":"https://github.com/JuliaLang/julia/pull/12445.patch"},"body":"As discussed in #12259, as a prerequisite to automated image recompilation, this stores all of the dependencies of a module in the `.ji` file:\r\n\r\n* The modules that were depended on were already stored in the `.ji` header.\r\n* Now the `.ji` header also stores the pathnames of all files that were `included` by the compiled module and its submodules (but *not* files `included` by imported modules)\r\n* There is also a new `include_dependency(filename)` function to \"manually\" declare a dependency of the module on some other file that is not an `included` `.jl` file.\r\n* `Base.cache_dependencies(cachefile)` returns `(modules, files)` where `modules` is an array of the module names and `files` is an array of the filenames stored in the file.\r\n\r\nTo do:\r\n- [ ] document `include_dependency`\r\n- [ ] deal with endian-ness mismatch in `cache_dependencies`\r\n- [ ] test case\r\n\r\nOn the last point, I noticed something odd: the `write_int32` functions etc. in `src/dump.c` read and write in little-endian order.  This is confusing to me, since:\r\n\r\n* If we are going to write in a fixed byte-order, surely it should be bigendian (network) order?  Otherwise I will have to write the equivalent of `ntoh` for little-endian order to read the data.\r\n* If we are going to write in native order, why do `write_int32` etc. read/write byte-by-byte, as opposed to just writing all the bytes directly from the `int32_t*`?\r\n\r\nI tried changing these functions to use big-endian order, but it crashed on me, so I'm thinking that there is somewhere else in the code that relies on little-endian serialization? "},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/127397462","html_url":"https://github.com/JuliaLang/julia/pull/12445#issuecomment-127397462","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12445","id":127397462,"user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T20:24:12Z","updated_at":"2015-08-03T20:24:12Z","body":"Would it make sense for the format to be flexible enough to store a variety of properties of each dependency? E.g. have room for content hashes and timestamps?"}}