Merge pull request #75 from gren-lang/change-default-application-dependencies

Change default application dependencies
This commit is contained in:
Robin Heggelund Hansen 2022-06-24 10:26:18 +02:00 committed by GitHub
commit af99831e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 17 deletions

View File

@ -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)

View File

@ -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 =

View File

@ -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