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

Fix for multiple build targets at cabal-add #4393

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

VenInf
Copy link
Contributor

@VenInf VenInf commented Aug 30, 2024

Fix for multiple build targets at cabal-add

In my current merged solution, cabal-add CodeAction is provided only for the main target.
This was only a temporary solution due to limitations of the getBuildTargets function.
For more information, consult this thread.

Now it was fixed, and you can choose to what target add the dependency.
Video with an example:

cabal-add-continuation-cut.mp4

Also, I changed the title for the CodeAction, to a hopefully better one.

Implementation details

I changed the functions getBuildTargets and buildTargetComponentName to
the getBuildTargetComponentNames that handles GenericPackageDescription and gives ComponentNames of all targets.

What isn't implemented

  • Previous tests were built assuming that there is need to wait only for one CodeAction. Now this leads to a race condition.

@VenInf VenInf requested a review from fendor as a code owner August 30, 2024 00:10
@VenInf VenInf requested a review from michaelpj as a code owner August 30, 2024 13:06
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

Successfully merging this pull request may close these issues.

2 participants