Skip to content

Dispatch failure or failure to throw error regression #44732

Closed
@KristofferC

Description

@KristofferC

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

https://github.com/plotly/Dash.jl/blob/f0606e07d2479fd8b5be1da4a6a59656e24acfa3/src/handler/make_handler.jl#L123

which has these three definitions:

https://github.com/plotly/Dash.jl/blob/f0606e07d2479fd8b5be1da4a6a59656e24acfa3/src/handler/make_handler.jl#L40-L44

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions