-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Supercharge traces #978
Supercharge traces #978
Commits on Jul 18, 2024
-
Allow variadic arguments in trace
Although, doesn't do anything with them yet. The idea is to simplify the use of trace to make it a lot more useful than it currently is.
Configuration menu - View commit details
-
Copy full SHA for f9719af - Browse repository at this point
Copy the full SHA f9719afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 754ed07 - Browse repository at this point
Copy the full SHA 754ed07View commit details
Commits on Jul 19, 2024
-
Add 'diagnostic' to the prelude, as well as companion functions.
This is not fully satisfactory as it pollutes a bit the prelude. Ideally, those functions should only be visible and usable by the underlying trace code. But for now, we'll just go with it.
Configuration menu - View commit details
-
Copy full SHA for beb5ac4 - Browse repository at this point
Copy the full SHA beb5ac4View commit details -
Allow serialisable (Data-able) arguments to trace
Somehow, we have to patch some function in gen_uplc because of the module name. I have to look further into this because it isn't normal.
Configuration menu - View commit details
-
Copy full SHA for f823681 - Browse repository at this point
Copy the full SHA f823681View commit details -
Remove unnecessary code_gen patch.
This is a little weird but, prelude functions are handled slightly differently.
Configuration menu - View commit details
-
Copy full SHA for 5afcc9b - Browse repository at this point
Copy the full SHA 5afcc9bView commit details -
re-introduce code-gen patch, but with a test.
Actually, this has been a bug for a long time it seems. Calling any prelude functions using a qualified import would result in a codegen crash. Whoopsie. This is now fixed as shown by the regression test.
Configuration menu - View commit details
-
Copy full SHA for a9d782e - Browse repository at this point
Copy the full SHA a9d782eView commit details -
Rework 'compact' mode for traces
- Trace-if-false are now completely discarded in compact mode. - Only the label (i.e. first trace argument) is preserved. - When compiling with tracing _compact_, the first label MUST unify to a string. This shouldn't be an issue generally speaking and would enforce that traces follow the pattern ``` label: arg_0[, arg_1, ..., arg_n] ``` Note that what isn't obvious with these changes is that we now support what the "emit" keyword was trying to achieve; as we compile now with user-defined traces only, and in compact mode to only keep event labels in the final contract; while allowing larger payloads with verbose tracing.
Configuration menu - View commit details
-
Copy full SHA for d6fd37c - Browse repository at this point
Copy the full SHA d6fd37cView commit details -
Display expected patterns/tokens in parse error when applicable.
We've never been using those 'expected' tokens captured during parsing, which is lame because they contain useful information! This is much better than merely showing our infamous "Try removing it!"
Configuration menu - View commit details
-
Copy full SHA for 2922c0a - Browse repository at this point
Copy the full SHA 2922c0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 30ddfa2 - Browse repository at this point
Copy the full SHA 30ddfa2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89890f3 - Browse repository at this point
Copy the full SHA 89890f3View commit details