1{-# LANGUAGE OverloadedStrings #-}
2module Reporting.Exit.Install
9import qualified Elm.Compiler as Compiler
10import qualified Elm.Package as Pkg
11import qualified Reporting.Doc as D
12import qualified Reporting.Exit.Help as Help
21 | NoSolution [Pkg.Name]
28toReport :: Exit -> Help.Report
32 Help.report "INSTALL WHAT?" Nothing
33 "I am expecting commands like:"
34 [ D.green $ D.indent 4 $ D.vcat $
35 [ "elm install elm/http"
36 , "elm install elm/json"
37 , "elm install elm/random"
40 ["In","JavaScript","folks","run","`npm install`","to","start","projects."
41 ,"\"Gotta","download","everything!\"","But","why","download","packages"
42 ,"again","and","again?","Instead,","Elm","caches","packages","in"
43 ,D.dullyellow (D.fromString elmHome)
44 ,"so","each","one","is","downloaded","and","built","ONCE","on","your","machine."
45 ,"Elm","projects","check","that","cache","before","trying","the","internet."
46 ,"This","reduces","build","times,","reduces","server","costs,","and","makes","it"
47 ,"easier","to","work","offline.","As","a","result"
48 ,D.dullcyan "elm install","is","only","for","adding","dependencies","to","elm.json,"
49 ,"whereas",D.dullcyan "elm make","is","in","charge","of","gathering","dependencies"
50 ,"and","building","everything.","So","maybe","try",D.green "elm make","instead?"
54 NoSolution badPackages ->
57 Help.report "UNSOLVABLE DEPENDENCIES" (Just "elm.json")
58 "This usually happens if you try to modify dependency constraints by\
59 \ hand. I recommend deleting any dependency you added recently (or all\
60 \ of them if things are bad) and then adding them again with:"
61 [ D.indent 4 $ D.green "elm install"
63 "And do not be afaid to ask for help on Slack if you get stuck!"
67 Help.report "OLD DEPENDENCIES" (Just "elm.json")
68 ( "The following packages do not work with Elm " ++ Pkg.versionToString Compiler.version ++ " right now:"
70 [ D.indent 4 $ D.vcat $ map (D.red . D.fromString . Pkg.toString) badPackages
72 "This may be because it is not upgraded yet. It may be because a\
73 \ better solution came along, so there was no need to upgrade it.\
74 \ Etc. Try asking around on Slack to learn more about the topic."
76 "Whatever the case, please be kind to the relevant package authors! Having\
77 \ friendly interactions with users is great motivation, and conversely, getting\
78 \ berated by strangers on the internet sucks your soul dry. Furthermore, package\
79 \ authors are humans with families, friends, jobs, vacations, responsibilities,\
80 \ goals, etc. They face obstacles outside of their technical work you will never\
81 \ know about, so please assume the best and try to be patient and supportive!"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list