Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorporate ucm crash messages into transcript output? #5502

Open
aryairani opened this issue Dec 12, 2024 · 1 comment
Open

incorporate ucm crash messages into transcript output? #5502

aryairani opened this issue Dec 12, 2024 · 1 comment
Labels

Comments

@aryairani
Copy link
Contributor

This transcript

> x = 5
test = do x
scratch/main> add

crashes with this error

Terms:

fromList [("k09e57l61rlkr4ss203vrsvs17cnva4i343qogd8o4dgg7n77qlr8mh5qku582liqteu4ve0bdiom298pi6abimnhveni6uvoh310h8",BufferEntry {beComponentTargetSize = Nothing, beComponent = fromList [], beMissingDependencies = fromList [], beWaitingDependents = fromList ["qtej4q0nfrvlg2verneppcaef2p2fk7t0c89s0vc45o91u6fos066aqo66mq2dcsnbusepnkdhoq6h212r6cu4br89bphvoh687q1o0"]}),("qtej4q0nfrvlg2verneppcaef2p2fk7t0c89s0vc45o91u6fos066aqo66mq2dcsnbusepnkdhoq6h212r6cu4br89bphvoh687q1o0",BufferEntry {beComponentTargetSize = Just 1, beComponent = fromList [(0,((λ (Delay. Ref(ReferenceDerived (Id "k09e57l61rlkr4ss203vrsvs17cnva4i343qogd8o4dgg7n77qlr8mh5qku582liqteu4ve0bdiom298pi6abimnhveni6uvoh310h8" 0)))):ReferenceDerived (Id "00nv2kob8fp11qdkr750rlppf81cda95m3q0niohj1pvljnjl4r3hqrhvp1un2p40ptgkhhsne7hocod90r3qdlus9guivh7j3qcq0g" 0) -> ({[]} ReferenceBuiltin "Nat"),ReferenceDerived (Id "00nv2kob8fp11qdkr750rlppf81cda95m3q0niohj1pvljnjl4r3hqrhvp1un2p40ptgkhhsne7hocod90r3qdlus9guivh7j3qcq0g" 0) -> ({[]} ReferenceBuiltin "Nat")))], beMissingDependencies = fromList ["k09e57l61rlkr4ss203vrsvs17cnva4i343qogd8o4dgg7n77qlr8mh5qku582liqteu4ve0bdiom298pi6abimnhveni6uvoh310h8"], beWaitingDependents = fromList []})]
repro4949-2.md EXCEPTION!!!: SqliteQueryException {sql = "SELECT object.id FROM object JOIN hash ON object.primary_hash_id = hash.id WHERE hash.base32 = ? COLLATE NOCASE", params = [SQLText "qtej4q0nfrvlg2verneppcaef2p2fk7t0c89s0vc45o91u6fos066aqo66mq2dcsnbusepnkdhoq6h212r6cu4br89bphvoh687q1o0"], exception = ExpectedExactlyOneRowException {rows = "[]"}, callStack = [("throwSqliteQueryException",SrcLoc {srcLocPackage = "unison-sqlite-0.0.0-LUByOcm4q8NEsFKluJmxoc", srcLocModule = "Unison.Sqlite.Connection", srcLocFile = "src/Unison/Sqlite/Connection.hs", srcLocStartLine = 286, srcLocStartCol = 7, srcLocEndLine = 286, srcLocEndCol = 32}),("gqueryListCheck",SrcLoc {srcLocPackage = "unison-sqlite-0.0.0-LUByOcm4q8NEsFKluJmxoc", srcLocModule = "Unison.Sqlite.Connection", srcLocFile = "src/Unison/Sqlite/Connection.hs", srcLocStartLine = 274, srcLocStartCol = 3, srcLocEndLine = 274, srcLocEndCol = 18}),("queryListRowCheck",SrcLoc {srcLocPackage = "unison-sqlite-0.0.0-LUByOcm4q8NEsFKluJmxoc", srcLocModule = "Unison.Sqlite.Connection", srcLocFile = "src/Unison/Sqlite/Connection.hs", srcLocStartLine = 257, srcLocStartCol = 3, srcLocEndLine = 257, srcLocEndCol = 20}),("queryOneRow",SrcLoc {srcLocPackage = "unison-sqlite-0.0.0-LUByOcm4q8NEsFKluJmxoc", srcLocModule = "Unison.Sqlite.Connection", srcLocFile = "src/Unison/Sqlite/Connection.hs", srcLocStartLine = 263, srcLocStartCol = 41, srcLocEndLine = 263, srcLocEndCol = 52}),("queryOneCol",SrcLoc {srcLocPackage = "unison-sqlite-0.0.0-LUByOcm4q8NEsFKluJmxoc", srcLocModule = "Unison.Sqlite.Transaction", srcLocFile = "src/Unison/Sqlite/Transaction.hs", srcLocStartLine = 289, srcLocStartCol = 24, srcLocEndLine = 289, srcLocEndCol = 46}),("queryOneCol",SrcLoc {srcLocPackage = "unison-codebase-sqlite-0.0.0-LdTaF9rHVqv6fyRhLOZYdy", srcLocModule = "U.Codebase.Sqlite.Queries", srcLocFile = "./U/Codebase/Sqlite/Queries.hs", srcLocStartLine = 834, srcLocStartCol = 3, srcLocEndLine = 834, srcLocEndCol = 14})], connection = Connection { name = "transcript", file = "/private/var/folders/7j/rwwnwnyn0djb5tw9bnxhd5bc0000gn/T/transcript7165/.unison/v2/unison.sqlite3" }, threadId = ThreadId 22}

but doesn't produce any transcript output.

@sellout
Copy link
Contributor

sellout commented Dec 13, 2024

I was just about to open this same issue, after creating a transcript for #5453.

While we don’t want exceptions to happen, we should at least be able to add exceptional transcripts to unison-src/transcripts/errors, and have them pass. But we don’t catch the exceptions, and so EasyTest just yells “EXCEPTION!!!”.

Maybe we can get partial output, but I don’t think we want to have exceptions as something permitted by :error (or even :bug), as we would never want them to be intentional.

E.g., the case I have for #5453 looks like

This causes an exception (it shouldn’t, but it should error)
``` unison :error
ability MyAbility g where
  get : '{MyAbility {g}} ()
```
The proper declaration is:
``` unison
ability MyAbility g where
  get : '{MyAbility g} ()
```

So, my expectation is that putting that in transcripts/errors would result in the transcript passing because the stanza has an exception, but once the exception is fixed, the transcript will fail, because the stanza will then error as it is expected to. At which point, we move the transcript to transcripts/idempotent, close the ticket, and smile because a bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants