thautwarm / MLStyle.jl

Julia functional programming infrastructures and metaprogramming facilities
https://thautwarm.github.io/MLStyle.jl/latest/
MIT License
402 stars 38 forks source link

Broken on master #147

Closed mcabbott closed 1 year ago

mcabbott commented 1 year ago

This package seems to be broken on Julia nightly, in a way that prevents loading, before any actual use.

julia> VERSION
v"1.9.0-DEV.1694"

julia> using MLStyle
[ Info: Precompiling MLStyle [d8e11817-5142-5d16-987a-aa16d5891078]
ERROR: LoadError: type DataType has no field size
Stacktrace:
  [1] getproperty(x::Type, f::Symbol)
    @ Base ./Base.jl:32
  [2] (::MLStyle.AbstractPatterns.RedyFlavoured.var"#ap_literal#21")(#unused#::MLStyle.AbstractPatterns.RedyFlavoured.CompileEnv, target::MLStyle.AbstractPatterns.Target)
    @ MLStyle.AbstractPatterns.RedyFlavoured ~/.julia/packages/MLStyle/8rUyA/src/AbstractPatterns/impl/RedyFlavoured.jl:224

 [12] var"@sswitch"(__source__::LineNumberNode, __module__::Module, val::Any, ex::Any)
    @ MLStyle.MatchCore ~/.julia/packages/MLStyle/8rUyA/src/MatchCore.jl:212

in expression starting at /Users/me/.julia/packages/MLStyle/8rUyA/src/ExprTools.jl:13
in expression starting at /Users/me/.julia/packages/MLStyle/8rUyA/src/ExprTools.jl:1
in expression starting at /Users/me/.julia/packages/MLStyle/8rUyA/src/MLStyle.jl:1
in expression starting at stdin:1

ERROR: Failed to precompile MLStyle [d8e11817-5142-5d16-987a-aa16d5891078] 

This breaks probably hundreds of downstream packages, the list at https://juliahub.com/ui/Packages/MLStyle/v4qmW/0.4.14?page=2 appears to be an underestimate, as it does not include some (like Flux) which are broken by this.

thautwarm commented 1 year ago

Thanks for the report. Working on this.