Skip to content

Instantly share code, notes, and snippets.

@ivanperez-keera
Created September 22, 2021 01:10
Show Gist options
  • Save ivanperez-keera/e9c7a94530eac21500e1ba60e60312cd to your computer and use it in GitHub Desktop.
Save ivanperez-keera/e9c7a94530eac21500e1ba60e60312cd to your computer and use it in GitHub Desktop.
Console Log. GHC 8.10, cabal 3.4
~/tmp/du$ cabal install dunai
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
- base-orphans-0.8.4 (lib) (requires build)
- primitive-0.7.1.0 (lib) (requires build)
- simple-affine-space-0.1.1 (lib) (requires build)
- splitmix-0.1.0.3 (lib) (requires build)
- transformers-compat-0.6.6 (lib) (requires build)
- random-1.2.0 (lib) (requires build)
- transformers-base-0.4.5.2 (lib) (requires build)
- MonadRandom-0.5.3 (lib) (requires build)
- dunai-0.7.0 (lib) (requires download & build)
Downloading dunai-0.7.0
Starting base-orphans-0.8.4 (lib)
Starting simple-affine-space-0.1.1 (lib)
Starting primitive-0.7.1.0 (lib)
Starting splitmix-0.1.0.3 (lib)
Downloaded dunai-0.7.0
Building base-orphans-0.8.4 (lib)
Building splitmix-0.1.0.3 (lib)
Building simple-affine-space-0.1.1 (lib)
Building primitive-0.7.1.0 (lib)
Installing splitmix-0.1.0.3 (lib)
Installing simple-affine-space-0.1.1 (lib)
Completed splitmix-0.1.0.3 (lib)
Starting transformers-compat-0.6.6 (lib)
Completed simple-affine-space-0.1.1 (lib)
Starting random-1.2.0 (lib)
Building transformers-compat-0.6.6 (lib)
Building random-1.2.0 (lib)
Installing base-orphans-0.8.4 (lib)
Completed base-orphans-0.8.4 (lib)
Installing transformers-compat-0.6.6 (lib)
Completed transformers-compat-0.6.6 (lib)
Starting transformers-base-0.4.5.2 (lib)
Building transformers-base-0.4.5.2 (lib)
Installing transformers-base-0.4.5.2 (lib)
Completed transformers-base-0.4.5.2 (lib)
Installing primitive-0.7.1.0 (lib)
Completed primitive-0.7.1.0 (lib)
Installing random-1.2.0 (lib)
Completed random-1.2.0 (lib)
Starting MonadRandom-0.5.3 (lib)
Building MonadRandom-0.5.3 (lib)
Installing MonadRandom-0.5.3 (lib)
Completed MonadRandom-0.5.3 (lib)
Starting dunai-0.7.0 (lib)
Building dunai-0.7.0 (lib)
Installing dunai-0.7.0 (lib)
Completed dunai-0.7.0 (lib)
Warning: installdir is not defined. Set it in your cabal config file or use
--installdir=<path>. Using default installdir: "/home/user/.cabal/bin"
Warning:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: Installation might not be completed as desired! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Without flags, the command "cabal install" doesn't expose libraries in a
usable manner. You might have wanted to run "cabal install --lib dunai".
$ cabal repl
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
- fake-package-0 (lib) (first run)
Configuring library for fake-package-0..
Preprocessing library for fake-package-0..
Warning: No exposed modules
GHCi, version 8.10.4: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /tmp/cabal-repl.-24101/setcwd.ghci
Prelude> import Data.MonadicStreamFunction
<no location info>: error:
Could not load module ‘Data.MonadicStreamFunction’
It is a member of the hidden package ‘dunai-0.7.0’.
Perhaps you need to add ‘dunai’ to the build-depends in your .cabal file.
Prelude>
Leaving GHCi.
$ cabal install --lib dunai
Resolving dependencies...
Up to date
$ cabal repl
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
- fake-package-0 (lib) (first run)
Configuring library for fake-package-0..
Preprocessing library for fake-package-0..
Warning: No exposed modules
GHCi, version 8.10.4: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /tmp/cabal-repl.-24280/setcwd.ghci
Prelude> import Data.MonadicStreamFunction
<no location info>: error:
Could not load module ‘Data.MonadicStreamFunction’
It is a member of the hidden package ‘dunai-0.7.0’.
Perhaps you need to add ‘dunai’ to the build-depends in your .cabal file.
Prelude>
Leaving GHCi.
@jneira
Copy link

jneira commented Sep 23, 2021

will not touch any file in $HOME (i hope)

Although i a curious about why do you want to isolate all possible dirs, did v2-build store cause you problems? Install dir can be parametrized and the build configured to use binaries produced by previous steps.
As commented the store is immutable and should build and cache new package hashed versions or reuse existing ones in a safe manner, depending on the build config. It sometimes get corrupted due to some bug, but wiping it out usually fixes it
If you want reproducible builds, pining the hackage index and use a cabal freeze file can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment