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
Consider the servant-cassava.cabal file: It has a Hackage x-revision field checked in the repository which, interestingly, was never applied on Hackage.
cabal2nix, however, recognizes this and sets the revision and even editedCabalFileSha256 (I have no clue yet where this hash comes from). Arguably, when cabal2nixing a revision of a git repo where the modifications of the revision are checked in, it doesn't make sense to fetch the revision from Hackage (it may even fail as in this case). Fixing this will require careful checking if there are any cases where this would be desireable and, most importantly, how this works exactly in all-cabal-hashes, so we don't regress hackage2nix.
Another question is of course if x-revision entries should even be checked in, but seeing as the have been, maybe not that important. Workaround is of course to overrideCabal { revision = null; editedCabalFileSha256 = null; }.
The text was updated successfully, but these errors were encountered:
I don't think the old behavior is ever desirable. When cabal2nix is given source code it shouldn't be doing IO to get other source code, full stop. That just doesn't make sense at all. In general, don't mix IO with business logic like that too.
There is some nuance to it, since there is a difference between being given a cabal file and being given source code. This difference is already present in the fetcher code, so I think we just need to mirror it for the revision logic.
robx
added a commit
to PostgREST/postgresql-libpq
that referenced
this issue
Sep 5, 2022
Consider the servant-cassava.cabal file: It has a Hackage
x-revision
field checked in the repository which, interestingly, was never applied on Hackage.cabal2nix
, however, recognizes this and sets therevision
and eveneditedCabalFileSha256
(I have no clue yet where this hash comes from). Arguably, whencabal2nix
ing a revision of a git repo where the modifications of the revision are checked in, it doesn't make sense to fetch the revision from Hackage (it may even fail as in this case). Fixing this will require careful checking if there are any cases where this would be desireable and, most importantly, how this works exactly inall-cabal-hashes
, so we don't regresshackage2nix
.Another question is of course if
x-revision
entries should even be checked in, but seeing as the have been, maybe not that important. Workaround is of course tooverrideCabal { revision = null; editedCabalFileSha256 = null; }
.The text was updated successfully, but these errors were encountered: