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

Failure to precompile on 1.12: cannot declare Flux.destructure public; it is already declared exported #2583

Closed
IanButterworth opened this issue Jan 13, 2025 · 3 comments

Comments

@IanButterworth
Copy link
Contributor

On julia nightly b671c9dcdd with

  [587475ba] Flux v0.16.0
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.0-DEV.1879 (2025-01-13)
 _/ |\__'_|_|_|\__'_|  |  Commit b671c9dcdd (0 days old master)
|__/                   |
...
Failed to precompile Flux [587475ba-b771-5e3f-ad9e-33799f191a9c] to "/Users/ian/.julia/compiled/v1.12/Flux/jl_prJnow".
ERROR: LoadError: cannot declare Flux.destructure public; it is already declared exported
Stacktrace:
 [1] include(mod::Module, _path::String)
   @ Base ./Base.jl:300
 [2] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base ./loading.jl:2995
 [3] top-level scope
   @ stdin:6
 [4] eval(m::Module, e::Any)
   @ Core ./boot.jl:485
 [5] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:2846
 [6] include_string
   @ ./loading.jl:2856 [inlined]
 [7] exec_options(opts::Base.JLOptions)
   @ Base ./client.jl:327
 [8] _start()
   @ Base ./client.jl:558
in expression starting at /Users/ian/.julia/packages/Flux/Mhg1r/src/Flux.jl:1
in expression starting at stdin:6
@IanButterworth
Copy link
Contributor Author

From what I can tell, destructure comes from Optimisers.jl where it is exported, and is @reexport-ed here

@reexport using Optimisers

But not sure why this has only just started erroring.

Optimisers.jl has exported destructure for 3 years
https://github.com/FluxML/Optimisers.jl/blame/91569f63a8f75520a6b60293c9c013f921ae0ee3/src/Optimisers.jl#L16

And Reexport.jl hasn't changed in 3 years.

CI on the repo from 4 days ago shows Flux compiling on 1.12, and I can't see any changes to julia in the last 4 days that would make this more strict..

@IanButterworth
Copy link
Contributor Author

Actually, Flux master d79811a just precompiled for me successfully.

@IanButterworth
Copy link
Contributor Author

Fixed by #2569

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