-
-
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
precompile shouldn't try to overwrite stale read-only cache files #14368
Comments
Probably the |
Would it be better to just check for write permissions and skip updating the cache file if it is readonly? It seems to fall back to I tried with the following change in
|
Checking file permissions isn't a reliable way to determine whether a file can be deleted. For example, in Unix you need write permissions to the directory, and on a network file system or with access control lists, it's up to the file server anyway. It is usually easier to just try to delete the file, and check the error condition afterwards. |
Ah yes. So, then may be a |
Even if it is writable, I don't think we should be writing new cache files to arbitrary locations in the path. I think it is better to always write new files to e.g. if someone ships me a |
Ok, yes that sounds reasonable. |
I'm also getting the "read-only file system" error when trying to add PyPlot to my JuliaBox instance with kernel 0.4.2. Although this issue has been closed in December... I'm guessing it hasn't been installed to the JuliaBox server yet. How/when does that happen, and how would we come to know it when it does? |
#14369 was backported to 0.4.3, so juliabox should just need an upgrade to that. |
@tkelman Thanks for making it clearer. |
A lot of people are seeing failures on JuliaBox (JuliaCloud/JuliaBox#338, JuliaPy/PyPlot.jl#185, JuliaLang/IJulia.jl#159) because JuliaBox ships precompiled cache files in a read-only directory
/opt/julia_packages/.julia/lib/v0.4/
. If these cache files are stale, Julia tries to recompile them, but it begins by trying to delete the stale old cache file, which throws an exception, e.g.The text was updated successfully, but these errors were encountered: