-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
add renameat2 and flags #1508
add renameat2 and flags #1508
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Note that I changed the definition of the flags to match the This means the type now diverges from those in |
Not an issue, but @josephlr might want to take a look at those. Looking at the CI errors, these are apparently broken on musl. You might want to move these to the |
09464cf
to
8463a87
Compare
Seems fine. This divergence is expected and shouldn't break anything. |
See rust-lang/libc#1508 The type of the RENAME_* constants has been adjusted to match the type (unsigned int) of the syscall parameter. Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
The renameat2 syscall is available as a glibc wrapper since the libc crate now supports glibc 2.28+. See rust-lang/libc#1508
@bors: r+ |
📌 Commit 8463a87 has been approved by |
add renameat2 and flags This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
💔 Test failed - status-azure |
8463a87
to
ad29be4
Compare
Regarding the CI issues: I have rustfmt 1.3 (stable) here which doesn’t catch Can’t comment on that linker error on sparc or what seems to be an update |
|
ad29be4
to
fea39c1
Compare
Sorry, there is no nightly toolchain on stock Fedora 30 and rustup |
@cuviper might be able to give some advice. I don't think this problem has a great solution. Every stable rustfmt point release produces different formatting as well, due to bugs being fixed, etc. So picking one single rustfmt version isn't really a great solution to this problem either :/ I'm open to suggestions. We definitely have some freedom about which rustfmt version we pick. We could also just use rustfmt in an advisory position, and just reformat the library before each release. But sadly rustfmt isn't always idempotent (e.g. |
Rustup can be made to live alongside system Rust toolchain: https://github.com/rust-lang/rustup.rs#working-with-distribution-rust-packages |
Yeah, I also use rustup that way myself. Picking a rustfmt version for CI is hard, but I don't think tracking nightly is the best. If nothing else, it's annoying for contributors if they have to fix unrelated formatting in their PR, just because it changed in nightly. Implicitly tracking stable is a little better because that changes less frequently. But I think it's best to choose an explicit stable version, even if as a maintainer you always bump it to latest stable -- that act of bumping can catch up on any formatting changes at the same time. |
FWIW the main reason libc uses nightly rustfmt is that you need nightly rust to run |
Sure, that's reasonable. |
@mati865: Those instructions proved incomplete for me; rustup outright |
@bors: r+ |
📌 Commit fea39c1 has been approved by |
add renameat2 and flags This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
💔 Test failed - checks-cirrus-freebsd-12 |
@bors: r+ |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit fea39c1 has been approved by |
add renameat2 and flags This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
💔 Test failed - status-azure |
add renameat2 and flags This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
@bors r- retry |
@bors: retry |
@bors: r+ |
📌 Commit fea39c1 has been approved by |
add renameat2 and flags This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
💔 Test failed - status-azure |
@bors: retry There is a failure in sparc64, and it appears legit, but lets try one more time. |
add renameat2 and flags This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
💔 Test failed - status-azure |
☔ The latest upstream changes (presumably #1639) made this pull request unmergeable. Please resolve the merge conflicts. |
This used to be PR rust-lang#554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
☔ The latest upstream changes (presumably #1638) made this pull request unmergeable. Please resolve the merge conflicts. |
Hey, seems like there was an issue merging this in but the build is now gone. Can we try again and I'll check out the failure if there's one? |
This used to be PR #554.
Adapted to match the current state of libc. Also, adapt for the
fact that in Linux, the flags argument is of type unsigned,
not int.