mafia icon indicating copy to clipboard operation
mafia copied to clipboard

“install --only-dependencies”

Open llelf opened this issue 9 years ago • 6 comments

Is there a way?

llelf avatar Feb 10 '16 12:02 llelf

@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.

jacobstanley avatar Feb 10 '16 22:02 jacobstanley

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.

newhoggy avatar Apr 19 '16 13:04 newhoggy

It's the only reason I can't use mafia in CI at the moment.

newhoggy avatar Apr 19 '16 13:04 newhoggy

@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)

jacobstanley avatar Apr 19 '16 23:04 jacobstanley

That sounds like an excellent work around. I will try it. Thanks!

newhoggy avatar Apr 20 '16 00:04 newhoggy

I can confirm this works. Thanks so much!

newhoggy avatar Apr 20 '16 23:04 newhoggy