forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix different .cachepath initialization points for precompile load (J…
…uliaLang#45149) For quite some time I've been observing Revise randomly not pick up changes to my packages. Usually I just write that off to Revise getting into a bad state and restarting Julia fixes it. Today, I got very annoyed by this again and decided to finally track it down. What turns out to happen here is the packages in question are those which: A. Are being precompiled on load B. Use Requires C. Have an `@require`'d-dependency already loaded D. The change to be revised is made in a file not loaded via Requires.jl. In this case the `__init__` of the package triggers Requires, which in turn calls back to Revise, which tries to start watching the package. However, on the `compilecache` path (but not on the path where we just find a pre-existing cache file), we used to not set the .cachepath property of `pkgorigins` until after the `__init__` callbacks run, causing Revise not to be able to see those files. Infuriatingly, restarting julia fixes this because it just loads the .ji file that was just compiled. Fix this by unifying the point at which the .cachepath is set, always setting it just prior to the module initialization callback.
Showing
2 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters