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

Implement v2-gen-bounds function #10840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mpickering
Copy link
Collaborator

@mpickering mpickering commented Mar 20, 2025

This commit implements project-aware functionality for the cabal gen-bounds command, allowing it to work correctly in multi-package projects. Previously, running gen-bounds from within a package directory that depends on another local package would fail because it couldn't find the local dependency.

The implementation follows the same pattern as other v2 commands, creating a full project context that knows about all packages defined in the cabal.project file. This allows gen-bounds to properly analyze dependencies between local packages and suggest appropriate bounds.

cabal gen-bounds <TARGET>

Fixes #7504
Fixes #8654
Fixes #9752
Fixes #5932

Please read Github PR Conventions and then fill in one of these two templates.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@mpickering mpickering force-pushed the wip/v2-gen-bounds branch 2 times, most recently from 81e2cb7 to 04c7f02 Compare March 20, 2025 17:22
@mpickering mpickering force-pushed the wip/v2-gen-bounds branch 2 times, most recently from 7ab786f to b7dac1b Compare March 21, 2025 10:21
This commit implements project-aware functionality for the `cabal gen-bounds` command,
allowing it to work correctly in multi-package projects. Previously, running `gen-bounds`
from within a package directory that depends on another local package would fail
because it couldn't find the local dependency.

The implementation follows the same pattern as other v2 commands, creating a full
project context that knows about all packages defined in the cabal.project file.
This allows `gen-bounds` to properly analyze dependencies between local packages
and suggest appropriate bounds.

```
cabal gen-bounds <TARGET>
```

Fixes #7504 #8654 #9752 #5932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants