-
Notifications
You must be signed in to change notification settings - Fork 701
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
Coming to a decision regarding the short to medium-term future of cabal format
#8797
Comments
cabal format
cabal format
After discussion with the other members of the core team, it has been established that cabal-fmt is unmergeable, with its own idiosyncrasies that are too hard to properly manage. |
Upon seeing the command used by an innocent victim, I think we have to change a couple of things about its presentation. From off-site:
Clearly we violate a number of principles with this command, including the principle of least surprise. |
It seems the "standard style" is more like a pretty-printed normalised form of a cabal file. In my opinion, However, I am uncertain if we should have a formatting tool shipping with .cabal at all. I don't think other tools do that (although admittedly, most other langs I know have no custom formats for package specification), and it'd be much better to spend time on a potential exactprinter, such as #7626. This would foster friendly competition between multiple formatting libs with different design goals (minimal diffs vs vertical alignment, etc...). Similar to the haskell formatters that are out there already. |
The |
#5734 is still relevant in cabal-install 3.9.0.0 and this is a rather shameful footgun. There are today alternatives to it, like @phadej/cabal-fmt, which performs much better.
In parallel, we do not even show
format
in thecabal --help
message.I would like us to take a decision regarding what we make of the
format
option.@phadej Although I understand that the "goal of [this] project is to iterate independently of cabal-install"¹, would you say that it has reached suitable maturity for integration? I use the auto-expander syntax these days and I'm satisfied of how it works.
Personally I'd like see cabal-fmt as a new code path for
cabal format
. This can be advertised as being experimental, but in the end a clear improvement for the users.The text was updated successfully, but these errors were encountered: