Interpolations.jl icon indicating copy to clipboard operation
Interpolations.jl copied to clipboard

Less verbose stack traces

Open lstagner opened this issue 4 years ago • 2 comments

Can we do anything about way too long type signature.

ERROR: LoadError: LoadError: MethodError: no method matching Bfield(::Interpolations.Extrapolation{Float64, 2, Interpolations.ScaledInterpolation{Float64, 2, Interpolations.BSplineInterpolation{Float64, 2, OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}, Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line{Interpolations.OnGrid}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line{Interpolations.OnGrid}}}, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}}, Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line{Interpolations.OnGrid}}}, Interpolations.Flat{Nothing}}, ::Interpolations.Extrapolation{Float64, 1, Interpolations.ScaledInterpolation{Float64, 1, Interpolations.BSplineInterpolation{Float64, 1, OffsetArrays.OffsetVector{Float64, Vector{Float64}}, Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line{Interpolations.OnGrid}}}, Tuple{Base.OneTo{Int64}}}, Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line{Interpolations.OnGrid}}}, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}}, Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line{Interpolations.OnGrid}}}, Interpolations.Flat{Nothing}}, ::Float64, ::Float64, ::COCOS)

lstagner avatar May 08 '21 07:05 lstagner

I think this is a pretty generic Julia issue. The types are way longer in some other packages.

It might be possible to customize https://github.com/jkrumbiegel/ClearStacktrace.jl to strip away type information when printing stacktraces if you want to get rid of them.

ali-ramadhan avatar May 08 '21 14:05 ali-ramadhan

I agree. I think the stack trace issue belongs upstream. If you have a suggestion on how Interpolations.jl types should present themselves, I would be willing to entertain them.

mkitti avatar Jun 08 '21 02:06 mkitti