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

Evaluation into the closed module Calculus breaks incremental compilation... #151

Open
omalled opened this issue Aug 7, 2020 · 0 comments

Comments

@omalled
Copy link

omalled commented Aug 7, 2020

I have a complex code that broke when I switched from Julia 1.4 to Julia 1.5. The breakage seems to be intertwined with the Calculus package. I have tried but failed to produce an MWE (sorry about that). The context is that my complex code is doing some code generation in a macro and then calling Calculus.simplify(ex) on some generated expressions. The error I get when running my complex code is

Evaluation into the closed module `Calculus` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `Calculus` with `eval` during precompilation - don't do this.

The stack trace leads me to this line. It seems like the eval is the source of the problem. Would there be any harm in evaling in Main rather than Calculus itself? Switching that line to

return (@static (VERSION < v"0.7.0-DEV.5149") ? eval : Core.eval)(Main, ex)

solves my problem and all the tests still pass. I'd be happy to submit a pull request, but not sure if that solution would be accepted.

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

No branches or pull requests

1 participant