orome/crypto-enigma-hs

Fails to build with ghc-9.6 stackage nightly

Opened this issue · 3 comments

juhp commented
       Building executable 'enigma' for crypto-enigma-0.1.1.6..                                                                     
       [5 of 5] Compiling Main                                                                                                      
                                                                                                                                    
       /var/stackage/work/unpack-dir/unpacked/crypto-enigma-0.1.1.6-46908301d69291f67e5252bb1bc7f62f7531ba44f95fc48f8846ada924231776
/cli/enigma.hs:5:42: error:                                                                                                         
           Module ‘Options.Applicative.Help.Pretty’ does not export ‘string’                                                        
         |                                                                                                                          
       5 | import Options.Applicative.Help.Pretty  (string)        -- Necessary to format help text -- https://github.com/pcapriotti
/optparse-applicative/issues/90#issuecomment-49868254                                                                               
         |                                          ^^^^^^
Vekhir commented

@orome Do you have any thoughts on this?
This issue occurs due to optparse-applicative 0.18 switching to prettyprinter. This also means that Options.Applicative.Help.Pretty does not export string anymore.
The changelog for optparse-applicative contains the following remarks:

Move to 'prettyprinter` library for pretty printing.

This is a potentially breaking change when one uses the '*Doc' family of functions (like headerDoc) from Options.Applicative. However, as versions of 'ansi-wl-pprint > 1.0' export a compatible Doc type, this can be mitigated by using a recent version.
One can also either import directly from Options.Applicative.Help or from the Prettyprinter module of 'prettyprinter'.

The file in question (cli/enigma.hs) seems to use string in combination with footerDoc, and that occurs twice:

footerDoc (Just $ string $ ...other text...)

Once this issue is resolved, please also release a new version on Hackage, as this issue is blocking the upgrade to optparse-applicative 0.18.1 in the Arch repos.

Thanks you for your time!
-- Vekhir

orome commented

@Vekhir Thanks for looking into this. I've got this on my list of things to do but it keeps slipping. If you understand it well enough to create a pull request, I'm happy to have a look!

orome commented

Related to issue #7078 in commercialhaskell/stackage