Open alok opened 3 years ago
I think this is a wonderful idea, and would dovetail nicely with the cabal gen-bounds
work, for which we wanted to add a write-in-place option that required a slightly better parser. If it's already done in this package, I see no reason to not include this. CC @fgaz @mightybyte. I'm happy to help get you started.
Is cabal-edit this project https://github.com/sdiehl/cabal-edit?
Sounds like an useful addition, but it'd have to overcome the limitations stated in the readme first, otherwise editing would not work on a good chunk of packages.
Another point to think about is how projects could affect the commands: eg. maybe add
should check for compatibility with the rest of the project first.
a related idea i had (which maybe already exists?) would be a cabal-explain : eg explain / list what the current named compoents are (eg libraries/test/executables), i dont know if theres actually a way to list those now? @fgaz ?
Here's the main stuff that needs to be resolved for a proper roundtrip one way or another as I understand it: https://github.com/haskell/cabal/issues/5306
@gbaz looks like comment preserving exactprint is the blocker in #5306? where should i look to find that in the codebase?
@alok: exact-print is not done yet, though we'd love to have it and there's a related project: https://github.com/haskell/cabal/projects/9
cabal edit should subsume this old ticket (--save is sort of like --add here). https://github.com/haskell/cabal/issues/1961
the idea is to grow cabal to add some subcommands with sensible defaults. i'd be happy to implement if someone points me the right way and there's interest.