haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.62k stars 691 forks source link

Release 3.10.3.0 moved `simpleProgram` between nodules and, so, is *not* strictly a bug-fix release #9863

Closed lyokha closed 1 month ago

lyokha commented 6 months ago

Describe the bug This is not a bug but rather a short remark. The 3.10.3.0 release was announced as strictly a bug-fix release, but, comparing to 3.10.2.1, there are changes in the interface that may affect users.

I used simpleProgram in my custom code with

import Distribution.Simple.Program.Types

The simpleProgram was previously defined in that module, but in the new release it was moved directly into Distribution.Simple.Program. Therefore, the code failed to compile after the upgrade, so I had to replace all my granular imports with the single Distribution.Simple.Program.

Btw, I agree that Distribution.Simple.Program.Types is not a proper place for simpeProgram.

geekosaur commented 6 months ago

Arguably that calls for 3.10.3.1 to reexport it, since API changes like that seem wrong.

lyokha commented 6 months ago

Previously, it was reexported from Distribution.Simple.Program, those who used the short module directly (i believe this should be a usual case as it's more convenient) won't notice the change.

lyokha commented 6 months ago

In 3.10.3.0 simpleProgram was moved from Distribution.Simple.Program.Types to Distribution.Simple.Program.Find.

gbaz commented 6 months ago

indeed this was a pvp breaking change (https://github.com/haskell/cabal/pull/9544) and we shouldn't have let it into a minor release. i think the damage is done at this point, and wouldn't want to reintroduce the problematic module dependency that pr introduced in a further release -- however we should be more mindful in the future, perhaps with automated api-surface comparison tools.