diff --git a/aura/CHANGELOG.md b/aura/CHANGELOG.md index a9d0078c5..569e1dc70 100644 --- a/aura/CHANGELOG.md +++ b/aura/CHANGELOG.md @@ -26,6 +26,9 @@ [#541](https://github.com/fosskers/aura/issues/541) - A bug involving the `+` character appearing in package names, like `crypto++`. [#520](https://github.com/fosskers/aura/issues/520) +- A regression where the name of a parent package wouldn't be displayed when a + dependency couldn't be found. + [#513](https://github.com/fosskers/aura/issues/513) ## 2.2.1 (2020-03-01) diff --git a/aura/lib/Aura/Dependencies.hs b/aura/lib/Aura/Dependencies.hs index f285fa775..67eea6e85 100644 --- a/aura/lib/Aura/Dependencies.hs +++ b/aura/lib/Aura/Dependencies.hs @@ -68,7 +68,7 @@ resolveDeps' ss repo ps = resolve (Resolution mempty mempty) ps -- | Only searches for packages that we haven't checked yet. resolve :: Resolution -> NonEmpty Package -> IO Resolution resolve r@(Resolution m _) xs = maybe' (pure r) (NEL.nonEmpty goods) $ \goods' -> do - let m' = M.fromList (map (pname &&& id) $ toList goods') + let m' = M.fromList . map (pname &&& id) $ toList goods' r' = r & toInstallL %~ (<> m') these (const $ pure r') (satisfy r') (const $ satisfy r') $ dividePkgs goods' where @@ -124,7 +124,7 @@ conflicts ss m s = foldMap f m -- the system. in if S.member dn s then Nothing else case M.lookup dn m <|> M.lookup dn pm of - Nothing -> Just $ NonExistant dn + Nothing -> Just . NonExistant dn $ bName b Just p -> realPkgConflicts ss (bName b) p d sortInstall :: Map PkgName Package -> Either Failure (NonEmpty (NonEmpty Package)) diff --git a/aura/lib/Aura/Languages.hs b/aura/lib/Aura/Languages.hs index c0ee598cc..90d935588 100644 --- a/aura/lib/Aura/Languages.hs +++ b/aura/lib/Aura/Languages.hs @@ -368,14 +368,14 @@ missingPkg_2 ps l = vsep $ map (depError l) ps depError :: Language -> DepError -> Doc AnsiStyle depError _ (VerConflict s) = s depError _ (Ignored s) = s -depError l (NonExistant (PkgName s)) = case l of +depError l (NonExistant (PkgName s) (PkgName par)) = case l of Spanish -> "La dependencia " <> bt s <> " no pudo ser encontrada." Portuguese -> "A dependência " <> bt s <> " não foi encontrada." Russian -> "Зависимость " <> bt s <> " не найдена." Italian -> "Non è stato possibile trovare la dipendenza " <> bt s <> "." - Esperanto -> "La dependeco " <> bt s <> " ne povis troviĝi." + Esperanto -> "La dependeco " <> bt s <> " de " <> bt par <> " ne povis troviĝi." Dutch -> "Het afhankelijkheid " <> bt s <> "kan niet worden gevonden." - _ -> "The dependency " <> bt s <> " couldn't be found." + _ -> "The dependency " <> bt s <> " of " <> bt par <> " couldn't be found." depError l (BrokenProvides (PkgName pkg) (Provides (PkgName pro)) (PkgName n)) = case l of Spanish -> "El paquete " <> bt pkg <> " necesita " <> bt n <> " que proporciona " <> bt pro <> "." Russian -> "Пакету " <> bt pkg <> " требуется " <> bt n <> ", предоставляющий " <> bt pro <> "." diff --git a/aura/lib/Aura/Types.hs b/aura/lib/Aura/Types.hs index ab86679fb..839868cf8 100644 --- a/aura/lib/Aura/Types.hs +++ b/aura/lib/Aura/Types.hs @@ -267,7 +267,7 @@ data Language = English deriving (Eq, Enum, Bounded, Ord, Show) -- | The various ways that dependency resolution can fail. -data DepError = NonExistant PkgName +data DepError = NonExistant PkgName PkgName | VerConflict (Doc AnsiStyle) | Ignored (Doc AnsiStyle) | BrokenProvides PkgName Provides PkgName