Immutable remote-repos get unnecessary "too old" warning
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Actions: set a remote repo to something like:
```
remote-repo: stackage-2014-11-27-ghc78-exc-1:http://www.stackage.org/snapshot/2014-11-27-ghc78-exc-1
```
Run `cabal update`. A few days later (in my case, 16, I don't know the exact cutoff in the cabal-install codebase) run `cabal update` again. You'll see something like:
```
$ cabal update
Downloading the latest package list from
stackage-35ecbe20461b5fe50bad1e5653f6660132861fe9
Skipping download: Local and remote files match.
Warning: The package list for
'stackage-35ecbe20461b5fe50bad1e5653f6660132861fe9' is 16 days old.
Run 'cabal update' to get the latest list of available packages.
```
The issue is that Stackage server uses cache headers to indicate that the package index hasn't changed. But cabal-install continues to believe that the package index is 16 days old. Ideally, cabal-install would:
1. Update the last modified time each time it does an update, even if there is no new index file.
2. Perhaps inspect cache headers to note how long to cache the package index, and not warn the user during that time.
Contributor guide
Assessment
This issue has not been assessed yet.