Skip to content

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Oct 8, 2025

implementation of #147455

r? @joshtriplett

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 8, 2025

joshtriplett is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@chenyukang chenyukang marked this pull request as draft October 8, 2025 09:12
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2025
@chenyukang chenyukang force-pushed the yukang-api-set-times branch from f1ab883 to 1440cfb Compare October 8, 2025 09:59
@chenyukang
Copy link
Member Author

i'm following this PR: https://github.com/rust-lang/rust/pull/142938/files
somehow surprised we don't need to add unit test for a new api?

@rust-log-analyzer

This comment has been minimized.

@chenyukang chenyukang force-pushed the yukang-api-set-times branch 8 times, most recently from c135e31 to 20f1468 Compare October 8, 2025 16:25
@chenyukang chenyukang marked this pull request as ready for review October 8, 2025 17:28
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 8, 2025
@joshtriplett
Copy link
Member

@chenyukang If I'm reading the failure correctly, I think libc::AT_SYMLINK_NOFOLLOW doesn't exist on redox. set_times_nofollow is using it unconditionally on all unix platforms, but it won't exist on some of them.

I think the right fix for that is to pass a follow_symlinks: bool to the internal helper function, and then have the target-specific cfg branches translate that into the appropriate flag for their platform. That would also avoid the logic in the apple case that translates to the correct flag for apple.

@chenyukang
Copy link
Member Author

@chenyukang If I'm reading the failure correctly, I think libc::AT_SYMLINK_NOFOLLOW doesn't exist on redox. set_times_nofollow is using it unconditionally on all unix platforms, but it won't exist on some of them.

I think the right fix for that is to pass a follow_symlinks: bool to the internal helper function, and then have the target-specific cfg branches translate that into the appropriate flag for their platform. That would also avoid the logic in the apple case that translates to the correct flag for apple.

good idea, I updated the code.

@chenyukang
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 16, 2025
@joshtriplett
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 17, 2025

📌 Commit 8182085 has been approved by joshtriplett

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 17, 2025
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Oct 17, 2025
…=joshtriplett

Implement fs api set_times and set_times_nofollow

implementation of rust-lang#147455

r? `@joshtriplett`
bors added a commit that referenced this pull request Oct 17, 2025
Rollup of 6 pull requests

Successful merges:

 - #144936 (CFI: Fix types that implement Fn, FnMut, or FnOnce)
 - #147468 (Implement fs api set_times and set_times_nofollow)
 - #147660 (rustdoc-search: stringdex 0.0.2)
 - #147735 (Micro-optimization in `FunctionCx::initialize_locals`)
 - #147764 (Undo CopyForDeref assertion in const qualif)
 - #147783 (bootstrap: migrate to object 0.37)

r? `@ghost`
`@rustbot` modify labels: rollup
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 17, 2025
…=joshtriplett

Implement fs api set_times and set_times_nofollow

implementation of rust-lang#147455

r? ``@joshtriplett``
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 17, 2025
…=joshtriplett

Implement fs api set_times and set_times_nofollow

implementation of rust-lang#147455

r? ```@joshtriplett```
bors added a commit that referenced this pull request Oct 17, 2025
Rollup of 7 pull requests

Successful merges:

 - #140153 (Implement `Debug` for `EncodeWide`)
 - #147454 (Fix backtraces with `-C panic=abort` on qnx; emit unwind tables by default)
 - #147468 (Implement fs api set_times and set_times_nofollow)
 - #147494 (std::thread spawn: Docs: Link to Builder::spawn; Make same.)
 - #147783 (bootstrap: migrate to object 0.37)
 - #147792 (Fix autodiff incorrectly applying fat-lto to proc-macro crates )
 - #147809 (rustdoc: Fix passes order so intra-doc links are collected after stripping passes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Oct 18, 2025
Rollup of 8 pull requests

Successful merges:

 - #140153 (Implement `Debug` for `EncodeWide`)
 - #145724 (the `#[track_caller]` shim should not inherit `#[no_mangle]`)
 - #147258 (iter repeat: panic on last)
 - #147454 (Fix backtraces with `-C panic=abort` on qnx; emit unwind tables by default)
 - #147468 (Implement fs api set_times and set_times_nofollow)
 - #147764 (Undo CopyForDeref assertion in const qualif)
 - #147805 (use module_child index as disambiguator for external items)
 - #147824 (docs: update Motor OS target docs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fc65029 into rust-lang:master Oct 18, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 18, 2025
rust-timer added a commit that referenced this pull request Oct 18, 2025
Rollup merge of #147468 - chenyukang:yukang-api-set-times, r=joshtriplett

Implement fs api set_times and set_times_nofollow

implementation of #147455

r? ````@joshtriplett````
@joshtriplett
Copy link
Member

@chenyukang Thanks for working on this!

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 21, 2025
motor: Add new `set_times` stubs

Motor OS `std` support (rust-lang#147000) and `set_times`/`set_times_nofollow` (rust-lang#147468) were merged around the same time, so Motor OS is missing this API and currently fails to build.

cc `@lasiotus`
rust-timer added a commit that referenced this pull request Oct 21, 2025
Rollup merge of #147930 - thaliaarchi:motor-set-times, r=joboet

motor: Add new `set_times` stubs

Motor OS `std` support (#147000) and `set_times`/`set_times_nofollow` (#147468) were merged around the same time, so Motor OS is missing this API and currently fails to build.

cc `@lasiotus`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-wasm Target: WASM (WebAssembly), http://webassembly.org/ S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants