mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-25 18:51:41 +03:00
Remove moduleToDependency
from Project
This commit is contained in:
parent
2016640367
commit
8cb2453bfc
@ -63,7 +63,6 @@ type Project
|
|||||||
, filesThatFailedToParse : List { path : String, source : String }
|
, filesThatFailedToParse : List { path : String, source : String }
|
||||||
, elmJson : Maybe { path : String, raw : String, project : Elm.Project.Project }
|
, elmJson : Maybe { path : String, raw : String, project : Elm.Project.Project }
|
||||||
, dependencyModules : Dict String Elm.Docs.Module
|
, dependencyModules : Dict String Elm.Docs.Module
|
||||||
, moduleToDependency : Dict String String
|
|
||||||
, moduleGraph : Maybe (Graph ModuleName ())
|
, moduleGraph : Maybe (Graph ModuleName ())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +76,6 @@ new =
|
|||||||
, filesThatFailedToParse = []
|
, filesThatFailedToParse = []
|
||||||
, elmJson = Nothing
|
, elmJson = Nothing
|
||||||
, dependencyModules = Dict.empty
|
, dependencyModules = Dict.empty
|
||||||
, moduleToDependency = Dict.empty
|
|
||||||
, moduleGraph = Nothing
|
, moduleGraph = Nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,13 +322,6 @@ withDependency dependency (Project project) =
|
|||||||
|> List.map (\module_ -> ( module_.name, module_ ))
|
|> List.map (\module_ -> ( module_.name, module_ ))
|
||||||
|> Dict.fromList
|
|> Dict.fromList
|
||||||
)
|
)
|
||||||
, moduleToDependency =
|
|
||||||
Dict.union
|
|
||||||
project.moduleToDependency
|
|
||||||
(dependency.modules
|
|
||||||
|> List.map (\module_ -> ( module_.name, dependency.packageName ))
|
|
||||||
|> Dict.fromList
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|> recomputeModuleGraphIfNeeded
|
|> recomputeModuleGraphIfNeeded
|
||||||
|
|
||||||
@ -340,11 +331,7 @@ a project when they are changed, before re-adding them.
|
|||||||
-}
|
-}
|
||||||
removeDependencies : Project -> Project
|
removeDependencies : Project -> Project
|
||||||
removeDependencies (Project project) =
|
removeDependencies (Project project) =
|
||||||
Project
|
Project { project | dependencyModules = Dict.empty }
|
||||||
{ project
|
|
||||||
| dependencyModules = Dict.empty
|
|
||||||
, moduleToDependency = Dict.empty
|
|
||||||
}
|
|
||||||
|> recomputeModuleGraphIfNeeded
|
|> recomputeModuleGraphIfNeeded
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user