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

Build failure with ghc 9.6.2 #262

Open
iMichka opened this issue Sep 15, 2023 · 0 comments
Open

Build failure with ghc 9.6.2 #262

iMichka opened this issue Sep 15, 2023 · 0 comments

Comments

@iMichka
Copy link

iMichka commented Sep 15, 2023

Enhancement Suggestion / Bug Report

v0.24.0.65 fails to build with ghc 9.6.2. Last successful build attempt was with ghc 8.10.

Steps which explain the enhancement or reproduce the bug

Try to build Rome using ghc 9.6.2, cabal install 3.10.2.0

Current behavior

==> cabal v2-install
  Last 150 lines from /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs/rome/02.cabal:
                       with ‘M.HashMap b b0’
        Expected type: M.HashMap b b0
          Actual type: Object
      • In the second argument of ‘($)’, namely ‘obj’
        In the second argument of ‘(<$>)’, namely
          ‘(headMay . M.toList $ obj)’
        In the expression: fst <$> (headMay . M.toList $ obj)
      • Relevant bindings include
          firstKey :: Maybe b (bound at src/Data/Romefile.hs:115:9)
      |
  115 |     let firstKey = fst <$> (headMay . M.toList $ obj)
      |                                                  ^^^
  
  src/Data/Romefile.hs:117:83: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the second argument of ‘(.:)’, namely ‘key’
        In the second argument of ‘(<*>)’, namely ‘(obj .: key)’
        In the expression:
          RomefileEntry <$> parseJSON (Data.Yaml.String key) <*> (obj .: key)
      |
  117 |       Just key -> RomefileEntry <$> parseJSON (Data.Aeson.String key) <*> (obj .: key)
      |                                                                                   ^^^
  
  src/Data/Romefile.hs:122:64: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the first argument of ‘(.=)’, namely ‘T.pack prjname’
        In the expression: T.pack prjname .= fwrks
        In the first argument of ‘object’, namely
          ‘[T.pack prjname .= fwrks]’
      |
  122 |   toJSON (RomefileEntry (ProjectName prjname) fwrks) = object [T.pack prjname .= fwrks]
      |                                                                ^^^^^^^^^^^^^^
  
  src/Data/Romefile.hs:149:11: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the second argument of ‘(.:)’, namely ‘cacheJSONKey’
        In the second argument of ‘(<$>)’, namely ‘v .: cacheJSONKey’
        In the first argument of ‘(<*>)’, namely
          ‘Romefile <$> v .: cacheJSONKey’
      |
  149 |       .:  cacheJSONKey
      |           ^^^^^^^^^^^^
  
  src/Data/Romefile.hs:151:11: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the second argument of ‘(.:?)’, namely ‘repositoryMapJSONKey’
        In the first argument of ‘(.!=)’, namely
          ‘v .:? repositoryMapJSONKey’
  src/Data/Romefile.hs:166:14: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the first argument of ‘(.=)’, namely ‘ignoreMapJSONKey’
        In the expression: ignoreMapJSONKey .= iMap
        In the first argument of ‘(++)’, namely
          ‘[ignoreMapJSONKey .= iMap | not $ null iMap]’
      |
  166 |         ++ [ ignoreMapJSONKey .= iMap | not $ null iMap ]
      |              ^^^^^^^^^^^^^^^^
  
  src/Data/Romefile.hs:167:14: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the first argument of ‘(.=)’, namely ‘currentMapJSONKey’
        In the expression: currentMapJSONKey .= cMap
        In the second argument of ‘(++)’, namely
          ‘[currentMapJSONKey .= cMap | not $ null cMap]’
      |
  167 |         ++ [ currentMapJSONKey .= cMap | not $ null cMap ]
      |              ^^^^^^^^^^^^^^^^^
  
  src/Data/Romefile.hs:192:9: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the first argument of ‘(.=)’, namely ‘T.pack "s3Bucket"’
        In the expression: T.pack "s3Bucket" .= b
        In the first argument of ‘(++)’, namely
          ‘[T.pack "s3Bucket" .= b | isJust b]’
      |
  192 |       [ T.pack "s3Bucket" .= b | isJust b ] ++ [ T.pack "local" .= l | isJust l ] ++ [ T.pack "engine" .= e | isJust e ]
      |         ^^^^^^^^^^^^^^^^^
  
  src/Data/Romefile.hs:192:50: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the first argument of ‘(.=)’, namely ‘T.pack "local"’
        In the expression: T.pack "local" .= l
        In the first argument of ‘(++)’, namely
          ‘[T.pack "local" .= l | isJust l]’
      |
  192 |       [ T.pack "s3Bucket" .= b | isJust b ] ++ [ T.pack "local" .= l | isJust l ] ++ [ T.pack "engine" .= e | isJust e ]
      |                                                  ^^^^^^^^^^^^^^
  
  src/Data/Romefile.hs:192:88: error:
      • Couldn't match expected type ‘Key’ with actual type ‘T.Text’
      • In the first argument of ‘(.=)’, namely ‘T.pack "engine"’
        In the expression: T.pack "engine" .= e
        In the second argument of ‘(++)’, namely
          ‘[T.pack "engine" .= e | isJust e]’
      |
  192 |       [ T.pack "s3Bucket" .= b | isJust b ] ++ [ T.pack "local" .= l | isJust l ] ++ [ T.pack "engine" .= e | isJust e ]
      |                                                                                        ^^^^^^^^^^^^^^^
  Error: cabal: Failed to build Rome-0.24.0.65 (which is required by exe:rome
  from Rome-0.24.0.65). See the build log above for details.

Suggested behavior

No build failure

Why would the enhancement be useful to most users

We want to update to ghc 9.6.2 in the homebrew package manager, and Rome is preventing us to do so.

Rome version:

v0.24.0.65

OS and version:

macOS Ventura
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

1 participant