Skip to content

No "missing import" error for Elm.Kernel.Whatever #1767

@rtfeldman

Description

@rtfeldman

SSCCE

module Main exposing (main)

import Browser

main : Program () () ()
main =
    Browser.sandbox
        { view = \() -> Elm.Kernel.Spaceship.basketball "Space Jam"
        , update = \_ _ -> ()
        , init = ()
        }

This shouldn't compile because the module in question hasn't been imported, but instead it compiles successfully and crashes at runtime.

Note that this only happens with Elm.Kernel.Something and not with Elm.Kernel. If I remove the .Something, it correctly reports the module as not found at compile time:

module Main exposing (main)

import Browser

main : Program () () ()
main =
    Browser.sandbox
        { view = \() -> Elm.Kernel.basketball "Space Jam"
        , update = \_ _ -> ()
        , init = ()
        }
I cannot find a `Elm.Kernel.basketball` variable:

8|         { view = \() -> Elm.Kernel.basketball "Space Jam"
                           ^^^^^^^^^^^^^^^^^^^^^
I cannot find a `Elm.Kernel` import. These names seem close though:

    List.all
    Browser.element
    Browser.sandbox
    Cmd.batch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions