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

Add library support for adding modules to components #8

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

Conversation

VeryMilkyJoe
Copy link

@VeryMilkyJoe VeryMilkyJoe commented Oct 13, 2024

Added a target field to the config, which defines the field of the component to add the given values to.
The algorithms now adds values to the target field instead of always adding to build-depends.

The executeConfig function can now be configured to add to different fields while the cli tool will still always use execute config for build-depends.
This would be very useful for HLS, as we want to use cabal-add as a library to be able to offer code actions to add unknown modules to cabal files in a project.

Added some tests, verifying that modules can be added correctly with the right config.
If the previously written modules are separated by a space, instead of a comma, we currently don't extend accordingly, this is reflected in a test which currently fails.

Added a target field to config, which defines the field to add the given values to.
@Bodigrim
Copy link
Owner

Sorry, I'm short on time at the moment. I skimmed through, seems fine overall, thanks! I'll review again once you get CI green.

…xisting modules in target field are separated by spaces instead of commas

Add tests which verify correct behaviour
@VeryMilkyJoe
Copy link
Author

Great, thank you!

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