-
Notifications
You must be signed in to change notification settings - Fork 34
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
Eliminate "text file busy" errors #140
Conversation
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.
lgtm, pending @DaniPopes
crates/svm-rs/src/install.rs
Outdated
let named_temp_file = tempfile::NamedTempFile::new_in(data_dir())?; | ||
let (mut f, temp_path) = named_temp_file.into_parts(); |
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.
ah okay, all this does is write to a new tmp file and then move it to the correct location?
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.
Actually, that just unpacks the NamedTempFile
into a File
and a TempPath
.
The renaming occurs here:
svm-rs/crates/svm-rs/src/install.rs
Line 175 in 4c3867e
temp_path.persist(&solc_path)?; |
Some additional context:
FYI, I'm going to try to fix the Windows failure. |
d163426
to
e7daf1a
Compare
e7daf1a
to
c275d4c
Compare
There were two Windows problems:
Both of these should be fixed now. |
clippy unrelated |
Thanks! |
thank you 🫡 |
To get: alloy-rs/svm-rs#140
To get: alloy-rs/svm-rs#140
To get: alloy-rs/svm-rs#140
While running some tests involving Foundry, I have encountered "text file busy" errors, like described in #16.
This PR is currently organized as two commits:
can_install_while_solc_is_running
test - intentionally fails with "text file busy"Nits are welcome.
EDIT:
I'll be happy to fix the typo in the commit message, once you've had a chance to review.Fixed.