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

Main dependencies list for a package includes dependencies for non default buildable components #843

Open
JakeWheat opened this issue Sep 21, 2019 · 4 comments

Comments

@JakeWheat
Copy link

The main dependencies list for a package is also showing the dependencies for non default buildable components. I think it should only show dependencies for the default buildable components.
Example: http://hackage.haskell.org/package/simple-sql-parser-0.6.0

I think these bugs are related:
#809
#789

@grayjay
Copy link
Contributor

grayjay commented Sep 23, 2019

The executables' dependencies are shown because they are only hidden by automatic flags, and Hackage currently only looks at the default values for manual flags:

-- if and else branches, which are unioned together. Skip
-- dependencies introduced by manual flags.

@JakeWheat
Copy link
Author

Thanks. The solution is simply to change these flags to manual?

@JakeWheat
Copy link
Author

I changed the cabal file to make the flags manual, but Hackage still seems to be listing the dependencies for these components:
http://hackage.haskell.org/package/simple-sql-parser-0.6.1/candidate

@grayjay
Copy link
Contributor

grayjay commented Oct 8, 2019

Sorry, I had thought that the dependencies were also under a flag. It looks like Hackage excludes the dependencies from the list if they are under a branch that cannot be active when manual flags have their default values, but It doesn't take the buildable field into account. That logic was consistent with the behavior of Cabal before haskell/cabal#1725 was fixed, but now it needs to be updated.

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

No branches or pull requests

2 participants