Skip to content
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

Merged
merged 1 commit into from
Dec 14, 2015

Conversation

stevengj
Copy link
Member

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.

@stevengj
Copy link
Member Author

@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...

@stevengj
Copy link
Member Author

Yay, tests are green.

@stevengj
Copy link
Member Author

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)
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

stevengj added a commit that referenced this pull request Dec 14, 2015
always create new cache files in default path when recompiling
@stevengj stevengj merged commit 62b7d31 into JuliaLang:master Dec 14, 2015
@stevengj stevengj deleted the fixrecompile branch December 14, 2015 14:33
stevengj added a commit that referenced this pull request Jan 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants