Skip to content

Conversation

@tausbn
Copy link
Contributor

@tausbn tausbn commented Jan 9, 2026

This PR contains all of the changes that are needed in order to get all of the overlay[local] annotations to compile.

@github-actions github-actions bot added the Python label Jan 9, 2026
@tausbn tausbn force-pushed the tausbn/python-prepare-for-overlay-annotations branch 2 times, most recently from 8c13fc5 to 4ad5118 Compare January 9, 2026 15:23
Removes the dependence on the (global) `ModuleVariableNode.getARead()`,
by adding a local version (that doesn't include `import *` reads)
instead.
@tausbn tausbn force-pushed the tausbn/python-prepare-for-overlay-annotations branch from 4ad5118 to 832d6fb Compare January 9, 2026 15:38
This may result in more nodes, but it should still be bounded by the
number of global variables in the source code.
@tausbn tausbn force-pushed the tausbn/python-prepare-for-overlay-annotations branch from e5b485f to fc43d22 Compare January 9, 2026 17:01
tausbn added 3 commits January 9, 2026 17:12
With `ModuleVariableNode`s now appearing for _all_ global variables (not
just the ones that actually seem to be used), some of the tests changed
a bit. Mostly this was in the form of new flow (because of new nodes
that popped into existence). For some inline expectation tests, I opted
to instead exclude these results, as there was no suitable location to
annotate. For the normal tests, I just accepted the output (after having
vetted it carefully, of course).
Overriding both `argumentOf` and `toString` was causing sadness for the
local annotations. Easiest fix was to split these out into their own
subclasses. The names are perhaps a bit too verbose now (alternative
suggestions are welcomed).
@tausbn tausbn force-pushed the tausbn/python-prepare-for-overlay-annotations branch from d07c7fd to 705ab6b Compare January 12, 2026 16:54
We just create one for each call, not just the ones that capture
variables.

Of course, this causes a _lot_ of nodes to be instances of
`CapturedVariablesArgumentNode`, which made the override of `toString`
problematic, so that was removed as well.
@tausbn tausbn force-pushed the tausbn/python-prepare-for-overlay-annotations branch from 705ab6b to 6c95109 Compare January 12, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants