Skip to content

Conversation

@marko-subotic
Copy link

Working on #769. I wrote a script to parse a file and add the $ prefix to global variables that don't have it, another to use this to format all files, and third to verify that all files don't have compiler warnings.

I left the scripts off the commit to avoid cluttering the repo with one-off scripts, but if they might be used in the future to format computer generated files, I can add them.

@marko-subotic marko-subotic requested a review from a team as a code owner January 23, 2026 18:10
@marko-subotic marko-subotic requested review from saulshanabrook and removed request for a team January 23, 2026 18:10
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 23, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing marko-subotic:main (ba2caec) with main (b98b178)

Summary

✅ 22 untouched benchmarks
⏩ 190 skipped benchmarks1

Footnotes

  1. 190 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! We discussed and would actually like the script you used in the PR as well (:
Now that you have fixed this, could you also enable strict mode in all egglog tests in files.rs?


(rule ((Wrap 1))
((let a (Wrap 1)))) No newline at end of file
((let $a (Wrap 1)))) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we should also have a variant of this test where this line has (let a (Wrap 1)) which should also fail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are at it, if the rule comes before the global it should be allowed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I enable strict mode, all of the term_encoding tests fail. One way to fix this (I think) is to change the INTERNAL_PREFIX variable from @ to $@, that seems dirty because I have no idea if they're always supposed to be global.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. I'd say let's just disable strict mode for term encoding tests for now.
In the future I'll make the term encoding work by adding the global prefix when it generates names.

@marko-subotic marko-subotic requested a review from oflatt January 23, 2026 23:37
Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -0,0 +1,40 @@
#!/usr/bin/env python3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this folder should be in a dev_utilities folder for clarity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants