diff --git a/builder/src/Deps/Solver.hs b/builder/src/Deps/Solver.hs index 52b98815..6ba76521 100644 --- a/builder/src/Deps/Solver.hs +++ b/builder/src/Deps/Solver.hs @@ -249,10 +249,15 @@ addVersion reportKey (Goals rootPlatform pending solved) name source = if C.goodGren gren then if Platform.compatible rootPlatform platform - then do - depsConstraintSources <- Map.traverseWithKey resolveToConstraintSource deps - newPending <- foldM (addConstraint name solved) pending (Map.toList depsConstraintSources) - return (Goals rootPlatform newPending (Map.insert name source solved)) + 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)) else solverError $ Exit.SolverIncompatiblePlatforms name rootPlatform platform diff --git a/builder/src/Reporting/Exit.hs b/builder/src/Reporting/Exit.hs index a84d8670..c1156f1d 100644 --- a/builder/src/Reporting/Exit.hs +++ b/builder/src/Reporting/Exit.hs @@ -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 "