Skip to content

hls-cabal-plugin-2.11.0: CabalAdd.hs: error: Not in scope: data constructor ‘Config’ #4642

@juhp

Description

@juhp

Not sure yet what changed but today when I tried to (re)build HLS 2.11 I hit the compilation error below.

Your environment

Which OS do you use? Fedora
Which version of GHC do you use and how did you install it? ghc's from Fedora
How is your project built (alternative: link to the project)?
https://github.com/fedora-haskell/haskell-language-server

Steps to reproduce

https://download.copr.fedorainfracloud.org/results/petersen/haskell-language-server/epel-10-x86_64/09225087-haskell-language-server-ghc9.12/builder-live.log.gz

https://download.copr.fedorainfracloud.org/results/petersen/haskell-language-server/fedora-rawhide-ppc64le/09225359-haskell-language-server/builder-live.log.gz

Expected behaviour

Successful build of HLS 2.11 with cabal-install

Actual behaviour

[16 of 19] Compiling Ide.Plugin.Cabal.CabalAdd ( plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd.hs, dist/build/hls-cabal-plugin/Ide/Plugin/Cabal/CabalAdd.o, dist/build/hls-cabal-plugin/Ide/Plugin/Cabal/CabalAdd.dyn_o )
plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd.hs:283:55: error: [GHC-76037]
    Not in scope: data constructor ‘Config’
    Suggested fix:
      Add ‘Config’ to the import list in the import of ‘Ide.Types’
      (at plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd.hs:(61,1)-(65,82)).
    |
283 |   case executeConfig (validateChanges origPackDescr) (Config {..}) of
    |                                                       ^^^^^^

[17 of 19] Compiling Ide.Plugin.Cabal.Outline ( plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Outline.hs, dist/build/hls-cabal-plugin/Ide/Plugin/Cabal/Outline.o, dist/build/hls-cabal-plugin/Ide/Plugin/Cabal/Outline.dyn_o )
[18 of 19] Compiling Ide.Plugin.Cabal.Parse ( plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Parse.hs, dist/build/hls-cabal-plugin/Ide/Plugin/Cabal/Parse.o, dist/build/hls-cabal-plugin/Ide/Plugin/Cabal/Parse.dyn_o )
Error: [Cabal-7125]
Failed to build lib:hls-cabal-plugin from haskell-language-server-2.11.0.0 (which is required by exe:haskell-language-server-wrapper from haskell-language-server-2.11.0.0 and exe:haskell-language-server from haskell-language-server-2.11.0.0). See the build log above for details.

Debug information

It built okay at the end of May for Fedora 41, 42, and Rawhide on x86_64 and aarch64,
so I am not sure yet what changed: perhaps some dep bound would fix it possibly??

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions