Skip to content

gen-bounds incorrectly reports missing bound when depend on internal library #6290

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

Closed
edmundnoble opened this issue Oct 7, 2019 · 4 comments · Fixed by #8392
Closed

gen-bounds incorrectly reports missing bound when depend on internal library #6290

edmundnoble opened this issue Oct 7, 2019 · 4 comments · Fixed by #8392

Comments

@edmundnoble
Copy link
Contributor

Describe the bug
cabal gen-bounds can sometimes report there are missing bounds, but there aren't any.

To Reproduce
Running cabal gen-bounds with this .cabal file triggers the bug.

cabal-version:       2.4                                                                                                                                                                                                                      
name:                gen-bounds-repro                                                                                                                                                                                                         
version:             0.1.0.0                                                                                                                                                                                                                  
                                                                                                                                                                                                                                              
library lib                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                              
executable exec                                                                                                                                                                                                                               
  main-is:       Main.hs                                                                                                                                                                                                                      
  build-depends: lib    

The output is as follows:

$ c gen-bounds
Resolving dependencies...

The following packages need bounds and here is a suggested starting point.
You can copy and paste this into the build-depends section in your .cabal
file and it should work (with the appropriate removal of commas).

Note that version bounds are a statement that you've successfully built and
tested your package and expect it to work with any of the specified package
versions (PROVIDED that those packages continue to conform with the PVP).
Therefore, the version bounds generated here are the most conservative
based on the versions that you are currently building with.  If you know
your package will work with versions outside the ranges generated here,
feel free to widen them.



$ 

Thanks hvr for minimizing. Seems the cause is the dependency on a library within the same project.

Expected behavior
gen-bounds should report that all of my dependencies have PVP-compliant bounds.

System informataion

  • cabal 3.0.0.0
@23Skidoo
Copy link
Member

23Skidoo commented Feb 7, 2020

/cc @mightybyte

@gbaz gbaz added the type: bug label Sep 3, 2021
@andreasabel
Copy link
Member

Still reproducible as of 2022-08-17.

@Mikolaj
Copy link
Member

Mikolaj commented Aug 17, 2022

BTW, is this a dupe of #7504?

@andreasabel
Copy link
Member

BTW, is this a dupe of #7504?

I don't think so. The present issue is a rather minor glitch, which I took over as a warm-up on gen-bounds.

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

Successfully merging a pull request may close this issue.

5 participants