Open robstewart57 opened 9 years ago
This assertion failure can still be observed. The code for the invariant that fails is now here:
https://github.com/haskell/cabal/blob/a5ddb14e0a648ea8608d0de987c417cb17c16441/Cabal/src/Distribution/Simple/PackageIndex.hs#L169-L192
I am just seeing this after a cabal update
:
The index-state is set to 2023-02-03T06:00:23Z.
However, I cannot make the assertion failure go away by reverting the index:
cabal v2-update 'hackage.haskell.org,2023-01-30T21:21:45Z'
Note that doesn't revert the index. It simply uses the "total" index but with entries truncated as of the specified time. When things are not screwy, this should be indistinguishable from actually using the index as of that specified time. But when things are screwy, then, well...
I am not able to reproduce this issue. Is there any particular package I should try to build to observe this?
If there's no reproducer, should we close it?
I saw this recently in this scenario:
cabal build
.version:
field in the .cabal
file.cabal
mentioned that it observed that the .cabal
file has changed, and it would reconfigure the package.Subsequent calls to cabal build
now failed with the invariant violation.
I used cabal clean
to get out of this bad state; cabal build
couldn't recover from it by its own means.
Good, that's something that we should start working with, I think. Volunteers are welcome! Not closing then.
cabal install
is throwing the following error:Line 163 is
mkPackageIndex
, which usesinvariant
at line 138.I've modified this function to print out the two lists compared (which throws
False
to throw the "Assertion failed" error), i.e. themap
andsort
. There is one difference: thesort
list has an additional elementInstalledPackageId ""
. The lists in full are:For
map
:For
sort
:Where is the additional
InstalledPackageId ""
element in the sorted list coming from?