-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
always create new cache files in default path when recompiling #14369
Conversation
79cf691
to
6b8cea7
Compare
@tkelman, it looks like AppVeyor is hitting a timeout on 64-bit Windows? Is this my fault, or is there some other recurring glitch? I'll just try pushing again... |
6b8cea7
to
06de426
Compare
Yay, tests are green. |
I'll plan to merge on Monday if there are no objections. |
touch(FooBar_file) | ||
insert!(Base.LOAD_CACHE_PATH, 1, dir2) | ||
Base.recompile_stale(:FooBar, joinpath(dir, "FooBar.ji")) | ||
sleep(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope this is enough for slow or highly-loaded systems? Would it be better to do a polling file watcher or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still isn't very future-proof. Needs improvement before I'd be comfortable backporting this. We shouldn't be making assumptions about how long distro buildbots, limited-resource VM's, or small embedded processors are going to take to do codegen here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recompile_stale
is synchronous, so the length of time to do the codegen is not relevant---it only returns when the compilation process is done.
sleep(2)
is only there for paranoia about reading a file on the filesystem that was created by another process which has just completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry about that, my mistake on what the sleep
was for. Could've used a comment to that effect.
always create new cache files in default path when recompiling
Fixes #14368, by always calling
Base.compilecache
when creating new cache files (including when recompiling), so that new cache files are always put in the same place (Base.LOAD_CACHE_PATH[1]
).Should probably be backported because this is causing problems on JuliaBox.