haskell / hie-bios

Set up a GHC API session for various Haskell Projects
https://hackage.haskell.org/package/hie-bios
BSD 3-Clause "New" or "Revised" License
181 stars 63 forks source link

Add logs over commands #375

Closed blackheaven closed 2 years ago

blackheaven commented 2 years ago

I'm tackling #372 with a twist:

I think it gives enough feedback for day-to-day use, but allows to have a more verbose if needed.

Regarding design, it introduces a lot of burden, I wonder if I'd better to integrate it in Cradle.

WDYT?

fendor commented 2 years ago

Sorry for the long delay! I just kept putting off the work to review :sweat_smile:

fendor commented 2 years ago

The proposed changes are breaking changes, while there is nothing wrong with breaking changes in hie-bios, I would like to keep the breaking change as minimal as possible.

It seems like you do a lot of parameter passing just to add it to runGhcCmd. How about we add it as a paramater to runGhcCmd, because otherwise it feels redundant and weird to pass a log function to runCradle and pass the log action for runGhcCmd via the cradle generation. I think that'd make it more consistent. That, or making runCradle to also use the log action passed in to the Cradle creation function.

Otherwise, lgtm, thank you for your contribution!

blackheaven commented 2 years ago

No worries, thanks for your feedback, I have pushed a new version integrating them.