Repository navigation
Closed
Labels
Description
Cabal and cabal-install operate on a per-package basis, rather than a per-component basis; this is the source of many bugs:
- [nix-local-build] Recompiling packages with many components is still pretty slow #3049 nix-local-build always rebuilds all components of a package
- Specify components when configuring, not building #2802 Configuring a package requires dependency information for all components, even ones we don't intend on building
- Disable library building, only build other components #2775 You can't rebuild an executable without also rebuilding, e.g., the same-package library it depends on
- cabal configure making dependencies global #2725/Make Cabal accept --dependency flags qualified by components #3286 If you have multiple components in the same package which have mutually exclusive dependencies, there's no way to tell Cabal about this
-jshould build package components in parallel #2623 No parallelism while building components; you parallelize over packages but components are built serially
I had a previous proposal for a per-component setup interface at #3064 but after discussion, we are going to go for a more conservative plan:
- We'll partially fix Disable library building, only build other components #2775, proceeding a bit differently than suggested in the ticket. Presently, if you say
cabal build myexe, this will buildmyexeas well as any components it depends on (e.g., the library). If you pass the--one-shotflag, we will assume that all of its dependencies are up-to-date and only build the immediate component. However, it will assume, e.g., the library it needs, has been built and registered in place; it would not be possible to request the executable to be built against an already installed version of the package. (I suppose if you fix Make Cabal accept --dependency flags qualified by components #3286 that will solve that problem, because you'll just configure the dependency to point elsewhere.) - We'll add a
--one-shotmode to./Setup copy. If you don't specify a component it will instead install package-global information. - We'll add a
--one-shotmode to./Setup register. - Decouple
InstallPlanfromPackageIndex; i.e., havecabal-installhave a copy of the code so thatInstallPlanisn't implemented internally using aPackageIndexbut with its own data typePlanIndex. See Refactor of PackageIndex and InstallPlan #3525. - Generalize
InstallPlanto not be keyed onUnitId, but on a new data type that reflects various build items we may need to do, specifically (1) download a package, (2) configure a package, (3) build a component in a package (this step takes advantage of--one-shot). At the same time, rewrite the install plan runner to handle these steps individually.
Activity
Add support for --one-shot flag, partial fix to haskell#2775 (haskell…
Add support for --one-shot flag, partial fix to haskell#2775 (haskell…
Add support for --one-shot flag, partial fix to haskell#2775 (haskell…
Add support for copy --one-shot (haskell#3287)
Add support for --one-shot flag, partial fix to haskell#2775 (haskell…
Add support for copy --one-shot (haskell#3287)
Add support for build --one-shot flag, partial fix to haskell#2775 (h…
Add support for copy --one-shot (haskell#3287)
Add support for build --one-shot flag, partial fix to haskell#2775 (h…
Add support for copy --one-shot (haskell#3287)
Add support for copy --one-shot. (haskell#3287)
Add support for build --one-shot flag, partial fix to haskell#2775 (h…
Add support for copy --one-shot. (haskell#3287)
Add support for build --one-shot flag, partial fix to haskell#2775 (h…
Add support for copy --one-shot. (haskell#3287)
19 remaining items
Add support for copy --assume-deps-up-to-date. (haskell#3287)
Add support for register --assume-deps-up-to-date. (haskell#3287)
Add support for build --assume-deps-up-to-date flag, partial fix to h…
Add support for copy --assume-deps-up-to-date. (haskell#3287)
Add support for register --assume-deps-up-to-date. (haskell#3287)
ezyang commentedon Aug 15, 2016
This ticket got obsoleted by #3662
dcoutts commentedon Aug 16, 2016
Also, I don't think this last item is actually needed. The existing approach to the build runner can avoid re-configuring and can download in parallel.
ezyang commentedon Aug 16, 2016
Well, it would be needed if took the approach described in this ticket (which we ended up not doing. Per-component builds as currently implement have to reconfigure for each component; not really possible to avoid without reimplementing configure in cabal-install.
Revert "Add support for register --assume-deps-up-to-date. (haskell#3287
Revert "Add support for copy --assume-deps-up-to-date. (haskell#3287)"
Revert "Add support for build --assume-deps-up-to-date flag, partial …
Revert "Add support for register --assume-deps-up-to-date. (haskell#3287
Revert "Add support for copy --assume-deps-up-to-date. (haskell#3287)"
Revert "Add support for build --assume-deps-up-to-date flag, partial …