-
Notifications
You must be signed in to change notification settings - Fork 362
mink: crash silently if no scry handler #7225
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
Conversation
| =/ result | ||
| ?~ scry ~ | ||
| (scry product.ref product.path) | ||
| ?~ scry [%2 trace] |
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.
Let's move this up to the top of %12 -- nock as opposed mock should crash as soon as it encounters the %12, not after resolving subformulas.
|
like that? this would also require a change in runtime |
|
Just in case, currently in Vere 409 Mock crashes of the scry gate being |
|
pkg/arvo/sys/hoon.hoon
Outdated
| [11 [tag.formula 1 product.clue] 1 product.next] | ||
| :: | ||
| [%12 ref=* path=*] | ||
| ?~ scry !! |
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.
I meant that it should [%2 trace] here. But that's wrong given the actual behavior of vere, it should be in the original position where you wrote it. The bail:exit in u3m_soft_exc() corresponds to actually running the scry handler, with the arguments already computed.
If we want +mink with a ~ scry handler to behave as if %12 was completely undefined, we'd have to add that check-and-crash explicitly in the bytecode interpreter.
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 other words, you should just revert 0647548, that was my bad.
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.
If we want +mink with a ~ scry handler to behave as if %12 was completely undefined, we'd have to add that check-and-crash explicitly in the bytecode interpreter.
Alternatively we could add a check in soft_esc that bails with u3nc(4, c3__exit) if gul is 0. Then scry handler 0 acts the same as any other atomic scry handler, and we can keep this Hoon definition of mink
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.
actually no, ?~ would still need to be moved after subformulas are resolved
|
The metabail ensures that the runtime follows +mink's behavior. A crash in the scry gate is not a crash in the nock being virtualized, but in the parent context. That shouldn't need to change. |
This reverts commit 0647548.
Adresses urbit/vere#865 (comment)
Removes jet mismatch: currently the runtime exits from the inner road with no additional trace if %12 is executed with scry gate being
~