-
Notifications
You must be signed in to change notification settings - Fork 118
Fix download and extraction of NINJA_SYNTAX #295
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
Conversation
|
Full output before: Full output after: |
* With this Dockerfile: FROM oraclelinux:10 RUN dnf install git COPY . /mx ENV PATH=/mx:$PATH WORKDIR /mx RUN mx version RUN ls -la ~/.mx/cache/NINJA_SYNTAX* RUN ls -la ~/.mx/cache/NINJA_SYNTAX*/* RUN ls -la ~/.mx/cache/NINJA_SYNTAX*/*/* RUN mx path --download NINJA_SYNTAX RUN ls -la ~/.mx/cache/NINJA_SYNTAX* RUN ls -la ~/.mx/cache/NINJA_SYNTAX*/*/* * Before this commit it's clear that ~/.mx/cache/NINJA_SYNTAX*/*/* is empty and remains empty even after `mx path --download NINJA_SYNTAX`. * After this commit, NINJA_SYNTAX is downloaded as soon as NinjaProject.resolveDeps is called.
742fbe9 to
0b93908
Compare
|
For some reason |
|
Huh... I think this is actually a corner case in the But after extracting, it's failing to delete the already existing directory. The error is: This is the error you get when you try to do an atomic move/rename across device boundaries. Why move? We're moving the directory out of the way before Why device boundaries? Because the "old" (empty)
Note that this won't happen if you put the mx cache in a volume. Which is probably why we're not catching this in our internal testing. But we should still fix that bug. |
FYI there is a long standing issue (GR-48582) "Transient failure to find ninja_syntax" |
|
Thank you for the analysis, your fix sounds good. I wonder if we should still just vendor ninja_syntax.py and call it a day, would be much simpler, but if things work I don't mind either way. |
|
Yes if works now with your |
|
Fixed by 61380fd |
~/.mx/cache/NINJA_SYNTAX*/*/*is empty and remains empty even aftermx path --download NINJA_SYNTAX.NinjaProject.resolveDepsis called.I found this bug while using mx in Docker and this bug in initialization causes permanent errors like: