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

Update ghcide dependency for various plugins #2368

Merged
merged 11 commits into from
Nov 22, 2021
Merged

Conversation

hololeap
Copy link
Contributor

@hololeap hololeap commented Nov 19, 2021

hls-class-plugin-1.0.1.1 imports Development.IDE.GHC.Compat.Util, which doesn't exist until ghcide-1.5.0

Building library for hls-class-plugin-1.0.1.1..
[1 of 1] Compiling Ide.Plugin.Class ( src/Ide/Plugin/Class.hs, dist/build/Ide/Plugin/Class.o, dist/build/Ide/Plugin/Class.dyn_o )

src/Ide/Plugin/Class.hs:27:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
27 | import           Development.IDE.GHC.Compat.Util
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for the pr fixing it
Out of curiosity, are you installing hls from hackage for any specific reason?

@jneira
Copy link
Member

jneira commented Nov 19, 2021

A hackage revision will be needed to fix the uploaded package

@hololeap
Copy link
Contributor Author

I'm packaging for Gentoo which tends to catch all sorts of unnoticed bugs. It pulls packages from hackage and uses cabal v1 under the hood to compile.

hololeap added a commit to hololeap/haskell-language-server that referenced this pull request Nov 19, 2021
Similar to haskell#2368

It will also need a revision on hackage

```
src/Ide/Plugin/Fourmolu.hs:18:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
18 | import qualified Development.IDE.GHC.Compat.Util as S
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
@hololeap hololeap marked this pull request as draft November 19, 2021 17:14
@hololeap hololeap changed the title hls-class-plugin: Update ghcide dependency Update ghcide dependency for various plugins Nov 19, 2021
`hls-class-plugin-1.0.1.1` imports `Development.IDE.GHC.Compat.Util`, which doesn't exist until version `1.5.0`

```
Building library for hls-class-plugin-1.0.1.1..
[1 of 1] Compiling Ide.Plugin.Class ( src/Ide/Plugin/Class.hs, dist/build/Ide/Plugin/Class.o, dist/build/Ide/Plugin/Class.dyn_o )

src/Ide/Plugin/Class.hs:27:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
27 | import           Development.IDE.GHC.Compat.Util
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
src/Ide/Plugin/Fourmolu.hs:18:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
18 | import qualified Development.IDE.GHC.Compat.Util as S
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
src/Ide/Plugin/Hlint.hs:79:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Core’
    Perhaps you meant Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
79 | import           Development.IDE.GHC.Compat.Core                    hiding
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
```
```
src/Ide/Plugin/Ormolu.hs:14:69: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘hsc_dflags’
   |
14 | import           Development.IDE.GHC.Compat      (moduleNameString, hsc_dflags)
   |                                                                     ^^^^^^^^^^

src/Ide/Plugin/Ormolu.hs:16:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
16 | import qualified Development.IDE.GHC.Compat.Util as S
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
src/Ide/Plugin/Retrie.hs:60:56: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘Outputable’
   |
60 |                                                        Outputable,
   |                                                        ^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:64:56: error:
    Module
    ‘Development.IDE.GHC.Compat’
    does not export
    ‘SourceText(..)’
   |
64 |                                                        SourceText (..),
   |                                                        ^^^^^^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:68:56: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘hm_iface’
   |
68 |                                                        hm_iface, isQual,
   |                                                        ^^^^^^^^

src/Ide/Plugin/Retrie.hs:68:66: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘isQual’
   |
68 |                                                        hm_iface, isQual,
   |                                                                  ^^^^^^

src/Ide/Plugin/Retrie.hs:69:56: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘isQual_maybe’
   |
69 |                                                        isQual_maybe,
   |                                                        ^^^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:72:56: error:
    Module
    ‘Development.IDE.GHC.Compat’
    does not export
    ‘nameModule_maybe’
   |
72 |                                                        nameModule_maybe,
   |                                                        ^^^^^^^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:73:56: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘nameRdrName’
   |
73 |                                                        nameRdrName, occNameFS,
   |                                                        ^^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:73:69: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘occNameFS’
   |
73 |                                                        nameRdrName, occNameFS,
   |                                                                     ^^^^^^^^^

src/Ide/Plugin/Retrie.hs:74:56: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘occNameString’
   |
74 |                                                        occNameString,
   |                                                        ^^^^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:79:56: error:
    Module ‘Development.IDE.GHC.Compat’ does not export ‘rdrNameOcc’
   |
79 |                                                        rdrNameOcc, rds_rules,
   |                                                        ^^^^^^^^^^

src/Ide/Plugin/Retrie.hs:81:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
81 | import           Development.IDE.GHC.Compat.Util      hiding (catch, try)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
src/Ide/Plugin/Splice.hs:48:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
48 | import qualified Development.IDE.GHC.Compat.Util as Util
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
src/Ide/Plugin/StylishHaskell.hs:13:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
13 | import qualified Development.IDE.GHC.Compat.Util as Util
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
src/Wingman/Metaprogramming/Lexer.hs:14:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Core’
    Perhaps you meant Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
14 | import           Development.IDE.GHC.Compat.Core (OccName, mkVarOcc)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Wingman/Range.hs:7:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Core’
    Perhaps you meant Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  |
7 | import           Development.IDE.GHC.Compat.Core
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Wingman/Range.hs:8:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  |
8 | import           Development.IDE.GHC.Compat.Util as FS
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Wingman/StaticPlugin.hs:12:1: error:
    Could not find module ‘Development.IDE.GHC.Compat.Util’
    Perhaps you meant
      Development.IDE.GHC.Compat (from ghcide-1.4.2.2)
      Development.IDE.GHC.Util (from ghcide-1.4.2.2)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
12 | import Development.IDE.GHC.Compat.Util
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

many many thanks for fixing bounds, we are not checking backwards compat in our hackage workflow, will do revisions asap

@jneira
Copy link
Member

jneira commented Nov 21, 2021

is it still a wip? maybe it needs update more plugins?

@hololeap
Copy link
Contributor Author

@jneira Still a WIP until I confirm they build with ghcide-1.5.0. Would it be better if this was one large commit instead of a bunch of small ones?

```
src/Test/Hls.hs:52:51: error:
    Module
    ‘Development.IDE.Plugin.Test’
    does not export
    ‘TestRequest(GetBuildKeysBuilt)’
   |
52 | import           Development.IDE.Plugin.Test     (TestRequest (GetBuildKeysBuilt, WaitForIdeRule, WaitForShakeQueue),
   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Test/Hls.hs:57:51: error:
    Module ‘Ide.PluginUtils’ does not export ‘idePluginsToPluginDesc’
   |
57 | import           Ide.PluginUtils                 (idePluginsToPluginDesc,
   |                                                   ^^^^^^^^^^^^^^^^^^^^^^
```
@jneira
Copy link
Member

jneira commented Nov 22, 2021

ok, that way is fine to me, we usually do squash+merge to master

@hololeap hololeap marked this pull request as ready for review November 22, 2021 08:10
@hololeap
Copy link
Contributor Author

hololeap commented Nov 22, 2021

All these build with ghcide-1.5.0 on my system. I just wanted to double check :)

@hololeap
Copy link
Contributor Author

hololeap commented Nov 22, 2021

Just FYI, I didn't get a chance to check hls-fourmolu-plugin with ghcide-1.4.2.2, but it builds fine with ghcide-1.5.0

Edit: Actually it's right there, so nevermind, my mistake.

@jneira
Copy link
Member

jneira commented Nov 22, 2021

Needed revisons (ghcide ^>=1.5.0), last version of:

  • hls-test-utils
  • hls-class-plugin
  • hls-fourmolu-plugin
  • hls-hlint-plugin
  • hls-ormolu-plugin
  • hls-retrie-plugin
  • hls-splice-plugin
  • hls-stylish-haskell-plugin
  • hls-tactics-plugin

@jneira jneira merged commit 8945881 into haskell:master Nov 22, 2021
@hololeap hololeap deleted the patch-3 branch November 22, 2021 16:31
@jneira
Copy link
Member

jneira commented Nov 22, 2021

@hololeap all plugins revised!

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

Successfully merging this pull request may close these issues.

2 participants