-
Notifications
You must be signed in to change notification settings - Fork 38
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
Refactor traces in the compiler #1429
Conversation
We were only using shadow variables for this purpose, and it was a lot of additional complexity.
Not sure what is going on with the MacOS CI setup. Will try again later in the day, perhaps is some instability. |
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.
LGTM! Added a comment about the remaining FIXME.
This one seems pretty subtle, so I'm not sure I have a lot to add due to my lacking context, but I didn't spot anything that seemed obviously strange to me.
The MacOS test seems to be consistently failing, I also retried it; not sure what is going on there, the log is pretty sparse, but it seems some part of the tests passes, and it fails during a setup step?
@@ -224,6 +224,7 @@ const otherOperators = [ | |||
{ name: 'fail', effect: propagateComponents(['read', 'update'])(1) }, | |||
{ name: 'assert', effect: propagateComponents(['read'])(1) }, | |||
{ name: 'q::debug', effect: propagateComponents(['read'])(2) }, | |||
{ name: 'q::lastTrace', effect: parseAndQuantify('Pure') }, // FIXME: Should be in run mode |
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.
just making sure, is this FIXME something that should be fixed in this PR?
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.
Nope, we don't really have a run mode yet. I didn't find a good issue to link, so I just kept it as a reminder.
I just changed the problematic jq setup action to a different one. There are plenty available, and this one worked :) |
Hello
Towards #1379
Many ideas involving debugging and mbt-oriented features require updates in the compiler. Currently, the
compilerImpl.ts
file is 1833 lines long, and I guess modern LSP solutions are not prepared for files this big, because my editor is struggling a lot!So I'm trying to improve this file a bit. I start by removing the concept of shadow variables. I think we used to have many shadow variables, and therefore we introduced this abstraction, but right now we only have the trace, and I think it is quite unecessary to have it instead of simply keeping the trace in an attribute.
I also extracted trace manipulation logic to a new file.
Behavior shouldn't change, this is simply a refactor.