apply-refact icon indicating copy to clipboard operation
apply-refact copied to clipboard

Build failure on GHC 9.0.1 on macOS

Open brightly-salty opened this issue 4 years ago • 2 comments

I encountered the following error when running stack install apply-refact:

apply-refact        > /private/var/folders/2s/gzz0f5_n20g1pc2mnnbf_1c40000gn/T/stack-242b9b3cdfbd8b5c/apply-refact-0.9.0.0/src/Refact/Internal.hs:405:53: error:
apply-refact        >     • Variable not in scope: noExt :: NoExt
apply-refact        >     • Perhaps you meant one of these:
apply-refact        >         ‘GHC.noExt’ (imported from GHC),
apply-refact        >         data constructor ‘NoExt’ (imported from HsSyn)
apply-refact        >       Perhaps you want to remove ‘noExt’ from the explicit hiding list
apply-refact        >       in the import of ‘HsSyn’ (src/Refact/Internal.hs:74:1-38).
apply-refact        >     |
apply-refact        > 405 |           fakeExpr = GHC.L (getLoc new) (GHC.VarPat noExt new)
apply-refact        >     |                                                     ^^^^^
apply-refact        >
apply-refact        > /private/var/folders/2s/gzz0f5_n20g1pc2mnnbf_1c40000gn/T/stack-242b9b3cdfbd8b5c/apply-refact-0.9.0.0/src/Refact/Internal.hs:561:68: error:
apply-refact        >     • Variable not in scope: noExt :: NoExt
apply-refact        >     • Perhaps you meant one of these:
apply-refact        >         ‘GHC.noExt’ (imported from GHC),
apply-refact        >         data constructor ‘NoExt’ (imported from HsSyn)
apply-refact        >       Perhaps you want to remove ‘noExt’ from the explicit hiding list
apply-refact        >       in the import of ‘HsSyn’ (src/Refact/Internal.hs:74:1-38).
apply-refact        >     |
apply-refact        > 561 |           withoutLocalBinds = setLocalBind (noLoc (EmptyLocalBinds noExt)) xvald origBind newLoc origMG locMG
apply-refact        >     |                                                                    ^^^^^
apply-refact        >
Completed 31 action(s).

--  While building package apply-refact-0.9.0.0 (scroll up to its section to see the error) using:
      /Users/cadenhaustein/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

ghc -V returns The Glorious Glasgow Haskell Compilation System, version 9.0.1, and stack --version returns Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0

I am on macOS Big Sur

brightly-salty avatar Feb 07 '21 16:02 brightly-salty

GHC 9.0.1 has just been released and is not yet supported by all libraries apply-refact depends on (e.g., ghc-exactprint). I'll start working on 9.0.1 support once all upstream libraries support it.

zliu41 avatar Feb 21 '21 05:02 zliu41

This was fixed in https://github.com/mpickering/apply-refact/pull/110

anka-213 avatar Mar 29 '21 01:03 anka-213

@brightly-salty @zliu41 @mpickering please close

andreasabel avatar Nov 20 '23 19:11 andreasabel