haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.59k stars 688 forks source link

cabal install produces more source tarballs than necessary #6223

Open sjakobi opened 4 years ago

sjakobi commented 4 years ago
$ cabal install dhall -w ghc-8.6.5
Wrote tarball sdist to
/home/simon/src/dhall-haskell/dist-newstyle/sdist/dhall-1.25.0.tar.gz
Wrote tarball sdist to
/home/simon/src/dhall-haskell/dist-newstyle/sdist/dhall-bash-1.0.22.tar.gz
Wrote tarball sdist to
/home/simon/src/dhall-haskell/dist-newstyle/sdist/dhall-json-1.4.0.tar.gz
Wrote tarball sdist to
/home/simon/src/dhall-haskell/dist-newstyle/sdist/dhall-lsp-server-1.0.0.tar.gz
Wrote tarball sdist to
/home/simon/src/dhall-haskell/dist-newstyle/sdist/dhall-nix-1.1.7.tar.gz
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - dhall-1.25.0 (lib) (requires build)
 - dhall-1.25.0 (exe:dhall) (requires build)
Starting     dhall-1.25.0 (lib)
Building     dhall-1.25.0 (lib)
Installing   dhall-1.25.0 (lib)
Completed    dhall-1.25.0 (lib)
Starting     dhall-1.25.0 (exe:dhall)
Building     dhall-1.25.0 (exe:dhall)
Installing   dhall-1.25.0 (exe:dhall)
Completed    dhall-1.25.0 (exe:dhall)
Symlinking 'dhall'

All but the first tarball for dhall itself are unnecessary.

This is not a big problem, but I thought I should report it anyway.


$ cabal --version
cabal-install version 3.1.0.0
compiled using version 3.1.0.0 of the Cabal library 

(cabal-head from hvr's PPA)

TravisWhitaker commented 4 years ago

The argument to cabal install is a whole package, not a component. Looks like cabal is making one tarball per component, which is the correct behavior for dhall-the-package (but not dhall-the-component).

sjakobi commented 4 years ago

Sorry, I should have given more details: dhall is one of multiple packages in this project. The other tarballs were created for the remaining packages in the same project.

Or is "component" the proper name for one of the elements in the packages list of a cabal project?