vaclavsvejcar / headroom

©️ Manager for license headers in source code files.
https://doc.norcane.com/headroom/latest/
BSD 3-Clause "New" or "Revised" License
48 stars 3 forks source link

Support GHC 9.2 #89

Closed chshersh closed 2 years ago

chshersh commented 2 years ago

When building headroom with GHC 9.2, I see the following error:

[65 of 67] Compiling Headroom.Command.Bootstrap ( src/Headroom/Command/Bootstrap.hs, dist/build/Headroom/Command/Bootstrap.o, dist/build/Headroom/Command/Bootstrap.dyn_o )

src/Headroom/Command/Bootstrap.hs:136:3: error:
    • Illegal equational constraint string-interpolate-0.3.1.1:Data.String.Interpolate.Conversion.Classes.Builder
                                      (string-interpolate-0.3.1.1:Data.String.Interpolate.Conversion.Classes.IsCustomSink
                                         dst)
                                      dst
                                    ~ string-interpolate-0.3.1.1:Data.String.Interpolate.Conversion.Classes.Builder
                                        (string-interpolate-0.3.1.1:Data.String.Interpolate.Conversion.Classes.IsCustomSink
                                           dst)
                                        dst
      (Use GADTs or TypeFamilies to permit this)
    • When checking the inferred type
        message :: forall {dst} {src}.
                   (string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.Builder
                      (string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.IsCustomSink
                         dst)
                      dst
                    ~ string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.Builder
                        (string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.IsCustomSink
                           dst)
                        dst,
                    string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.Interpolatable
                      (string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.IsCustomSink
                         dst)
                      src
                      dst,
                    string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.Interpolatable
                      (string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.IsCustomSink
                         dst)
                      Text
                      dst) =>
                   src -> dst
      In an equation for ‘displayUpdate’:
          displayUpdate version
            = do configPath <- globalConfigPath
                 logInfo . display . messageInfo $ message configPath
            where
                message configPath
                  = ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.finalize
                        Proxy)
                       (((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.build
                            Proxy)
                           ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.ofString
                               Proxy)
                              "New version "))
                          (((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.build
                               Proxy)
                              ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.interpolate
                                  Proxy)
                                 (printVersionP version)))
                             (((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.build
                                  Proxy)
                                 ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.ofString
                                     Proxy)
                                    " is available for download, you can get it from "))
                                (((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.build
                                     Proxy)
                                    ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.interpolate
                                        Proxy)
                                       webRepo))
                                   (((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.build
                                        Proxy)
                                       ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.ofString
                                           Proxy)
                                          ".
     Tired of seeing this message? You can change the behaviour in global config file here:
     "))
                                      (((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.build
                                           Proxy)
                                          ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.interpolate
                                              Proxy)
                                             configPath))
                                         ((string-interpolate-0.3.1.1-6790e00de3061a29dfb1f0c2a6fec63fb9c9801ae6885bde844a4b41f19aa1d6:Data.String.Interpolate.Conversion.Classes.ofString
                                             Proxy)
                                            ""))))))))
    |
136 |   message configPath = [iii|
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^...
cabal: Failed to build headroom-0.4.3.0 (which is required by exe:headroom
from headroom-0.4.3.0). See the build log above for details.
vaclavsvejcar commented 2 years ago

I was able to reproduce the issue, but I'm not yet sure what is the source problem, maybe something changed in GHC 9.2.x. I'll investigate and let you know. So far headroom in master branch is set for LTS 19.3 so it builds fine with GHC 9.0.2. I'll try to include fix for this into upcoming v0.4.4.0.

chshersh commented 2 years ago

@vaclavsvejcar Thanks 🤗 It's not urgent, I still can build headroom with GHC 8.10.7 so it's not a blocker for me to stop using the tool 🙂

vaclavsvejcar commented 2 years ago

@chshersh Actually should be fixed now in master, turns out it was easy fix 😀 Can you please try?

chshersh commented 2 years ago

@vaclavsvejcar I tried building from master and everything works 👍🏻 Thanks!

vaclavsvejcar commented 2 years ago

Great! I'll close this issue and it will be part of v0.4.4.0 release.