packages feed

cabal-buck2 0.2.0.0 → 0.2.0.1

raw patch · 3 files changed

+21/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

cabal-buck2.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.8 name:               cabal-buck2-version:            0.2.0.0+version:            0.2.0.1 synopsis:           Build a Cabal project with buck2 (the `cabal buck2` external command) license:            BSD-3-Clause build-type:         Simple
changelog.md view
@@ -27,3 +27,9 @@     * Module re-exports are handled correctly     * Fix name clash problem with prebuilt sublibraries     * Fix broken `cabal buck2 -j`++# 0.2.0.1++  * For `cabal-install` version 3.18+  * Fix an issue with duplicate generated haskell_prebuilt_library()+    targets due to dependencies of build tools.
src/Distribution/Client/Buck2/LocalPackages.hs view
@@ -123,14 +123,23 @@     ]  -- | The packages that the packages buck2 builds from source need to be built--- and linked, as the libraries and tools they depend on, and what those--- need. The setup scripts that cabal runs to build other packages (and--- what they need) are not among them, and having them would mean more than--- one version of some packages.+-- and linked: the libraries they depend on, and what those need. Not the+-- build tools (@build-tool-depends:@, such as the preprocessors), which are+-- programs that cabal built into its store and that buck2 runs from there,+-- found through the plan (see+-- 'Distribution.Client.Buck2.Prebuilt.generatePrebuilt'): nothing links+-- against the libraries that a tool was built from. Having those would be+-- harmful, too. A tool's package has to be built by cabal, but the same+-- package can also be installed in GHC's own package database (as with a Nix+-- @ghcWithPackages@) and be used from there as a library, and then there+-- would be two prebuilt libraries with the one name. The setup scripts that+-- cabal runs to build other packages (and what they need) are not among+-- them either, and having them would mean more than one version of some+-- packages. prebuiltUnits :: DependencyMode -> ElaboratedInstallPlan -> Set.Set UnitId prebuiltUnits mode plan = closure Set.empty (concatMap deps (builtLocalElabs mode plan))   where-    deps elab = [newSimpleUnitId (confInstId dep) | (dep, _) <- elabLibDependencies elab] ++ elabOrderExeDependencies elab+    deps elab = [newSimpleUnitId (confInstId dep) | (dep, _) <- elabLibDependencies elab]     closure seen [] = seen     closure seen (uid : rest)       | uid `Set.member` seen = closure seen rest