tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
950 stars 83 forks source link

Release 0.5.3.0 is not compliant with PVP #981

Closed fendor closed 1 year ago

fendor commented 1 year ago

Type signature of ormolu breaks PVP versioning by changing the type of one of its parameters. Was:

ormolu :: MonadIO m => Config RegionIndices ->  FilePath -> String -> m Text

Is now:

ormolu :: MonadIO m => Config RegionIndices ->  FilePath -> Text -> m Text

Assumes ormolu follows PVP and the Ormolu module does so as well, which I honestly did not fully check :innocent:

fendor commented 1 year ago

The readme says, ormolu follows PVP from release 0.5.3.0 https://github.com/tweag/ormolu#using-as-a-library, so we can close this issue, I think.

mrkkrp commented 1 year ago

Up util 0.5.3.0 Ormolu was versioned as an application based on its behavior rather than as a library based on its API. This has changed in 0.5.3.0, as you have already noticed.

amesgen commented 1 year ago

Also see https://github.com/tweag/ormolu/pull/976#discussion_r1086379997 for more context.

I will update https://github.com/haskell/haskell-language-server/pull/3449 which includes making HLS compatible with Ormolu 0.5.3.0 :+1:

fendor commented 1 year ago

I think, it would've been helpful to start from a new major version. Thank you for the prompt responses!