Skip to content
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

Fails to build with ghc-9.6 stackage nightly #36

Open
juhp opened this issue Jun 21, 2023 · 3 comments
Open

Fails to build with ghc-9.6 stackage nightly #36

juhp opened this issue Jun 21, 2023 · 3 comments

Comments

@juhp
Copy link

juhp commented Jun 21, 2023

       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                                                                               
         |                                          ^^^^^^
juhp added a commit to commercialhaskell/stackage that referenced this issue Jun 21, 2023
@Vekhir
Copy link

Vekhir commented Sep 13, 2023

@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
Copy link
Owner

orome commented Sep 13, 2023

@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 orome changed the title fails to build with ghc-9.6 stackage nightly Fails to build with ghc-9.6 stackage nightly Sep 13, 2023
@orome
Copy link
Owner

orome commented Sep 13, 2023

Related to issue #7078 in commercialhaskell/stackage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants