Mikhail, the use case not addressed here is people who are used to v1-style and want to keep using it — and possibly aren't in a great position to rewire their setup to fit how v2 thinks. Personally, I have situations where I use v2 and others where v1 works better.
On Mon, Apr 15, 2019 at 6:43 PM Mikhail Glushenkov < mikhail.glushen...@gmail.com> wrote: > Hello Simon, > > On Mon, 15 Apr 2019 at 23:14, Simon Peyton Jones via ghc-devs > <ghc-devs@haskell.org> wrote: > > > > It is terribly mysterious that “cabal install hspec” doesn’t, well, > install hspec. > > In the cabal v2-* model [1] installing libraries globally is no longer > the recommended mode of operation, which is why you now need to pass > --lib to 'install' to do that. > > There are now better alternatives for most use cases of 'install --lib': > > * For just trying out some set of libraries in REPL, you can use > `cabal new-repl --build-depends=foo,bar,baz` outside of a project > instead of ghci. [2] If you have .ghc.environment file generation > turned on, you can also use plain ghci inside your project, and it > will pick up the project context. [3] > * For running Haskell scripts that expect extra libraries in the > global package DB you can use `#! cabal` instead of `#! runghc`. [4] > > > It must surely be a bug that “cabal install –lib hspec” simply crashes. > > This is a bug that we haven't fixed yet [5]. Should've just worked. > > > [1] https://cabal.readthedocs.io/en/latest/nix-local-build-overview.html > [2] > https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-v2-repl > [3] > https://cabal.readthedocs.io/en/latest/nix-local-build.html#cfg-field-write-ghc-environment-files > [4] > https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-v2-run > [5] https://github.com/haskell/cabal/issues/5990 > -- brandon s allbery kf8nh allber...@gmail.com
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs