You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I think we haven't completely forgotten the lesson and we place an extra burden on developers to keep the .cabal files backward and forward compatible via a system of explicit file format versions, a recorded and automatically consulted changelog, etc. I guess we don't do this for project files, the ~/cabal/config file, freeze files nor anything else and, frankly, the burden could be too much. However, if you have a concrete proposal to improve the situation, ideally more light-weight, let's discuss.
I didn't mean we forgot it for cabal files, but we finally had a robust setup for .cabal, and then we introduce a new filetype and didn't build similar infrastructure into it from the start.
~/.cabal/config shouldn't really need anything, since it corresponds to whatever cabal is on the local system, but cabal.project files don't necessarily. Freeze files in particular could have a version like cabal-version easily enough, since they're almost always generated by cabal (I don't think anyone is handwriting freeze files, neither are they expected to).
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:
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.
The text was updated successfully, but these errors were encountered: