GithubHelp home page GithubHelp logo

haskell-mafia / mafia Goto Github PK

View Code? Open in Web Editor NEW
135.0 23.0 20.0 733 KB

Provides protection against cabal swindling, robbing, injuring or sabotaging people with chopsticks.

Home Page: http://haskell-mafia.github.io/mafia/

License: BSD 3-Clause "New" or "Revised" License

Haskell 91.65% Shell 8.35%
haskell cabal build-tool

mafia's Introduction

mafia

Provides protection against cabal swindling, robbing, injuring or sabotaging people with chopsticks.

mafia

Overview

Mafia is a light weight but opinionated wrapper around Cabal that makes working on Haskell projects fun and easy.

The central idea is that upon cloning a project, you should only have to run mafia build to get up and running for development. This will pull down any git submodules, create a cabal sandbox, install dependencies and then build everything, tests and benchmarks included.

Cabal packages in the same git repository, or in git submodules, are discovered automatically and made available as source dependencies. This is particularly useful if you have many internal dependencies that are not published to Hackage. It allows for development of a package and its dependencies all at once, without having to publish intermediate builds of libraries and without having to resort to a monorepo.

All dependencies are cached globally in $HOME/.mafia/packages using a nix-like hashing system so that for a given set of transitive dependencies, a package is only ever built once. Source dependencies are also cached, using their dependencies and source code as the hash. This is critical for Haskell development at scale. At Ambiata we have around 150 Haskell packages which are being developed at a rapid pace, so it's crucial that we don't need to think about curating blessed sets of packages that we can cache as a single snapshot.

System configuration

Mafia expects both GHC and Cabal to be installed and on the PATH.

Follow the guides below to configure your system correctly:

mafia's People

Contributors

amosr avatar charleso avatar damncabbage avatar devgrok avatar domdere avatar erikd avatar erikd-ambiata avatar etorreborre avatar ggranberry avatar gwils avatar huwcampbell avatar jacobstanley avatar justanotherdot avatar ktonga avatar markhibberd avatar michaelneale avatar mitchellwrosen avatar moodmosaic avatar nhibberd avatar olorin avatar thumphries avatar tmcgilchrist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mafia's Issues

Include platform in cache path

Should be able to support cross-compilation chains for free by including target platform in the cache path

% ghc --info | grep "Target platform"
 ,("Target platform","x86_64-apple-darwin")

might need to include both host and target, not sure, I will make the change first and test with a halvm / musl crosschain.

worth doing (timed with #102 ) next time a cache-breaking change is on the cards

Create mafia dir when it doesn't exist

We're relying on the script creating ~/.ambiata/mafia, I think?

mafia: /root/.ambiata/mafia: canonicalizePath: does not exist (No such file or directory)

sdist/setup errors on unused/referenced cabal files.

This is very much an edge case, but there exists Setup.hs files that have environmental dependencies that means that sdist can't run cleanly.

I have a situation where I have a submodule that services multiple dependencies, I need some of those dependencies (non-haskell), but this submodule has one of these not-working-out-of-the-box cabal files. And even though I don't need it / or care about it, it prevents my project from building just because it exists.

Not sure of the best thing to do here. For the time being I am going to try to make it so the Setup.hs doesn't fail, but being able to exclude cabal files somehow might help this.

Low/non-priority given it really should be a non-problem, would just be nice to have a work around.

-Werror for source dependencies?

(more of a question than an issue)

Should warnings in source dependencies / subprojects be mafia errors?

As it stands, if a subproject and its source dependencies get out of sync, inexhaustive pattern matches can end up in production. Seems to me that the ownership boundary is usually the project rather than the package. @jystic

Warn if lock file is insufficient

Scream a little bit if the project has dependencies that aren't included in the lock file. Would also be nice if testci failed on it.

`mafia install` accepts Cabal version constraints (for better or worse)

The following commands all work to install purescript version 0.8.5.0:

  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install purescript
  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install 'purescript == 0.8.5.0'
  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install purescript-0.8.5.0
  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install 'purescript == 0.8.5.*'

Two things:

  • It appears that the purescript == ...-style version constraints are getting passed through to Cabal, intentionally or otherwise.
  • Running the above in that order locally on my machine caused a rebuild between purescript-0.8.5.0 and purescript == 0.8.5.* despite them both resolving to the same version and there being no newer release of purescript.

With that aforementioned sequence, the following symlinks appear in ~/.ambiata/mafia/bin/:

purescript -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-ab4bc21f6a195351e4fa59c180b26d530b9b726b
purescript == 0.8.5.* -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-ab4bc21f6a195351e4fa59c180b26d530b9b726b
purescript == 0.8.5.0 -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-f2f4205df16974a148c98d17e8af03267fc94500
purescript-0.8.5.0 -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-f2f4205df16974a148c98d17e8af03267fc94500

(Yes, those are directory names with spaces in them.)

Poor error message for misnamed packed in cabal file

When for instance I add resource (when I meant to add resource) to a cabal file, mafia gives a really horrible error message.

I shouldn't be too hard to check all the package names against the global cabal package name list and the locally defined submodules and give a much better error message.

Add `submodule-add` command

When adding package whatever at lib/whatever it would then check whatever's dependencies and recursively add them as well.

Cannot satisfy package QuickCheck

Hello,

I'm trying to get back into Haskell develop, but my projects look like they don't build anymore:

Preprocessing test suite 'hw-diagnostics-test' for hw-diagnostics-0.0.0.2...
<command line>: cannot satisfy -package-id QuickCheck-2.8.1-8f3828a4d4d9dac78c5d3db525b2f0fe
    (use -v for more information)
Process failed: cabal build -j --ghc-options=-Werror (exit code: 1)

Is there a way to fix this?

Thanks!

Cache issues and questions

Does anyone know what to do when encountering this error?

Installing dependencies...
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: hw-succinct-0.0.0.8 (user goal)
next goal: hw-rankselect (dependency of hw-succinct-0.0.0.8)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Process failed: cabal install --reorder-goals --max-backjumps=-1 --avoid-reinstalls --dry-run --enable-tests --enable-benchmarks --enable-profiling (exit code: 1)

"mafia ghci" doesn't understand flags in cabal file

Messing with the tls package using mafia ghci Network/TLS/Backend.hs I get:

> mafia ghci Network/TLS/Backend.hs 
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/erikd/.ghci
[1 of 1] Compiling Network.TLS.Backend ( Network/TLS/Backend.hs, interpreted )

Network/TLS/Backend.hs:62:13: error:
    Not in scope: type constructor or class ‘Network.Socket’
    No module named ‘Network’ is imported.

Network/TLS/Backend.hs:64:12: error:
    Not in scope: ‘Network.recv’
    No module named ‘Network’ is imported.
Failed, modules loaded: none.

Problem is that the include of Network.Socket is guarded:

#ifdef INCLUDE_NETWORK
import Control.Monad
import qualified Network.Socket as Network (Socket, close)
import qualified Network.Socket.ByteString as Network
#endif

with a flag set in the cabal file:

Flag network
  Description:       Use the base network library
  Default:           True

Mafia can build this just fine, but its a pity I can't just load it into GHCi.

Mafia option to build a single sub-component of a project.

Motivation: I have a project which has a library component and a pre-processor which generates some code, in this case it dumps out the generated code for a bunch of lenses. The generator needs to get built independently of the library.

Solution: Have an option to do an equivalent tocabal build generate which only builds the generate target in the cabal file.

For now my work around is to use a combination of

mafia lock  # Generate the build env / sandbox
cabal build generate

# nasty shell manipulation to copy generated code into library src

mafia build  # Build the actual library

Can `mafia quick` load C symbols?

Is it possible to make mafia quick load the C symbols? Maybe not since it would make it not-so-quick.

amos@Amos anemone $ mafia quick test/Test/Anemone/Foreign/Memcmp.hs
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
[1 of 4] Compiling Anemone.Foreign.Data ( src/Anemone/Foreign/Data.hs, interpreted )
[2 of 4] Compiling Anemone.Foreign.Memcmp.Base ( src/Anemone/Foreign/Memcmp/Base.hs, interpreted )
[3 of 4] Compiling Anemone.Foreign.Memcmp.Export ( src/Anemone/Foreign/Memcmp/Export.hs, interpreted )

ByteCodeLink: can't find label
During interactive linking, GHCi couldn't find the following symbol:
  hs_anemone_memcmp8
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.

Just running mafia repl works, so I wonder whether there's a way to ask cabal to compile just the C stuff, then tell ghci to load the compiled C.

amos@Amos anemone $ mafia repl test
λ :l test/Test/Anemone/Foreign/Memcmp.hs
Ok, modules loaded: Test.Anemone.Foreign.Memcmp.

Putting an issue because I might look into this one day.

Retry when installing hackage packages fail

Sometimes cabal-install fails due to network errors, would be nice if we could detect this and retry a few times:

<socket: 17>: hGetBufSome: resource vanished (Connection reset by peer)

Mafia repl should not exit on CTRL+C

I just noticed that when I press CTRL+C inside mafia repl, the whole repl exits.

This differs from ghci, which breaks the current running expression but does not exit the repl.

Unable to build submodule dependencies

Trying to get submodule source dependency to build for the first time. Getting "Process failed: cabal install" error.

✔ ~/wrk/haskell-works/hw-all [master L|✚ 2]
09:49 $ git submodule
 e50000fdda4cbe4ad69755aa6cdca0dcd94c8f3e hw-bits (heads/master)
 634735257f9e878dcefad471a7cd948174fdd677 hw-diagnostics (heads/master)
 83e71d6035e3eb58d25b3043e18fa34bc94ccaec hw-succinct (heads/master)
09:49 $ cd hw-succinct/
✔ ~/wrk/haskell-works/hw-all/hw-succinct [master|✚ 1…1]
09:50 $ mafia build
Installing dependencies...
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: hw-succinct-0.0.0.4 (user goal)
next goal: hw-diagnostics (dependency of hw-succinct-0.0.0.4)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Process failed: cabal install --reorder-goals --max-backjumps=-1 --avoid-reinstalls --dry-run --enable-tests --enable-benchmarks --enable-profiling (exit code: 1)

Error parsing output of `ghc-pkg list` in `hoogle` command edge case

Summary

If we have an empty package database, say, in a new cabal sandbox, invocations of mafia hoogle will fail when attempting to parse the string "(no packages)".

Observed

Create a new project with a minimal cabal file:

mkdir example
cd example
git init  # necessary!
cabal init -n --is-library -p example
cabal sandbox init

And we try the hoogle command on a prelude function:

mafia hoogle 'fst'

We get an exit code 1 and the message "Parse failed: Invalid package: no packages".

Expected

Exit code 0 (since our query has results) and output like:

Combining 74 databases
Prelude fst :: (a, b) -> a
Data.Tuple fst :: (a, b) -> a
Foreign.StablePtr deRefStablePtr :: StablePtr a -> IO a
GHC.Prim deRefStablePtr# :: StablePtr# a -> State# (RealWorld) -> (# State# (RealWorld), a #)
GHC.PrimopWrappers deRefStablePtr# :: StablePtr# a -> State# (RealWorld) -> (# State# (RealWorld), a #)
GHC.StaticPtr deRefStaticPtr :: StaticPtr a -> a

Notes

I'm using GHC 8.0.1 and cabal-install version 1.24.0.2.

In the setting above, with an empty sandbox package database, the output of mafia exec ghc-pkg list will be something like:

/usr/local/Cellar/ghc/8.0.1_4/lib/ghc-8.0.1/package.conf.d
    Cabal-1.24.0.0
    array-0.5.1.1
    base-4.9.0.0
    # ...
    transformers-0.5.2.0
    unix-2.7.2.0
    xhtml-3000.2.1
/Users/joe/tmp/example/.cabal-sandbox/x86_64-osx-ghc-8.0.1-packages.conf.d
    (no packages)

This suggest we are failing here due to not filtering enough here.

If we don't need to relate packages to databases, an alternative would be to pass the --simple-output flag to the call to hc-pkg. Even in the broken case, this would result in space-delimited output like:

Cabal-1.24.0.0 array-0.5.1.1 base-4.9.0.0 binary-0.8.3.0 bytestring-0.10.8.1 containers-0.5.7.1 deepseq-1.4.2.0 directory-1.2.6.2 filepath-1.4.1.0 ghc-8.0.1 ghc-boot-8.0.1 ghc-boot-th-8.0.1 ghc-prim-0.5.0.0 ghci-8.0.1 haskeline-0.7.2.3 hoopl-3.10.2.1 hpc-0.6.0.3 integer-gmp-1.0.0.1 pretty-1.1.3.3 process-1.4.2.0 rts-1.0 template-haskell-2.11.0.0 terminfo-0.4.0.2 time-1.6.0.1 transformers-0.5.2.0 unix-2.7.2.0 xhtml-3000.2.1

Automatically install preprocessors as needed

Remove need for MAFIA_HAPPY MAFIA_ALEX et al

It's easy enough to pull the build-tools list from a cabal file.

You can't easily tell what package the tool comes from, so we can't do this in general for all preprocessors on Hackage, but we can definitely burn something in for the standard set.

Versions are also a problem, but installing latest and putting it on the path during a build is a fine start IMO

Check version mismatch between top level cabal file and git submodules

Currently if the current version specified in the cabal file of a git submodule can't satisify the the version requirements specified in the top level cabal file, then mafia will call cabal with version requirements that cannot be satisfied resulting in a huge difficult to understand error message.

This should be easy to check for and then if a problem exists, produce a simple, easy to read and understand error message.

Build error with GHC8

19:49 $ nix-shell -p haskell.compiler.ghc801 -p cabal-install -p cabal2nix -p zlib

[nix-shell:~/wrk/haskell-works/hw-all/hw-json]$ mafia build
Building hw-json-0.0.0.4...
Preprocessing library hw-json-0.0.0.4...

<no location info>: error:
Failing due to -Werror.

on the commandline: warning:
    -this-package-key is deprecated: Use -this-unit-id instead
Process failed: cabal build -j --ghc-options=-Werror (exit code: 1)

Fails to bootstrap with ghc 8.0.2

When bootstrapping, it tries to re-install ghc-8.0.2 which is probably a bad idea.

Reproduction:

  • Clean checkout
  • ./script/mafia upgrade
  • ./script/mafia build

cabal sandbox hc-pkg recache (exit code: 1)

When switching between ghc versions, cabal 1.24 gets confused about the location of the package directory and reports:

Process failed: cabal sandbox hc-pkg recache (exit code: 1)

This can be fixed with cabal configure, mafia should recognise this situation and do it automatically.

mafia quick --all should only try to load actual dependencies

Because of the clashing module names between x-either and x-eithert, it means that -a doesn't really work because we use X.Control.Monad.Trans.Either basically everywhere.

~/src/ambiata/twine $ mafia quick -a src/**/*.hs
Checking for changes to dependencies...
GHCi, version 7.8.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.

lib/x/x-either/src/X/Control/Monad/Trans/Either.hs:17:18:
    Could not find module ‘Control.Monad.Trans.Either’
    Perhaps you meant
      X.Control.Monad.Trans.Either (from ambiata-x-eithert-0.0.1)
      Control.Monad.Trans.Writer (from transformers-0.4.3.0)
      Control.Monad.Trans.Writer (needs flag -package transformers-0.3.0.0)
    Use -v to see a list of the files searched for.

We should only consider actual project dependencies when finding source files to load.

ghc 8.0.2 compat

14:00:00 ~/bin $ mafia update --allow-newer
Building mafia-f52d11e0beeedbd8ba31ad8ec3a760a8b670c138 in /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR
Cloning into 'mafia'...
remote: Counting objects: 1748, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 1748 (delta 4), reused 0 (delta 0), pack-reused 1733
Receiving objects: 100% (1748/1748), 545.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (937/937), done.
HEAD is now at f52d11e Merge pull request #160 from ambiata/topic/cabal-unpack-retry
Submodule 'lib/disorder' (https://github.com/ambiata/disorder.hs) registered for path 'lib/disorder'
Submodule 'lib/p' (https://github.com/ambiata/p) registered for path 'lib/p'
Submodule 'lib/twine' (https://github.com/ambiata/twine) registered for path 'lib/twine'
Submodule 'lib/x' (https://github.com/ambiata/x) registered for path 'lib/x'
Cloning into '/private/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR/mafia/lib/disorder'...
Cloning into '/private/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR/mafia/lib/p'...
Cloning into '/private/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR/mafia/lib/twine'...
Cloning into '/private/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR/mafia/lib/x'...
Submodule path 'lib/disorder': checked out 'c8625df58098d78cfa71cfb578bf72ccc2836706'
Submodule path 'lib/p': checked out 'fd88f397585914b1d897a5ec5dc5862a4fea9833'
Submodule path 'lib/twine': checked out '23d611a131785da696760000f148e7f14f26e277'
Submodule path 'lib/x': checked out '29d9c8c188f6f02a59228bd7649f13abceb1311a'
Writing a default package environment file to
/private/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR/mafia/cabal.sandbox.config
Creating a new sandbox at
/private/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/tmp.NIVvMjOR/mafia/.cabal-sandbox
Resolving dependencies...
In order, the following would be installed:
ansi-terminal-0.6.2.3 (via: ansi-wl-pprint-0.6.7.3) (new package)
ansi-wl-pprint-0.6.7.3 (via: optparse-applicative-0.12.1.0) (new package)
base-orphans-0.5.4 (via: bifunctors-5.3 distributive-0.5.2) (new package)
base16-bytestring-0.1.1.6 (via: ambiata-mafia-0.0.1) (new package)
data-default-class-0.1.2.0 (via: retry-0.7.4.2) (new package)
directory-1.2.7.1 (latest: 1.3.1.0) (via: ambiata-mafia-0.0.1 ambiata-mafia-0.0.1 temporary-1.2.0.4 tar-0.4.5.0 cabal-doctest-1 Cabal-1.24.2.0 process-1.4.3.0) (new version)
dlist-0.8.0.2 (via: aeson-0.11.3.0) (new package)
fail-4.9.0.0 (via: aeson-0.11.3.0) (new package)
filelock-0.1.0.1 (via: ambiata-mafia-0.0.1) (new package)
integer-logarithms-1.0.1 (via: scientific-0.3.4.10) (new package)
memory-0.12 (latest: 0.14.1) (via: ambiata-mafia-0.0.1 cryptonite-0.15.1) (new package)
cryptonite-0.15.1 (latest: 0.22) (via: ambiata-mafia-0.0.1) (new package)
monad-loops-0.4.3 (via: ambiata-twine-0.0.1) (new package)
mtl-2.2.1 (via: aeson-0.11.3.0 exceptions-0.8.3) (new package)
parallel-3.2.1.0 (via: ambiata-mafia-0.0.1) (new package)
primitive-0.6.2.0 (via: vector-0.12.0.0) (new package)
process-1.4.3.0 (latest: 1.6.0.0) (via: ambiata-mafia-0.0.1 optparse-applicative-0.12.1.0 Cabal-1.24.2.0) (reinstall) (changes: directory-1.3.0.0 removed)
Cabal-1.24.2.0 (via: ambiata-mafia-0.0.1 distributive-0.5.2 cabal-doctest-1) (reinstall) (changes: directory-1.3.0.0 removed, process-1.4.3.0 removed)
cabal-doctest-1 (via: distributive-0.5.2) (new package)
random-1.1 (via: retry-0.7.4.2) (new package)
semigroups-0.18.2 (via: ambiata-p-0.0.1 bifunctors-5.3 comonad-5 contravariant-1.4 void-0.7.1) (new package)
stm-2.4.4.1 (via: ambiata-mafia-0.0.1 ambiata-twine-0.0.1 exceptions-0.8.3 async-2.1.1 StateVar-1.1.0.4 SafeSemaphore-0.10.1) (new package)
SafeSemaphore-0.10.1 (via: ambiata-twine-0.0.1) (new package)
StateVar-1.1.0.4 (via: contravariant-1.4) (new package)
async-2.1.1 (via: ambiata-mafia-0.0.1 ambiata-twine-0.0.1) (new package)
syb-0.7 (via: aeson-0.11.3.0) (new package)
tar-0.4.5.0 (latest: 0.5.0.3) (via: ambiata-mafia-0.0.1) (new package)
text-1.2.2.1 (via: ambiata-mafia-0.0.1 ambiata-mafia-0.0.1 ambiata-twine-0.0.1 ambiata-p-0.0.1 ambiata-x-optparse-0.0.1 aeson-0.11.3.0 attoparsec-0.13.1.0 scientific-0.3.4.10 ambiata-x-eithert-0.0.1 case-insensitive-1.2.0.8 hashable-1.2.5.0) (new package)
hashable-1.2.5.0 (via: void-0.7.1 aeson-0.11.3.0 scientific-0.3.4.10 unordered-containers-0.2.7.2 case-insensitive-1.2.0.8) (new package)
case-insensitive-1.2.0.8 (via: ambiata-mafia-0.0.1) (new package)
time-locale-compat-0.1.1.3 -old-locale (via: ambiata-mafia-0.0.1 ambiata-mafia-0.0.1) (new package)
transformers-compat-0.5.1.4 (via: bifunctors-5.3 comonad-5 contravariant-1.4 distributive-0.5.2 tagged-0.8.5 optparse-applicative-0.12.1.0 exceptions-0.8.3) (new package)
exceptions-0.8.3 (via: ambiata-mafia-0.0.1 ambiata-twine-0.0.1 temporary-1.2.0.4 retry-0.7.4.2 ambiata-x-eithert-0.0.1 ambiata-x-exception-0.0.1) (new package)
ambiata-x-exception-0.0.1 (via: ambiata-x-eithert-0.0.1) (new package)
ambiata-x-eithert-0.0.1 (via: ambiata-mafia-0.0.1 ambiata-mafia-0.0.1 ambiata-twine-0.0.1) (new package)
optparse-applicative-0.12.1.0 (latest: 0.13.1.0) (via: ambiata-mafia-0.0.1 ambiata-x-optparse-0.0.1) (new package)
retry-0.7.4.2 (via: ambiata-mafia-0.0.1) (new package)
tagged-0.8.5 (via: bifunctors-5.3 comonad-5 aeson-0.11.3.0 distributive-0.5.2) (new package)
distributive-0.5.2 (via: comonad-5) (new package)
temporary-1.2.0.4 (via: ambiata-mafia-0.0.1) (new package)
unordered-containers-0.2.7.2 (via: aeson-0.11.3.0) (new package)
vector-0.12.0.0 (via: aeson-0.11.3.0 scientific-0.3.4.10) (new package)
scientific-0.3.4.10 (via: aeson-0.11.3.0 attoparsec-0.13.1.0) (new package)
attoparsec-0.13.1.0 (via: ambiata-mafia-0.0.1 ambiata-x-optparse-0.0.1 aeson-0.11.3.0) (new package)
aeson-0.11.3.0 (latest: 1.1.0.0) (via: ambiata-mafia-0.0.1) (new package)
ambiata-x-optparse-0.0.1 (via: ambiata-mafia-0.0.1) (new package)
void-0.7.1 (via: contravariant-1.4) (new package)
contravariant-1.4 (via: comonad-5) (new package)
comonad-5 (via: bifunctors-5.3) (new package)
bifunctors-5.3 (latest: 5.4.1) (via: ambiata-p-0.0.1) (new package)
ambiata-p-0.0.1 (via: ambiata-mafia-0.0.1 ambiata-mafia-0.0.1 ambiata-twine-0.0.1) (new package)
ambiata-twine-0.0.1 (via: ambiata-mafia-0.0.1) (new package)
ambiata-mafia-0.0.1 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
ghc-8.0.2
Use --force-reinstalls if you want to install anyway.

do i need to use cabal new-build for this to not go bonkers?

Clean up source dependency build artefacts

I have 22GB worth of build artefacts inside dist dirs in source dependencies. Seems like this would be easy to nuke inside mafia clean, i.e. remove lib/source-dep/dist for each source dep.

Any reason not to implement this? @jystic

Mafia doesn't do enough to clean up a failed installation of a package before trying again

Just saw this:

Process failed: cabal unpack --destdir=/mnt/boris-service/.ambiata/mafia/packages/1/7.8.4/haskell-src-exts-1.17.1-fbc87035a5ec6567e081217c2bd2bfbdf4e8557f/src haskell-src-exts-1.17.1 (exit code: 1)

Looking on the box it seems as though an install of haskell-src-exts had got part of the way through, but never made it to writing the package.vanilla marker which indicates it is done. Maybe because it was missing happy on the PATH?

This is fine, but it looks as though we're not doing enough to clean up this directory before trying to use it again for the next attempt at installing haskell-src-exts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.