Skip to content
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 creation time support to FileTimes on apple and windows #109773

Merged
merged 2 commits into from
May 19, 2023

Conversation

beetrees
Copy link
Contributor

@beetrees beetrees commented Mar 30, 2023

Adds support for setting file creation times on platforms which support changing it directly (currently only Apple and Windows). Based on top of #110093 (which was split from this PR).

ACP: rust-lang/libs-team#199 (currently still in progress)

Tracking issue: #98245

@rustbot label +T-libs-api -T-libs

@rustbot
Copy link
Collaborator

rustbot commented Mar 30, 2023

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@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 Mar 30, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 30, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Mar 30, 2023
@beetrees
Copy link
Contributor Author

@rustbot label -T-libs

@rustbot rustbot removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Mar 30, 2023
@cuviper
Copy link
Member

cuviper commented Mar 30, 2023

Also refactors existing support for 64-bit time_t on 32-bit glibc platforms, as riscv32 time_t is 64-bit by default.

That part looks fine with me, and might deserve an independent PR. You should create an ACP for the API addition.
r? libs-api

@beetrees
Copy link
Contributor Author

I've created an ACP at rust-lang/libs-team#199 and split the refactor out into #109784.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 31, 2023
Refactor glibc time64 support, riscv32 always has 64-bit `time_t`

Refactor existing support for 64-bit `time_t` on 32-bit glibc platforms, as riscv32 `time_t` is 64-bit by default. Split out of rust-lang#109773.
@Amanieu
Copy link
Member

Amanieu commented Apr 8, 2023

Thanks! You still need to remove the RISC-V commit from this PR.

Could you add a test in library/std/src/fs/tests.rs? Just try setting the file time and reading it back to ensure it worked.

@Amanieu
Copy link
Member

Amanieu commented Apr 8, 2023

LGTM! This PR is still marked as a draft, are there any more changes or is it ready to merge?

@beetrees
Copy link
Contributor Author

beetrees commented Apr 8, 2023

I've removed the left-over commit and added a test for FileTimes (the test tests setting accessed and modified times as well as creation time as there aren't any tests for setting file times at the moment).

@beetrees beetrees marked this pull request as ready for review April 8, 2023 21:00
@beetrees
Copy link
Contributor Author

beetrees commented Apr 8, 2023

It's ready to merge; I just marked it as a draft because it was blocked on the ACP.

@Amanieu
Copy link
Member

Amanieu commented Apr 8, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Apr 8, 2023

📌 Commit c2a0a9a494c7467c90dd76c4e344d1952f2a424c has been approved by Amanieu

It is now in the queue for this repository.

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 13, 2023
…s, r=Amanieu

Add creation time support to `FileTimes` on apple and windows

Adds support for setting file creation times on platforms which support changing it directly (currently only Apple and Windows). Based on top of rust-lang#110093 (which was split from this PR).

ACP: rust-lang/libs-team#199 (currently still in progress)

Tracking issue: rust-lang#98245

`@rustbot` label +T-libs-api -T-libs
@bors
Copy link
Contributor

bors commented Apr 13, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 13, 2023
@rust-log-analyzer

This comment has been minimized.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 1, 2023
…riplett

Add 64-bit `time_t` support on 32-bit glibc Linux to `set_times`

Add support to `set_times` for 64-bit `time_t` on 32-bit glibc Linux platforms which have a 32-bit `time_t`. Split from rust-lang#109773.

Tracking issue: rust-lang#98245
@bors
Copy link
Contributor

bors commented May 2, 2023

☔ The latest upstream changes (presumably #111066) made this pull request unmergeable. Please resolve the merge conflicts.

@beetrees beetrees force-pushed the set-file-time-improvements branch from f31c34c to 246dcbc Compare May 15, 2023 14:27
@beetrees
Copy link
Contributor Author

I've fixed the test failure and resolved the merge conflicts. Sorry about the delay.

@Amanieu
Copy link
Member

Amanieu commented May 19, 2023

@bors r+

@bors
Copy link
Contributor

bors commented May 19, 2023

📌 Commit 246dcbc has been approved by Amanieu

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 May 19, 2023
@bors
Copy link
Contributor

bors commented May 19, 2023

⌛ Testing commit 246dcbc with merge 521f4da...

@bors
Copy link
Contributor

bors commented May 19, 2023

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 521f4da to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 19, 2023
@bors bors merged commit 521f4da into rust-lang:master May 19, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 19, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (521f4da): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.7%, 0.8%] 4
Regressions ❌
(secondary)
0.6% [0.3%, 0.7%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.7%, 0.8%] 4

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.1% [4.1%, 4.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) 4.1% [4.1%, 4.1%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 643.295s -> 641.28s (-0.31%)

@rustbot rustbot added the perf-regression Performance regression. label May 19, 2023
@lqd
Copy link
Member

lqd commented May 20, 2023

I believe this to be noise that has since then returned to steady state. This PR being the rising edge of the last bump in the following graphs.

image

image

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label May 20, 2023
@beetrees beetrees deleted the set-file-time-improvements branch February 16, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants