-
-
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
compilecache should use same path as require, and treat cache as stale if path changes #12725
Conversation
1aec581
to
b737a04
Compare
static jl_value_t *unique_func = NULL; | ||
if (!unique_func) | ||
unique_func = jl_get_global(jl_base_module, jl_symbol("unique")); | ||
jl_array_t *udeps = deps && unique_func ? (jl_array_t *) jl_apply((jl_function_t*)unique_func, (jl_value_t**)&deps, 1) : NULL; |
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.
although I think it's safe here since we don't allocate any other memory before being done with this array, I'd be more comfortable if we rooted it anyway. That way it wont blow up if someone changes the code later to allocate something.
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.
Thanks, I've added JL_GC_PUSH
/JL_GC_POP
.
b22d195
to
19e1737
Compare
jl_array_t *udeps = deps && unique_func ? (jl_array_t *) jl_apply((jl_function_t*)unique_func, (jl_value_t**)&deps, 1) : NULL; | ||
|
||
if (udeps) { | ||
JL_GC_PUSH(udeps); |
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.
Should be &udeps
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.
whoops, will fix.
LGTM. |
19e1737
to
bbda02e
Compare
…d .ji files should be considered stale if the module is no longer found at the same path
bbda02e
to
4b24670
Compare
Rebased after #12723. |
compilecache should use same path as require, and treat cache as stale if path changes
This fixes #12722:
Base.compilecache
should use same path asrequire
(in particular, it shouldn't look in.
if that is not inLOAD_PATH
). Also,.ji
files should be considered stale if the module is no longer found at the same path as when the.ji
file was compiled.