Remove calibrateMtimeChangeDelay, it's irrelevant for modern file systems - #11496
Conversation
8157360 to
7d5a397
Compare
|
I find that somewhat amusing given that it was 2 seconds on FAT. |
geekosaur
left a comment
There was a problem hiding this comment.
I do wonder if network file systems were ever relevant for this, though.
|
Could someone else provide a second review please? |
7d5a397 to
cd15477
Compare
FAT is still relevant though? |
|
For development / operation, or only for data transfer? Thumb drives are still slow enough that running from one isn't exactly recommended, and it's been a long time since computers shipped with preinstalled FAT filesystems. |
|
…tems There was time long ago when different file systems clocked file modification time with significant granularity and `calibrateMtimeChangeDelay` had its purpose. But this time is long gone and for the past decade all modern file systems (ext4, ntfs, apfs) have submicrosecond granularity. `calibrateMtimeChangeDelay` was used only in test suites and returned values between 10ms and 1s. We can safely default it to 10ms, because all modern file systems have finer precision. It's a low risk change: after all it's only for tests, not for Cabal itself. (Interestingly, it seems `calibrateMtimeChangeDelay` was never really fit for purpose: its output is capped with 1s, while granularity of FAT filesystem is 2s) As an extra precaution, modification time delay remains configurable in the test suite via `--mtime-change-delay`.
cd15477 to
ba7cd60
Compare
|
All right, thank you for the answers |
Merge Queue StatusRule:
This pull request spent 1 hour 40 minutes 57 seconds in the queue, including 1 hour 30 minutes 17 seconds running CI. Required conditions to merge
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. |
|
I'll requeue it later. The latest weird build failure is Windows (usually 9.2.8) |
|
@Mergifyio queue |
Merge Queue StatusRule:
This pull request spent 2 hours 17 minutes 36 seconds in the queue, including 2 hours 6 minutes 33 seconds running CI. Required conditions to merge
|
There was time long ago when different file systems clocked file modification time with significant granularity and
calibrateMtimeChangeDelayhad its purpose. But this time is long gone and for the past decade all modern file systems (ext4, ntfs, apfs) have submicrosecond granularity.calibrateMtimeChangeDelaywas used only in test suites and returned values between 10ms and 1s. We can safely default it to 10ms, because all modern file systems have finer precision. It's a low risk change: after all it's only for tests, not for Cabal itself.As an extra precaution, modification time delay remains configurable in the test suite via
--mtime-change-delay.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.