Closed
Description
Code to repro the issue:
julia> using Dash
julia> app = dash(assets_folder = "assets_compressed", compress = true);
julia> make_handler(app)
In 1.7:
julia> make_handler(app)
ERROR: The layout must be a component, tree of components, or a function which returns a component.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] validate_layout(layout::Nothing)
@ Dash ~/PkgEval/Dash.jl/src/handler/make_handler.jl:44
[3] make_handler(app::Dash.DashApp, registry::DashBase.ResourcesRegistry; check_layout::Bool)
@ Dash ~/PkgEval/Dash.jl/src/handler/make_handler.jl:123
[4] make_handler(app::Dash.DashApp)
@ Dash ~/PkgEval/Dash.jl/src/handler/make_handler.jl:158
In 1.8:
julia> make_handler(app); # No error
Now, this should cleary error because what ends up getting called is
which has these three definitions:
and app.layout
is nothing
:
julia> app.layout === nothing
true
In fact, it errors if we execute it manually:
julia> Dash.validate_layout(Dash.get_layout(app))
ERROR: The layout must be a component, tree of components, or a function which returns a component.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] validate_layout(layout::Nothing)
@ Dash ~/PkgEval/Dash.jl/src/handler/make_handler.jl:44
and also when running it through the debugger:
julia> using Debugger
julia> @run make_handler(app)
ERROR: The layout must be a component, tree of components, or a function which returns a component.
So something here makes the dispatch go to the wrong function or the error to be swallowed.