Skip to content

Remove calibrateMtimeChangeDelay, it's irrelevant for modern file systems - #11496

Merged
mergify[bot] merged 1 commit into
masterfrom
no-calibrateMtimeChangeDelay
Mar 1, 2026
Merged

Remove calibrateMtimeChangeDelay, it's irrelevant for modern file systems#11496
mergify[bot] merged 1 commit into
masterfrom
no-calibrateMtimeChangeDelay

Conversation

@Bodigrim

@Bodigrim Bodigrim commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator

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.

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:

@Bodigrim
Bodigrim force-pushed the no-calibrateMtimeChangeDelay branch 3 times, most recently from 8157360 to 7d5a397 Compare February 18, 2026 23:47
@geekosaur

Copy link
Copy Markdown
Collaborator

I find that somewhat amusing given that it was 2 seconds on FAT.

@geekosaur geekosaur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder if network file systems were ever relevant for this, though.

@Bodigrim
Bodigrim marked this pull request as ready for review February 19, 2026 02:32
@Bodigrim

Copy link
Copy Markdown
Collaborator Author

Could someone else provide a second review please?

@Bodigrim
Bodigrim force-pushed the no-calibrateMtimeChangeDelay branch from 7d5a397 to cd15477 Compare February 23, 2026 21:26
Comment thread changelog.d/pr-11496.md
@ulysses4ever

Copy link
Copy Markdown
Collaborator

all modern file systems (ext4, ntfs, apfs) have submicrosecond granularity

FAT is still relevant though?

@geekosaur

Copy link
Copy Markdown
Collaborator

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.

@Bodigrim

Bodigrim commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator Author

FAT is still relevant though?

  • I think it's extremely unlikely that anyone develops Cabal and needs to run the test suite on a thumb drive, which is what remaining FAT file systems are limited to nowadays.
  • If they must, the test suite accepts --mtime-change-delay to adjust the delay.
  • The removed calibrateMtimeChangeDelay was not good enough for FAT anyway: its delay was capped with 1 second, while FAT's granularity was 2 seconds.

…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`.
@Bodigrim
Bodigrim force-pushed the no-calibrateMtimeChangeDelay branch from cd15477 to ba7cd60 Compare February 24, 2026 20:35
@ulysses4ever

Copy link
Copy Markdown
Collaborator

All right, thank you for the answers

@Bodigrim Bodigrim added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Feb 26, 2026
@mergify mergify Bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Feb 26, 2026
@mergify

mergify Bot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

Rule: default


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
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Validate post job
    • check-skipped = Validate post job
    • check-success = Validate post job
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

Reason

The merge conditions cannot be satisfied due to failing checks

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

mergify Bot added a commit that referenced this pull request Feb 28, 2026
@mergify mergify Bot added dequeued and removed queued labels Feb 28, 2026
@geekosaur

geekosaur commented Feb 28, 2026

Copy link
Copy Markdown
Collaborator

I'll requeue it later. The latest weird build failure is Windows (usually 9.2.8) ghc-pkg silently exiting with a failure status.

@geekosaur

Copy link
Copy Markdown
Collaborator

@Mergifyio queue

@mergify

mergify Bot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

Rule: default


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
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

@mergify mergify Bot added the queued label Feb 28, 2026
@mergify mergify Bot removed the dequeued label Feb 28, 2026
mergify Bot added a commit that referenced this pull request Feb 28, 2026
@mergify
mergify Bot merged commit 071539a into master Mar 1, 2026
290 checks passed
@mergify
mergify Bot deleted the no-calibrateMtimeChangeDelay branch March 1, 2026 01:58
@mergify mergify Bot removed the queued label Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants