You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using CBindingGen.jl to generate C bindings in P4est.jl, certain nested structures now cause errors (likely due to some changes in #43). When building the bindings in P4est.jl and then loading the package with
git clone git@github.com:trixi-framework/P4est.jl.git
julia --project=P4est.jl/ -e 'using Pkg; Pkg.build()'
julia --project=P4est.jl/ -e 'using P4est'
I get the following errors:
WARNING: Method definition (::Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|owner_rank::(𝐣𝐥.Cint))})(UndefInitializer) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|owner_rank::(𝐣𝐥.Cint)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|owner_rank::(𝐣𝐥.Cint))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition strategy(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|owner_rank::(𝐣𝐥.Cint))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition specification(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|owner_rank::(𝐣𝐥.Cint))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition sizeof(Type{P4est.LibP4est.Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|owner_rank::(𝐣𝐥.Cint)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition (::Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|from_tree::(p4est_topidx_t))})(UndefInitializer) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|from_tree::(p4est_topidx_t)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|from_tree::(p4est_topidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition strategy(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|from_tree::(p4est_topidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition specification(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|from_tree::(p4est_topidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition sizeof(Type{P4est.LibP4est.Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|from_tree::(p4est_topidx_t)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition (::Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|local_num::(p4est_locidx_t))})(UndefInitializer) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|local_num::(p4est_locidx_t)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|local_num::(p4est_locidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition strategy(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|local_num::(p4est_locidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition specification(Type{P4est.LibP4est.(Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|local_num::(p4est_locidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition sizeof(Type{P4est.LibP4est.Cstruct_anonymous|native|which_tree::(p4est_topidx_t)|local_num::(p4est_locidx_t)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition (::Type{P4est.LibP4est.(Cstruct_anonymous|native|is_ghost::(int8_t)|quad::(𝐣𝐥.Ptr{p8est_quadrant_t})|quadid::(p4est_locidx_t))})(UndefInitializer) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:143.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.Cstruct_anonymous|native|is_ghost::(int8_t)|quad::(𝐣𝐥.Ptr{p8est_quadrant_t})|quadid::(p4est_locidx_t)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:154.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition concrete(Type{P4est.LibP4est.(Cstruct_anonymous|native|is_ghost::(int8_t)|quad::(𝐣𝐥.Ptr{p8est_quadrant_t})|quadid::(p4est_locidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:155.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition strategy(Type{P4est.LibP4est.(Cstruct_anonymous|native|is_ghost::(int8_t)|quad::(𝐣𝐥.Ptr{p8est_quadrant_t})|quadid::(p4est_locidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:156.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition specification(Type{P4est.LibP4est.(Cstruct_anonymous|native|is_ghost::(int8_t)|quad::(𝐣𝐥.Ptr{p8est_quadrant_t})|quadid::(p4est_locidx_t))}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:157.
** incremental compilation may be fatally broken for this module **
WARNING: Method definition sizeof(Type{P4est.LibP4est.Cstruct_anonymous|native|is_ghost::(int8_t)|quad::(𝐣𝐥.Ptr{p8est_quadrant_t})|quadid::(p4est_locidx_t)}) in module LibP4est at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158 overwritten at /home/mschlott/.julia/packages/CBinding/Z7nQ0/src/caggregate.jl:158.
** incremental compilation may be fatally broken for this module **
I checked the bindings file, and the issues are due to nested structs such as these two (taken from deps/libp4est.jl after executing the commands above):
Hey, look on the bright side, at least you don't get these warnings any more 😆
┌ Warning: file /home/mschlott/.julia/packages/CBinding/Vcw7p/src/caggregate.jl, line 151: no method found for Tuple{typeof(CBinding.concrete),Type{##S#254}}
└ @ LoweredCodeUtils ~/.julia/packages/LoweredCodeUtils/Y1zIf/src/signatures.jl:460
The deterministic names definitely breaks precompilation. Unfortunately, none of my use cases featured duplicate inner anonymous aggregate types. When I explicitly tested this, I did so in the REPL, which doesn't have any problem with it.
I can conditionally generate the declarations if the type hasn't been defined yet, but I'm not sure how Revise is going to like that. Perhaps @timholy could shed some light on that scenario?
When using
CBindingGen.jl
to generate C bindings in P4est.jl, certain nested structures now cause errors (likely due to some changes in #43). When building the bindings in P4est.jl and then loading the package withI get the following errors:
I checked the bindings file, and the issues are due to nested structs such as these two (taken from
deps/libp4est.jl
after executing the commands above):Do you have an idea what could cause this issue? I did not occur when the names were still gensymmed.
The text was updated successfully, but these errors were encountered: