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

Precompile bug #39907

Closed
timholy opened this issue Mar 3, 2021 · 2 comments
Closed

Precompile bug #39907

timholy opened this issue Mar 3, 2021 · 2 comments
Labels
regression Regression in behavior compared to a previous version

Comments

@timholy
Copy link
Member

timholy commented Mar 3, 2021

Today FileIO and Revise stopped building due to some changes in the behavior of precompile directives. For Revise, I thought I had commented the problematic lines in timholy/Revise.jl#612, thinking that it didn't happen on Linux (and indeed the Ubuntu workers for GitHub Actions passed), but then a user reported that it happens even on Fedora: timholy/Revise.jl#613. Moreover, others have seen this in other repos, e.g., FileIO: tlnagy/TiffImages.jl#35 (comment)

Since I'm on Ubuntu I can't replicate this easily but a guess at a MWE might be something like this:

julia> foo(x; kwargs...) = x
foo (generic function with 1 method)

julia> m = @which foo(1)
foo(x; kwargs...) in Main at REPL[2]:1

julia> fbody = Base.bodyfunction(m)
#foo#5 (generic function with 1 method)

julia> methods(fbody)
# 1 method for generic function "#foo#5":
[1] var"#foo#5"(kwargs, ::typeof(foo), x) in Main at REPL[2]:1

julia> using MethodAnalysis

julia> foo(1)
1

julia> methodinstances(fbody)
1-element Vector{Core.MethodInstance}:
 MethodInstance for var"#foo#5"(::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(foo), ::Int64)

julia> precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(foo), Int64) )
true

I'm guessing that returns false for some people.

EDIT: actually this has nothing to do with the platform, other than the fact that the nightlies came out at different times.

@timholy timholy added the regression Regression in behavior compared to a previous version label Mar 3, 2021
@timholy timholy changed the title Precompile bug on non-Linux Precompile bug ~~on non-Linux~~ Mar 3, 2021
@timholy timholy changed the title Precompile bug ~~on non-Linux~~ Precompile bug Mar 3, 2021
@simeonschaub
Copy link
Member

Ref c0f9666#commitcomment-47798892

@vtjnash
Copy link
Member

vtjnash commented May 27, 2021

Closed by #39905

@vtjnash vtjnash closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

3 participants