Skip to content

Fixes #12299 #12324

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

Closed
Closed

Conversation

hissssst
Copy link
Contributor

@hissssst hissssst commented Jan 8, 2023

No description provided.

# TODO handle unescapable values which are deeper in the structure
{key, value} when is_reference(x) or is_pid(x) or is_port(x) -> {key, nil}
{key, value} -> {key, value}
end)
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately this is much more expensive. I think you can do:

env = put_in(env.lexical_tracker, nil)

and that should be it. We don't have any improper fields anywhere else. :)

If you want, you can add a test that traverses the result of Macro.expand recursively and verifies there is no improper data. :)

@josevalim josevalim closed this in db219bc Jan 14, 2023
josevalim added a commit that referenced this pull request Jan 14, 2023
@hissssst hissssst deleted the lexical_tracker_env_escape branch January 14, 2023 16:28
@hissssst
Copy link
Contributor Author

@josevalim , thanks for closing the issue, I am sorry that I didn't finish it, I just don't have enough time for opensource right now

@josevalim
Copy link
Member

It is no worries, I had to take a look at it anyway, because returning nil could change semantics and I went with changing the typespecs!

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

Successfully merging this pull request may close these issues.

2 participants