Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/Terminal/PackageInstall.gren
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import Json.Decode as Decode exposing (Decoder)
import Stream.Extra
import Terminal.Help as Help
import Terminal.Report as Report exposing (Report)
import Compiler.ModuleName as ModuleName


type alias Config =
Expand Down Expand Up @@ -193,7 +194,18 @@ run config { projectPath, outline } =
, outline = outline
, projectSources =
Array.foldl
(\{ path, moduleName, source } dict -> Dict.set moduleName { path = path, data = source } dict)
(\{ path, moduleName, source } dict ->
-- TODO: Temporary fix. Should be handled in compiler-node
when ModuleName.fromString moduleName is
Just _ ->
Dict.set moduleName { path = path, data = source } dict

Nothing ->
-- Filter out bad module names.
-- The real solution should give a better error message, but this
-- at least prevents the backend crashing with cryptic json error.
dict
)
Dict.empty
sourceFiles
, startedDownload = False
Expand Down
Loading