-
Notifications
You must be signed in to change notification settings - Fork 710
Implement v2-gen-bounds function #10840
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
base: master
Are you sure you want to change the base?
Conversation
81e2cb7
to
04c7f02
Compare
7ab786f
to
b7dac1b
Compare
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
b7dac1b
to
6ae908d
Compare
Is it ready for review? |
I think it is, I just didn't re-review it yet:) |
@fgaz: just a reminder, once it's ready, pretty-please add the review-needed label. |
Hi, two months without any more reviews on this patch. Please can I merge it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this for now, other reviewers might have other opinions about how important avoiding duplication is.
buildInfoForTarget pd (ComponentTarget cname _) = componentBuildInfo $ getComponent pd cname | ||
|
||
-- | This defines what a 'TargetSelector' means for the @gen-bounds@ command. | ||
-- Copy of selectPackageTargets from CmdBuild.hs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be extracted and put in a common place, rather than copied.
buildable _ _ = True | ||
|
||
-- | For a 'TargetComponent' 'TargetSelector', check if the component can be | ||
-- selected. Copy of selectComponentTarget from CmdBuild.hs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can I merge it?
yes :)
This commit implements project-aware functionality for the
cabal gen-bounds
command, allowing it to work correctly in multi-package projects. Previously, runninggen-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.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:
significance: significant
in the changelog file.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: