unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.73k stars 266 forks source link

Error E412939 while running transcript #4658

Closed fwip closed 4 months ago

fwip commented 7 months ago

Here's a bug I ran into, and can't reproduce.

I was running a transcript from within another program (a Rust build script), so I don't have as great certainly into what was actually run as I would like.

Transcript:

This is used to fetch the base library, which if cached, should speed up
subsequent builds.

```ucm

.> clone @unison/base/releases/2.12.0

.> clone @dfreeman/tv/releases/0.1.1

(There are closing backticks in the transcript, they're just not rendering here): [fetch_base.md](https://github.com/unisonweb/unison/files/14116919/fetch_base.md)
Here's the database after this command was run: [db_after_failure.zip](https://github.com/unisonweb/unison/files/14116933/db_after_failure.zip)

Error message:
Transcript will be run on a new, empty codebase.

Initializing a new codebase in: /Volumes/projects/futz/tauri-unison/tauri-unison-demo/src-tauri/build/project


|  |  |___|_|___ ___ ___
|  |  |   | |_ -| . |   |
|_____|_|_|_|___|___|_|_|

Running the provided transcript file...

⚙️ Processing stanza 2 of 2. --- stderr Uh oh, an unexpected exception brought the process down! That should never happen. Please file a bug report.

Here's a stringy rendering of the exception:

🐞

expectBranchForHash: CausalHash ("mdjahlpdsbjrvrn29g8ljm4uju49oqhpd7fp8tbdfidj83c38fa6tpm62neisddunc002kdcvb6fk5u0dc9puh1p48bnluuhrcm82d8") not found in codebase

This is a Unison bug and you can report it here:

https://github.com/unisonweb/unison/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+E412939+

Bug reference: E412939

If there's already an issue with this reference, you can give a 👍
on the issue to let the team know you encountered it, and you can add
any additional details you know of to the issue.

CallStack (from HasCallStack):
  error, called at src/Unison/Codebase.hs:271:16 in unison-parser-typechecker-0.0.0-HLhRfJvV6AvAZ9nxhsSOYZ:Unison.Codebase

I believe that the complete command run was:

src-tauri/binaries/ucm-aarch64-apple-darwin transcript --save-codebase-to src-tauri/build/base src-tauri/build_scripts/fetch_base.md



 This build script had run successfully a few times before the failure, so possibly it was due to temporary network factors?

UCM was version 0.5.13 for macos (apple silicon), downloaded direct from github. 
Running the command manually, or my build script again, works fine. I can't reproduce it, so I'm not sure if it's fixed in 0.5.14.
aryairani commented 7 months ago

Hmm thanks @fwip. Weird; we'll look into it. Do you think maybe 0.5.13 would reproduce it, but just not 0.5.14? We can try an older version on it.

(There are closing backticks in the transcript, they're just not rendering here)

Pro tip: For this, since the transcript includes ```, you have to enclose the whole code block in quadruple backticks (or greater) for it to parse right. e.g. ````markdown. I edited your issue description to reflect this.

fwip commented 7 months ago

Ah, thanks for the markdown tip! I also tried reproducing with 0.5.13, both with the build script and manually, and wasn't able to.

aryairani commented 4 months ago

I'm going to close this just because we can't reproduce it; but we can always reopen if something changes.