Skip to content

gen-bounds for more than library stanzas #5932

Closed

Description

@puffnfresh

Running cabal gen-bounds will give bounds for the library in my .cabal file. I would also like to see additional bounds for the executables, test-suites and benchmarks.

Activity

  1. phadej commented on Mar 10, 2019

    @phadej
    Collaborator

    It would be also cool if redundant bounds aren't added

    i.e. (note no bound on base in tests, because tests depends on the library example)

    name example
    
    library
      build-depends:  base ^>=4.12.0.0
    
    test-suite tests
      build-depends: base, example, tasty ^>=1.2.1
    
  2. ozkutuk commented on Aug 3, 2023

    @ozkutuk
    Contributor

    With the way cabal check currently works, this results in an awkward situation:

    $ cabal check
    Warning: These warnings may cause trouble when distributing the package:
    Warning: These packages miss upper bounds:
    - tasty
    - tasty-golden
    Please add them, using `cabal gen-bounds` for suggestions. For more
    information see: https://pvp.haskell.org/
    
    $ cabal gen-bounds
    Resolving dependencies...
    Congratulations, all your dependencies have upper bounds!
  3. ozkutuk commented on Aug 3, 2023

    @ozkutuk
    Contributor

    I realized cabal check no longer generates above warnings for tests (and benchmarks) on master, since #8361 got merged. I still think it may be beneficial for cabal gen-bounds to generate the bounds for these internal targets nonetheless. Would it be counterintuitive for gen-bounds to generate bounds when check doesn't complain about the lack of them? If not, I can try my hand at implementing this.

  4. added a commit that references this issue on May 27, 2025
  5. added a commit that references this issue on Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions