-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
Added a target field to config, which defines the field to add the given values to.
1459fbf
to
6f9a783
Compare
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. |
6f9a783
to
5f8fbe8
Compare
Great, thank you! |
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.
Thanks for lots of tests! Few nipticks, but overall looks good!
5f8fbe8
to
759cb88
Compare
I made all the changes you requested and also took care of the warnings in the new test-suite, thank you for the quick review! |
…xisting modules in target field are separated by spaces instead of commas Add tests which verify correct behaviour
759cb88
to
f51e917
Compare
Thanks a ton! |
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 forbuild-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.