mafia
mafia copied to clipboard
“install --only-dependencies”
Is there a way?
@llelf sorry, not at the moment, you could achieve more or less the same thing by doing mafia build
though, that is basically install --only-dependencies && configure && build
.
It's set up so that you don't have to think about it, you just always run mafia build
and it will figure out whether you need to install dependencies or not. It keeps a hash of the .cabal file and source dependencies, so it should be fast in the case where you don't need install or configure anything.
I'm doing continuous integration and it is useful have install --only-dependencies
as a separate step because CI tools like CircleCI will cache dependencies if that step is put in the dependencies section rather than the build section.
It's the only reason I can't use mafia
in CI at the moment.
@newhoggy hmm, maybe there is a case for mafia prebuild
or something like that for CI tools like Circle CI.
fwiw, you can work around this today by running mafia lock
, this will force the dependencies to be installed without building the current project (and then you can run mafia unlock
to get rid of the lock file)
That sounds like an excellent work around. I will try it. Thanks!
I can confirm this works. Thanks so much!