mirror of
https://github.com/gren-lang/compiler.git
synced 2024-09-11 16:56:29 +03:00
Merge pull request #75 from gren-lang/change-default-application-dependencies
Change default application dependencies
This commit is contained in:
commit
af99831e40
@ -173,11 +173,9 @@ read root =
|
||||
if Map.notMember Pkg.core deps && pkg /= Pkg.core
|
||||
then Left Exit.OutlineNoPkgCore
|
||||
else Right outline
|
||||
App (AppOutline _ srcDirs direct indirect _ _)
|
||||
App (AppOutline _ srcDirs direct _ _ _)
|
||||
| Map.notMember Pkg.core direct ->
|
||||
return $ Left Exit.OutlineNoAppCore
|
||||
| Map.notMember Pkg.json direct && Map.notMember Pkg.json indirect ->
|
||||
return $ Left Exit.OutlineNoAppJson
|
||||
| otherwise ->
|
||||
do
|
||||
badDirs <- filterM (isSrcDirMissing root) (NE.toList srcDirs)
|
||||
|
@ -1126,7 +1126,6 @@ data Outline
|
||||
| OutlineHasDuplicateSrcDirs FilePath FilePath FilePath
|
||||
| OutlineNoPkgCore
|
||||
| OutlineNoAppCore
|
||||
| OutlineNoAppJson
|
||||
|
||||
data OutlineProblem
|
||||
= OP_BadType
|
||||
@ -1217,17 +1216,6 @@ toOutlineReport problem =
|
||||
\ having trouble getting back to a working gren.json, it may be easier to delete it\
|
||||
\ and use `gren init` to start fresh."
|
||||
]
|
||||
OutlineNoAppJson ->
|
||||
Help.report
|
||||
"MISSING DEPENDENCY"
|
||||
(Just "gren.json")
|
||||
"I need to see an \"gren/json\" dependency your gren.json file. It helps me handle\
|
||||
\ flags and ports."
|
||||
[ D.reflow $
|
||||
"If you modified your gren.json by hand, try to change it back! And if you are\
|
||||
\ having trouble getting back to a working gren.json, it may be easier to delete it\
|
||||
\ and use `gren init` to start fresh."
|
||||
]
|
||||
|
||||
toOutlineProblemReport :: FilePath -> Code.Source -> Json.Context -> A.Region -> OutlineProblem -> Help.Report
|
||||
toOutlineProblemReport path source _ region problem =
|
||||
|
@ -123,8 +123,7 @@ appDefaultDeps :: Map.Map Pkg.Name Con.Constraint
|
||||
appDefaultDeps =
|
||||
Map.fromList
|
||||
[ (Pkg.core, Con.anything),
|
||||
(Pkg.browser, Con.anything),
|
||||
(Pkg.html, Con.anything)
|
||||
(Pkg.browser, Con.anything)
|
||||
]
|
||||
|
||||
pkgDefaultDeps :: Map.Map Pkg.Name Con.Constraint
|
||||
|
Loading…
Reference in New Issue
Block a user