Forward compat story for cabal.project(.freeze)?
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
So, 5 years ago, hvr wrote up a nice issue (#4899) on forward/backward compat for cabal file formats. Unfortunately, we seem to have immediately forgotten the lessons of this issue, because cabal.project(.freeze) is now in the same state as cabal files were back then. Newer cabal's (in my case 3.6) will happily produce files with an output that's not understood by older cabal versions, leading to cryptic errors when you try to build the same project with an older cabal.
Specifically, my 3.6 freeze file introduces the line: `active-repositories: hackage.haskell.org:merge`
Which on 3.2 produces the error:
```
cabal: Error parsing project freeze file
/home/mverstra/gpu/cabal.project.freeze:265:
Parse of field 'index-state' failed (index-state must be a unix-timestamps
(e.g. '@1474732068'), a ISO8601 UTC timestamp (e.g. '2016-09-24T17:47:48Z'),
or 'HEAD'): hackage.haskell.org 2022-05-13T07:41:48Z
```
Ideally we'd get some userfriendly error reporting for cases like this, which would require some form of forward compat (i.e. old cabal's being able to determine a project/freeze file is too new for them) approach. Especially since I can imagine further compat breaking changes going forward with all the plans to integrate conditionals/snapshots/etc.
Contributor guide
Assessment
This issue has not been assessed yet.