unison icon indicating copy to clipboard operation
unison copied to clipboard

Database Integrity Error when no Unit in codebase

Open ChrisPenner opened this issue 3 years ago • 1 comments

Given a fresh codebase

And this scratch file:

x = ()

The following causes a database integrity error:

.> add

  ⍟ I've added these definitions:

    x : ()

Encountered Exception: DatabaseIntegrityError (NoObjectForPrimaryHashId (HashId 5))
CallStack (from HasCallStack):
  error, called at src/Unison/Codebase/SqliteCodebase.hs:925:29 in unison-parser-typechecker-0.0.0-6GFzkoMkw4W5u57A5cQFCX:Unison.Codebase.SqliteCodebase

This issue doesn't occur in transcripts or if you run builtins.mergeio first.

ChrisPenner avatar Feb 17 '22 16:02 ChrisPenner

This is still true in 0.5.23

aryairani avatar Jun 30 '24 00:06 aryairani