-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fixes #342 by handling error in object file race condition #379
base: dev
Are you sure you want to change the base?
Conversation
To do: add spin + timeout on writing of the standard library file in the first place. |
Okay so much for that idea. Windows apparently doesn't provide native support for atomic file operations. Going to try locking next. |
Why is the CI not running the build-vehicle tests? |
Error when evaluating 'runs-on' for job 'build-vehicle'. .github/workflows/build-vehicle.yml (Line: 10, Col: 14): Unexpected type of value '', expected type: OneOf. |
Should we worry about these test failures?
They’re from the latest runs, any modification in this PR was already made. Is it possible you’ve just made this failure less likely? |
Any sense implementing this with atomic filter operations on Linux and macOS anyway, since that would be the best way to go about it? |
Could we use atomic-file-ops? It uses Or, circumventing the need for another library, we could do an atomic write by writing to a temporary file and then renaming it. (The only caveat is that on Windows you must make sure that the temporary file is on the same file system.) That should give us atomic writes. Then the whole procedure for the standard library, and for object files in general, can be to check if the file already exists, and if it doesn’t, atomically write it. We might end up doing some extra work, but as long as the result is deterministic, that’s not a huge issue. The only issue might be when we’re interleaving compilation of user files, when an older compilation (from before an edit) writes the object file after the newer compilation. But that’s a bridge we’ll cross later. |
Yes, we should be worrying about them.
I don't understand. I've tested it locally on my Linux install, and the locking is working. So it's not the locking primitives that are wrong, it's my understanding of the race conditions.
I'm not sure it'll help, because I think it's my logic that's wrong not the locking itself. |
No description provided.