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

Undefined symbols when invoked in an anonymous module #86

Closed
blepabyte opened this issue Oct 16, 2022 · 0 comments · Fixed by #87
Closed

Undefined symbols when invoked in an anonymous module #86

blepabyte opened this issue Oct 16, 2022 · 0 comments · Fixed by #87
Labels
bug Something isn't working

Comments

@blepabyte
Copy link

Minimal example:

let
    m = Module()
    Base.eval(m, :(using Infiltrator))
    Base.eval(m, :(asdf = 3))
    Base.eval(m, :(@infiltrate))
end

Although the variable asdf shows up in the tab autocomplete, trying to evaluate it fails, though accessing it through @__MODULE__ (which evaluates to Main.anonymous) works:

infil> asdf
ERROR: UndefVarError: asdf not defined
infil> (@__MODULE__).asdf
3

The issue is not present if the let block is removed and the anonymous module is assigned in global scope.

  • Julia 1.8.2
  • Infiltrator v1.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants