cabal
cabal copied to clipboard
Sometimes-false dependencies
Packages that define orphan instances don't always need all their dependencies to be built. For example, suppose package compat depends on package plain and just defines instances that appear in new versions of plain. It may be that all the uses of plain (module imports and plugins) in compat are guarded by #if !MIN_VERSION_plain(2,12,3). In this case, it should be possible to build compat without actually building plain and its transitive dependencies, although it's necessary to solve for them. We don't, as far as I know, have a way to express that in Cabal. Could such functionality be added?
If it's not too complex and cumbersome, I guess it could?
I wonder how cabal could be aware of cpp conditions ls in the code (in a reliable way)
maybe cabal is already capable of do it using backpack and mixins?
I wonder how cabal could be aware of cpp conditions ls in the code (in a reliable way)
it cannot. solving dependencies should only require the index
I don't think this is a useful feature worth pursuing. Seems like it adds a lot of overhead to how we think about solving, with very little meaningful gain.