Skip to content
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

Desugarer: isolate counters to improve tracing logs readability #808

Open
emil14 opened this issue Dec 15, 2024 · 0 comments
Open

Desugarer: isolate counters to improve tracing logs readability #808

emil14 opened this issue Dec 15, 2024 · 0 comments
Assignees

Comments

@emil14
Copy link
Collaborator

emil14 commented Dec 15, 2024

At the moment counters are shared across all packages and entities, so each time we increment counter for e.g. __new__ node it increases the index for any next entity. This result to things like foo/bar/baz/__new__34 in the trace log and that confuses a lot. There might be only one __new__ in the foo/bar/baz and yet it has index 34.

Counters might at least be reset between packages (this way similar names shouldn't collide but we need to check), at max we could enforce unique names and reset counters between entities (we must be sure than virtual entities names are truly unique, for example __const__ entities are not, at the moment, because unlike nodes they won't have path prefix at runtime).

There was an attempt to make this naively but it resulted in a very hard to track bug, so I decided to keep things as is and to create this issue. Also it would be nice to have some kind of unit test for this, but I have no idea how to create it easily at the moment

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

No branches or pull requests

1 participant