Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes-false dependencies #8349

Open
treeowl opened this issue Aug 9, 2022 · 4 comments
Open

Sometimes-false dependencies #8349

treeowl opened this issue Aug 9, 2022 · 4 comments

Comments

@treeowl
Copy link
Contributor

treeowl commented Aug 9, 2022

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?

@Mikolaj
Copy link
Member

Mikolaj commented Aug 9, 2022

If it's not too complex and cumbersome, I guess it could?

@jneira
Copy link
Member

jneira commented Aug 9, 2022

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?

@fgaz
Copy link
Member

fgaz commented Aug 10, 2022

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

@gbaz
Copy link
Collaborator

gbaz commented Aug 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants