{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaPy/pyjulia/issues/173","repository_url":"https://api.github.com/repos/JuliaPy/pyjulia","labels_url":"https://api.github.com/repos/JuliaPy/pyjulia/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/JuliaPy/pyjulia/issues/173/comments","events_url":"https://api.github.com/repos/JuliaPy/pyjulia/issues/173/events","html_url":"https://github.com/JuliaPy/pyjulia/issues/173","id":346340046,"node_id":"MDU6SXNzdWUzNDYzNDAwNDY=","number":173,"title":"How to use separate cache in Julia 0.7?","user":{"login":"tkf","id":29282,"node_id":"MDQ6VXNlcjI5Mjgy","avatar_url":"https://avatars3.githubusercontent.com/u/29282?v=4","gravatar_id":"","url":"https://api.github.com/users/tkf","html_url":"https://github.com/tkf","followers_url":"https://api.github.com/users/tkf/followers","following_url":"https://api.github.com/users/tkf/following{/other_user}","gists_url":"https://api.github.com/users/tkf/gists{/gist_id}","starred_url":"https://api.github.com/users/tkf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkf/subscriptions","organizations_url":"https://api.github.com/users/tkf/orgs","repos_url":"https://api.github.com/users/tkf/repos","events_url":"https://api.github.com/users/tkf/events{/privacy}","received_events_url":"https://api.github.com/users/tkf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-31T20:11:05Z","updated_at":"2018-07-31T20:11:05Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"While writing #172, I realized that it won't work in Julia 0.7 since the cache directory structure is completely different.  In Julia 0.7 it's `~/.julia/compiled/v0.7/{package name}/{slug}.ji` and this is the code that locates the path:\r\n\r\n```julia\r\ncache_file_entry(pkg::PkgId) = joinpath(\r\n    \"compiled\",\r\n    \"v$(VERSION.major).$(VERSION.minor)\",\r\n    pkg.uuid === nothing ? \"$(pkg.name).ji\" : joinpath(pkg.name, \"$(package_slug(pkg.uuid)).ji\")\r\n)\r\n\r\nfunction find_all_in_cache_path(pkg::PkgId)\r\n    paths = String[]\r\n    entry = cache_file_entry(pkg)\r\n    for depot in DEPOT_PATH\r\n        path = joinpath(depot, entry)\r\n        isfile_casesensitive(path) && push!(paths, path)\r\n    end\r\n    return paths\r\nend\r\n```\r\n\r\n--- https://github.com/JuliaLang/julia/blob/7a8459972e28fa1adf01a9c6d8d1227ec05a09d8/base/loading.jl#L594-L608\r\n\r\nIn principle, I guess we can do a similar trick we do with `Base.LOAD_CACHE_PATH` in 0.6 with `Base.DEPOT_PATH` in 0.7.  But creating a depot for each Python version sounds like a overkill since it has more than a cache directory.  Here is how they describe `Base.DEPOT_PATH`:\r\n\r\n> The first entry is the “user depot” and should be writable by and owned by the current user. The user depot is where: registries are cloned, new package versions are installed, named environments are created and updated, package repos are cloned, newly compiled package image files are saved, log files are written, development packages are checked out by default, and global configuration data is saved. Later entries in the depot path are treated as read-only and are appropriate for registries, packages, etc. installed and managed by system administrators.\r\n>\r\n> --- https://docs.julialang.org/en/latest/stdlib/Pkg/\r\n\r\nSo, what is the best way to support multiple Python interpreters in Julia 0.7?\r\n"}}
{"actor":{"display_login":"tkf"}}