tech-wtf-stack-on-arch.md 8.2 KB

Title: Tech WTF: Stack on Arch Date: 2017-07-15 Modified: 2017-12-07 Category: Blog Slug: tech-wtf-stack-on-arch Tags: tech-wtf, haskell Summary: Where I learn exactly what the cost of Stack on Arch

Welcome to another series of posts, called 'Tech WTF'. This is where I expound on moments when technology makes me do a spit take, for when a single quip on Quitter.se is not sufficient to explain the sheer degree of wtf that this entails. These posts will be shorter than my usual, but should at least provide amusement and elucidation, like all my others.

The background to this particular wtf is a simple one: I wanted to get back into Haskell, and decided to use Stack like all the other cool kids. Being the sensible person that I am, I decided to install it via my package manager (pacman), rather than curl | shing it. When I tried to do this, I was presented with the following:

[koz@Sebastian ~]$ sudo pacman -S stack
[sudo] password for koz: 
resolving dependencies...
looking for conflicting packages...

Packages (181) haskell-aeson-1.1.2.0-11  haskell-aeson-compat-0.3.7-7  haskell-annotated-wl-pprint-0.7.0-3  haskell-ansi-terminal-0.6.3.1-2
               haskell-ansi-wl-pprint-0.6.7.3-6  haskell-asn1-encoding-0.9.5-13  haskell-asn1-parse-0.9.4-24  haskell-asn1-types-0.3.2-20
               haskell-async-2.1.1.1-2  haskell-attoparsec-0.13.1.0-16  haskell-attoparsec-iso8601-1.0.0.0-10  haskell-auto-update-0.1.4-3
               haskell-base-compat-0.9.3-2  haskell-base-orphans-0.6-2  haskell-base16-bytestring-0.1.1.6-4  haskell-base64-bytestring-1.0.0.1-7
               haskell-bifunctors-5.4.2-3  haskell-binary-tagged-0.1.4.2-28  haskell-bitarray-0.0.1.1-2  haskell-blaze-builder-0.4.0.2-4
               haskell-blaze-html-0.8.1.3-4  haskell-blaze-markup-0.7.1.1-3  haskell-byteable-0.1.1-4  haskell-call-stack-0.1.0-2
               haskell-case-insensitive-1.2.0.10-3  haskell-cereal-0.5.4.0-2  haskell-clock-0.7.2-3  haskell-comonad-5.0.1-2
               haskell-conduit-1.2.11-4  haskell-conduit-extra-1.1.16-17  haskell-connection-0.2.8-17  haskell-constraints-0.9.1-5
               haskell-contravariant-1.4-17  haskell-cookie-0.4.2.1-5  haskell-cryptohash-0.11.9-28  haskell-cryptohash-sha256-0.11.100.1-2
               haskell-cryptonite-0.24-1  haskell-cryptonite-conduit-0.2.0-37  haskell-data-default-0.7.1.1-6
               haskell-data-default-class-0.1.2.0-2  haskell-data-default-instances-containers-0.0.1-14
               haskell-data-default-instances-dlist-0.0.1-19  haskell-data-default-instances-old-locale-0.0.1-14  haskell-digest-0.0.1.2-4
               haskell-distributive-0.5.2-3  haskell-dlist-0.8.0.3-1  haskell-easy-file-0.2.1-3  haskell-ed25519-0.0.5.0-3
               haskell-either-4.4.1.1-25  haskell-errors-2.2.1-1  haskell-exceptions-0.8.3-2  haskell-extra-1.5.3-2  haskell-fast-logger-2.4.10-3
               haskell-file-embed-0.0.10-3  haskell-filelock-0.1.0.1-3  haskell-foundation-0.0.13-1  haskell-free-4.12.4-32
               haskell-fsnotify-0.2.1-11  haskell-generic-deriving-1.11.2-2  haskell-generics-sop-0.3.1.0-1  haskell-gitrev-1.2.0-3
               haskell-glob-0.7.14-3  haskell-hackage-security-0.5.2.2-5  haskell-hashable-1.2.6.1-1  haskell-hashtables-1.2.1.1-5
               haskell-hastache-0.6.1-9  haskell-hinotify-0.3.9-3  haskell-hit-0.6.3-44  haskell-hourglass-0.2.10-3  haskell-hpack-0.17.1-10
               haskell-hspec-2.4.4-2  haskell-hspec-core-2.4.4-2  haskell-hspec-discover-2.4.4-1  haskell-hspec-expectations-0.8.2-3
               haskell-hspec-smallcheck-0.4.2-11  haskell-http-api-data-0.3.7.1-13  haskell-http-client-0.5.7.0-4
               haskell-http-client-tls-0.3.5.1-6  haskell-http-conduit-2.2.3.2-1  haskell-http-types-0.9.1-12  haskell-hunit-1.6.0.0-2
               haskell-ieee754-0.8.0-2  haskell-integer-logarithms-1.0.2-1  haskell-lifted-async-0.9.3-2  haskell-lifted-base-0.2.3.11-4
               haskell-logict-0.6.0.2-2  haskell-math-functions-0.2.1.0-3  haskell-memory-0.14.6-4  haskell-microlens-0.4.8.0-2
               haskell-microlens-mtl-0.1.11.0-1  haskell-microlens-th-0.4.1.1-2  haskell-mime-types-0.1.0.7-4  haskell-mmorph-1.1.0-2
               haskell-monad-control-1.0.2.1-1  haskell-monad-logger-0.3.24-18  haskell-monad-loops-0.4.3-4  haskell-monad-unlift-0.2.0-10
               haskell-monadrandom-0.5.1-3  haskell-mono-traversable-1.0.2-8  haskell-mwc-random-0.13.6.0-2  haskell-network-2.6.3.2-2
               haskell-network-uri-2.6.1.0-5  haskell-old-locale-1.0.0.7-9  haskell-old-time-1.1.0.3-9  haskell-open-browser-0.2.1.0-3
               haskell-optparse-applicative-0.13.2.0-4  haskell-optparse-simple-0.0.3-50  haskell-path-0.6.1-5  haskell-path-io-1.3.2-1
               haskell-path-pieces-0.2.1-7  haskell-patience-0.1.1-2  haskell-pem-0.2.2-4  haskell-persistent-2.6.1-42
               haskell-persistent-sqlite-2.6.2-41  haskell-persistent-template-2.5.2-44  haskell-pid1-0.1.2.0-1  haskell-prelude-extras-0.4.0.3-3
               haskell-profunctors-5.2-29  haskell-project-template-0.2.0-69  haskell-quickcheck-io-0.2.0-2  haskell-regex-applicative-0.3.3-3
               haskell-regex-applicative-text-0.1.0.1-3  haskell-resource-pool-0.2.3.2-18  haskell-resourcet-1.1.9-7  haskell-retry-0.7.4.2-2
               haskell-safe-0.3.15-1  haskell-safe-exceptions-0.1.6.0-1  haskell-scientific-0.3.5.1-2  haskell-semigroupoids-5.2-2
               haskell-semigroups-0.18.3-3  haskell-setenv-0.1.1.3-4  haskell-sha-1.6.4.2-6  haskell-silently-1.2.5-4  haskell-smallcheck-1.1.1-2
               haskell-socks-0.5.5-8  haskell-split-0.2.3.2-2  haskell-statevar-1.1.0.4-3  haskell-stm-2.4.4.1-4  haskell-stm-chans-3.0.0.4-5
               haskell-store-0.4.3.1-25  haskell-store-core-0.4.1-3  haskell-streaming-commons-0.1.18-2  haskell-system-fileio-0.3.16.3-3
               haskell-system-filepath-0.4.13.4-3  haskell-tagged-0.8.5-2  haskell-tar-0.5.0.3-3  haskell-temporary-1.2.1-2
               haskell-text-binary-0.2.1.1-3  haskell-text-metrics-0.2.0-3  haskell-th-expand-syns-0.4.3.0-2  haskell-th-lift-0.7.7-2
               haskell-th-lift-instances-0.1.11-5  haskell-th-orphans-0.13.3-13  haskell-th-reify-many-0.1.7-3  haskell-th-utilities-0.2.0.1-15
               haskell-time-locale-compat-0.1.1.3-2  haskell-tls-1.3.11-3  haskell-transformers-base-0.4.4-6
               haskell-transformers-compat-0.5.1.4-4  haskell-unexceptionalio-0.3.0-3  haskell-unicode-transforms-0.3.1-1
               haskell-unix-compat-0.4.3.1-2  haskell-unix-time-0.3.7-2  haskell-unordered-containers-0.2.8.0-5  haskell-uri-bytestring-0.2.3.3-6
               haskell-utf8-string-1.0.1.1-3  haskell-uuid-types-1.0.3-7  haskell-vector-0.12.0.1-2  haskell-vector-algorithms-0.7.0.1-7
               haskell-vector-binary-instances-0.2.3.5-2  haskell-vector-th-unbox-0.2.1.6-4  haskell-void-0.7.2-2  haskell-x509-1.6.5-21
               haskell-x509-store-1.6.2-22  haskell-x509-system-1.6.4-22  haskell-x509-validation-1.6.5-22  haskell-yaml-0.8.23.1-7
               haskell-zip-archive-0.3.1.1-1  haskell-zlib-0.6.1.2-2  haskell-zlib-bindings-0.1.1.5-3  stack-1.4.0-110

Total Download Size:    31.05 MiB
Total Installed Size:  321.33 MiB

:: Proceed with installation? [Y/n]

What the actual fuck? I know for a fact that half of this isn't needed for Stack to do its work. For reference, here is its list of dependencies, as per this file:

- Cabal-1.24.2.0
- th-utilities-0.2.0.1
- store-0.4.1
- store-core-0.4
- th-orphans-0.13.1
- http-client-0.5.3.3
- http-client-tls-0.3.4
- http-conduit-2.2.3
- optparse-applicative-0.13.0.0
- text-metrics-0.3.0
- pid1-0.1.0.0
- aeson-1.0.2.1
- hpack-0.17.0
- persistent-2.6
- persistent-template-2.5.1.6
- persistent-sqlite-2.6
- cryptohash-sha256-0.11.100.1
- ed25519-0.0.5.0
- hackage-security-0.5.2.2
- echo-0.1.3
- mintty-0.1.1

Why on Earth do I need to pull down half of Hackage (and what looks like 'every Haskell package in the Arch repos') to just have Stack working for me? Seriously?

Edit: Someone pointed out the whole 'transitive dependencies' thing to me. Fair enough, that makes more sense. But the list is still of a wtf length as far as I'm concerned.