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

Error UndefVarError: @compiler_options not defined #137

Closed
CourtA96 opened this issue Jun 6, 2022 · 8 comments
Closed

Error UndefVarError: @compiler_options not defined #137

CourtA96 opened this issue Jun 6, 2022 · 8 comments

Comments

@CourtA96
Copy link

CourtA96 commented Jun 6, 2022

The @compiler_options macro is no longer defined in Base.Experimental, which causes an UndefValError when precompiling MLStyle. I forked the package and changed every line that read:

if isdefined(Base, :Experimental)
    @eval Base.Experimental.@compiler_options optimize=0 compile=min infer=no
end

to

if isdefined(Base.Experimental, :compiler_options)
    @eval Base.Experimental.@compiler_options optimize=0 compile=min infer=no
end

and that seemed to fix the issue for me. I don't know if this fix impacts the functioning of the package though.

@thautwarm
Copy link
Owner

Your fix seems correct.
I don't have an idea if Base.Experimental is always available since Julia 1.0?
Anyway thanks for your notification! I will investigate this soon, and PRs are welcome!

@thautwarm
Copy link
Owner

thautwarm commented Jun 10, 2022

Hello. I've just started working on this. I found that in the master branch of julia repo, stdlibs are still referencing this under @compiler_options under Base.Experimental. Could you please provide more information about your working environment?

@CourtA96
Copy link
Author

I was using the default environment for Julia 1.3.1. The older versions of Julia don't have @compiler_options defined in Base.Experimental. When I raised this issue, I hadn't realized that I had reverted to an older version, so I assumed @compiler_options must have been deleted. Now that I'm back to Julia 1.6.1 the error doesn't occur.

I'm sorry for the confusion!

@hofmannmartin
Copy link

I am using GeneralizedGenerated.jl in my package and GeneralizedGenerated.jl depends on MLStyle.jl. My package stopped working under julia-1.3.1 do to this issue. Any hope of getting this issue resolved?

@thautwarm
Copy link
Owner

@hofmannmartin can you try the latest version of MLStyle?

@hofmannmartin
Copy link

works like a charm with the latest Version. Thank you.

@thautwarm
Copy link
Owner

@CourtA96 I think 0.4.13 works for Julia 1.0-1.8, could you help verify this? I want to close this issue.

@CourtA96
Copy link
Author

Yes, it's working for me now in Julia 1.3.1. Thanks!

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

3 participants