-
Notifications
You must be signed in to change notification settings - Fork 12
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
WASI symlink implementation is incorrect #51
Comments
Until rust-lang/rust#68574 is fixed, it's best to either use symlink via |
I knew that... That's totally why I haven't merged yet...
…On Fri, Jan 29, 2021, 6:02 PM Ingvar Stepanyan ***@***.***> wrote:
Until rust-lang/rust#68574
<rust-lang/rust#68574> is fixed, it's best to
either use symlink via libc, or fallback to not supporting them
altogether.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKUFSYDPBIH4YN2VG3YAQ3S4NLCJANCNFSM4WZY4HRQ>
.
|
Can't tell if you're just joking or I'm misunderstanding what you're saying 🤔 The PR above is merged... |
FWIW I meanwhile made a PR to Rust to expose the correct API: rust-lang/rust#81542 Let's see how that goes... |
Sorry, I meant it's the reason I haven't pushed and was joking. The reason I haven't pushed is 🅻🅸🅵🅴 I'll hold off on updating the library until someone tells me the implementation is correct. I'd be willing to also accept a PR to add a crate feature for |
Ah, that's how I understood it first too, but wanted to double-check :) I have a pending PR to implement correct behaviour for symlinks, but first had to make some PRs to add WASI support to Now that Stebalien/tempfile#138 is merged, I'll be able to make a PR here soon-ish too. |
As described in vitiral#51, current implementation is incorrect and won't work and, as described in rust-lang/rust#68574, there was no correct way to use that API. I went ahead and added a new API for symlinks in rust-lang/rust#81542, and now that it's landed, it can be used to correctly create symlinks. Fixes vitiral#51.
Fix in #52 (ignoring the tests for now, as the situation around temporary files in WASI is pretty tricky and the previous implementation didn't work with them either, so no point in blocking on them). |
As described in #51, current implementation is incorrect and won't work and, as described in rust-lang/rust#68574, there was no correct way to use that API. I went ahead and added a new API for symlinks in rust-lang/rust#81542, and now that it's landed, it can be used to correctly create symlinks. Fixes #51.
Actually, wait, this PR is wrong. The file descriptor in the API is supposed to be a preopen directory descriptor, not the descriptor for the target file.
Originally posted by @RReverser in #50 (comment)
The text was updated successfully, but these errors were encountered: