mirror of
https://github.com/gren-lang/compiler.git
synced 2024-09-19 04:47:55 +03:00
Refuse to compile a dependency with local dependencies.
This commit is contained in:
parent
b8c2fec5ab
commit
3e19bb3ac9
@ -249,7 +249,12 @@ addVersion reportKey (Goals rootPlatform pending solved) name source =
|
||||
if C.goodGren gren
|
||||
then
|
||||
if Platform.compatible rootPlatform platform
|
||||
then do
|
||||
then
|
||||
if any PossibleFilePath.is deps
|
||||
then
|
||||
solverError $
|
||||
Exit.SolverTransientLocalDep name
|
||||
else do
|
||||
depsConstraintSources <- Map.traverseWithKey resolveToConstraintSource deps
|
||||
newPending <- foldM (addConstraint name solved) pending (Map.toList depsConstraintSources)
|
||||
return (Goals rootPlatform newPending (Map.insert name source solved))
|
||||
|
@ -1005,6 +1005,7 @@ data Solver
|
||||
| SolverBadLocalDepExpectedPkg FilePath Pkg.Name
|
||||
| SolverBadLocalDepInvalidGrenJson FilePath Pkg.Name
|
||||
| SolverLocalDepNotFound FilePath Pkg.Name
|
||||
| SolverTransientLocalDep Pkg.Name
|
||||
| SolverBadGitOperationUnversionedPkg Pkg.Name Git.Error
|
||||
| SolverBadGitOperationVersionedPkg Pkg.Name V.Version Git.Error
|
||||
| SolverIncompatibleSolvedVersion Pkg.Name Pkg.Name C.Constraint V.Version
|
||||
@ -1086,6 +1087,17 @@ toSolverReport problem =
|
||||
[ D.reflow
|
||||
"Verify that the path is correct."
|
||||
]
|
||||
SolverTransientLocalDep pkgName ->
|
||||
Help.report
|
||||
"PROBLEM SOLVING PACKAGE CONSTRAINTS"
|
||||
Nothing
|
||||
( Pkg.toChars pkgName
|
||||
++ " has defined one or more local dependencies."
|
||||
)
|
||||
[ D.reflow
|
||||
"Dependencies are not allowed to define their own local dependencies. Contact the package \
|
||||
\author to resolve this issue."
|
||||
]
|
||||
SolverBadGitOperationUnversionedPkg pkg gitError ->
|
||||
toGitErrorReport "PROBLEM SOLVING PACKAGE CONSTRAINTS" gitError $
|
||||
"I need the gren.json of "
|
||||
|
Loading…
Reference in New Issue
Block a user