Skip to content

Caching downloaded remote source package tarballs is broken #11511

@hasufell

Description

@hasufell

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/stable-haskell/filemonitor-test.git
  2. cd filemonitor-test
  3. cabal build
  4. cabal build

Result:

$ cabal build
Downloading
https://hackage.haskell.org/package/filepath-1.5.5.0/filepath-1.5.5.0.tar.gz
Configuration is affected by the following files:
- cabal.project
Up to date

$ cabal build
Downloading
https://hackage.haskell.org/package/filepath-1.5.5.0/filepath-1.5.5.0.tar.gz
Configuration is affected by the following files:
- cabal.project
Up to date

Expected behavior

We download only once.

System information

  • Operating system: OpenSUSE Tumbleweed
  • cabal-3.16.1.0, ghc-9.14.1

Additional context

This seems to be an issue with the file monitoring in fetchAndReadSourcePackageRemoteTarball, detecting an mtime change of the tarball compared to the "start time" of the monitor. This whole file monitoring is over-engineered garbage and should be ripped out and implemented like make does (by synchronizing mtime of input and output files).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions