@@ -641,6 +641,9 @@ data Solver
641data Outline
641data Outline
642 = OutlineHasBadStructure (Decode.Error OutlineProblem)
642 = OutlineHasBadStructure (Decode.Error OutlineProblem)
643 | OutlineHasBadSrcDirs FilePath [FilePath]
643 | OutlineHasBadSrcDirs FilePath [FilePath]
646data OutlineProblem
649data OutlineProblem
@@ -908,12 +911,47 @@ makeToReport make =
908toOutlineReport :: Outline -> Help.Report
911toOutlineReport :: Outline -> Help.Report
909toOutlineReport problem =
912toOutlineReport problem =
910 case problem of
913 case problem of
911− OutlineHasBadSrcDirs dir dirs ->
912− error "TODO OutlineHasBadSrcDirs" dir dirs
914 OutlineHasBadStructure decodeError ->
914 OutlineHasBadStructure decodeError ->
915 error "TODO OutlineHasBadStructure" decodeError toOutlineProblemReport
915 error "TODO OutlineHasBadStructure" decodeError toOutlineProblemReport
917+ OutlineHasBadSrcDirs dir dirs ->
920+ Help.report "MISSING SOURCE DIRECTORY" (Just "elm.json")
921+ "The \"source-directories\" in your elm.json lists the following directory:"
922+ [ D.indent 4 $ D.dullyellow $ D.fromChars dir
924+ "I cannot find it though. Is it missing? Is there a typo?"
928+ Help.report "MISSING SOURCE DIRECTORIES" (Just "elm.json")
929+ "The \"source-directories\" in your elm.json lists the following directories:"
930+ [ D.indent 4 $ D.dullyellow $ D.fromChars dir
932+ "I cannot find them though. Are they missing? Are there typos?"
936+ Help.report "MISSING DEPENDENCY" (Just "elm.json")
937+ "A package must have \"elm/core\" as a dependency. Try running:"
938+ [ D.indent 4 $ D.green $ "elm install elm/core"
939+ , D.reflow "I need it for the default imports that make `List` and `Maybe` available."
943+ Help.report "MISSING DEPENDENCY" (Just "elm.json")
944+ "An application must have \"elm/core\" as a dependency. Try running:"
945+ [ D.indent 4 $ D.green $ "elm install elm/core"
946+ , D.reflow "It has some supporting code that is needed by every Elm application!"
950+ Help.report "MISSING DEPENDENCY" (Just "elm.json")
951+ "An application must have \"elm/json\" as a dependency. Try running:"
952+ [ D.indent 4 $ D.green $ "elm install elm/json"
953+ , D.reflow "It helps me handle flags and ports."
918toOutlineProblemReport :: OutlineProblem -> Help.Report
956toOutlineProblemReport :: OutlineProblem -> Help.Report
919toOutlineProblemReport problem =
957toOutlineProblemReport problem =