-
Notifications
You must be signed in to change notification settings - Fork 205
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
LF: Add context in missing package errors #10418
Conversation
0d9ce42
to
b7f7047
Compare
b7f7047
to
7b0fa1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -1410,6 +1410,7 @@ private[lf] object SBuiltin { | |||
throw SpeedyHungry( | |||
SResultNeedPackage( | |||
tyCon.packageId, | |||
language.Reference.Exception(tyCon), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we ever hit this? I thought loading the packages during preprocessing should be enough to make sure we never run into this so this is an internal error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In off-ledger mode, there is no preprocessing and the validation can be skipped.
So we can change that to internal error, assuming off-ledger engines have to preload everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
off-ledger engines should already preload everything I believe so that seems like a reasonable requirement. Doesn’t have to be in this PR though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it is probably fine to skip completely the check and wait the lookup of the definition fails.
Since the ref of the definition is a ExceptionMessageDefRef
the error message will get from com.daml.lf.speedy.Speedy.Machine#lookupVal
should be clear enough.
explaining the origining of missing package. This is part of #9974 CHANGELOG_BEGIN CHANGELOG_END
7b0fa1a
to
0267e6e
Compare
cc @daravep |
explaining the origining of the missing package.
This is builton top of #10314.
This is part of #9974.
CHANGELOG_BEGIN
CHANGELOG_END
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.