Ghc-baked dependency infernal hell in packages

I have the following example of a hell admiral:

(with ghc-7.8.3 built from GNU / Linux x86_64 source and custom installation: True in .cabal / config)

1) at some point transformers-0.4.0.0 were installed (in user space, shadows (?) -Transformers-0.3 from global space)

2) later several libraries choose transformers-0.4

3), then I install a hint that depends on ghc, which depends on transformers-0.3 and which cannot be changed, since ghc is hard-wired.

result: I can not use the libraries from 2) and the tooltip in one project.

As a job, I put constraint: transformers installed in .cabal / config and rebuild. Is there a better way to deal with this situation - or, in order to avoid this, in the first place?

+6
source share
1 answer

Is there a better way to handle this situation.

No, your approach is reasonable.

or avoid it first?

Tricky Most people don't build things depending on ghc , so it makes sense for them to upgrade transformers , etc. Therefore, your restriction is not a suitable default value.

As Zeta writes: sandboxes can help. If you used sandboxes for your installations in (2) and used a different sandbox for any attempts to use both the tooltip and (2), then she just built these dependencies, designed for everything you build.

This is due to the fact that you are not using any space or build time between the various things that you do.

+4
source

Source: https://habr.com/ru/post/973418/


All Articles