Please describe the problem.
Building git-annex with GHC 9.14/time 1.15 fails with error "Ambiguous occurrence ‘Seconds’." in
- Annex/StallDetection.hs,
- Assistant/Threads/Committer.hs,
- Assistant/Threads/Cronner.hs,
- Assistant/Threads/Exporter.hs
- Assistant/Threads/Watcher.hs
- Command/FuzzTest.hs
time 1.15 adds "Seconds" to Data.Time.Clock, leading to ambiguity. Easiest fix would probably be to hide the export, alternatively use qualified import.
What steps will reproduce the problem?
Build git-annex with GHC 9.14
What version of git-annex are you using? On what operating system?
OS: Arch Linux
Kernel: 7.0.13-arch1-1
GHC: 9.14
git-annex: 10.20251215, newer versions are also affected afaict, including the recently released 10.20260624
Please provide any additional information below.
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
[332 of 760] Compiling Annex.StallDetection ( Annex/StallDetection.hs, dist/build/git-annex/git-annex-tmp/Annex/StallDetection.dyn_o )
Annex/StallDetection.hs:58:23: error: [GHC-87543]
Ambiguous occurrence ‘Seconds’.
It could refer to
either ‘Utility.ThreadScheduler.Seconds’,
imported from ‘Utility.ThreadScheduler’ at Annex/StallDetection.hs:21:1-30
(and originally defined at Utility/ThreadScheduler.hs:32:19-48),
or ‘Data.Time.Clock.Seconds’,
imported from ‘Data.Time.Clock’ at Annex/StallDetection.hs:25:1-22
(and originally defined in ‘time-1.15:Data.Time.Clock.Internal.DiffTime’).
|
58 | minwaitsecs = Seconds $
| ^^^^^^^
Annex/StallDetection.hs:78:17: error: [GHC-87543]
Ambiguous occurrence ‘Seconds’.
It could refer to
either ‘Utility.ThreadScheduler.Seconds’,
imported from ‘Utility.ThreadScheduler’ at Annex/StallDetection.hs:21:1-30
(and originally defined at Utility/ThreadScheduler.hs:32:19-48),
or ‘Data.Time.Clock.Seconds’,
imported from ‘Data.Time.Clock’ at Annex/StallDetection.hs:25:1-22
(and originally defined in ‘time-1.15:Data.Time.Clock.Internal.DiffTime’).
|
78 | delay = Seconds (fromIntegral (durationSeconds duration) `div` 2)
| ^^^^^^^
Annex/StallDetection.hs:118:17: error: [GHC-87543]
Ambiguous occurrence ‘Seconds’.
It could refer to
either ‘Utility.ThreadScheduler.Seconds’,
imported from ‘Utility.ThreadScheduler’ at Annex/StallDetection.hs:21:1-30
(and originally defined at Utility/ThreadScheduler.hs:32:19-48),
or ‘Data.Time.Clock.Seconds’,
imported from ‘Data.Time.Clock’ at Annex/StallDetection.hs:25:1-22
(and originally defined in ‘time-1.15:Data.Time.Clock.Internal.DiffTime’).
|
118 | delay = Seconds (fromIntegral (durationSeconds duration))
| ^^^^^^^
# End of transcript or log.
Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Add a comment