Skip to content

Support for ghc-9.2.* #2179

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

Closed
25 of 32 tasks
jneira opened this issue Sep 10, 2021 · 36 comments
Closed
25 of 32 tasks

Support for ghc-9.2.* #2179

jneira opened this issue Sep 10, 2021 · 36 comments
Labels
GHC issues with particular GHC versions old_type: distribution old_type: meta Planing and organizing other issues status: blocked Not actionable, because blocked by upstream/GHC etc. type: enhancement New feature or request
Milestone

Comments

@jneira
Copy link
Member

jneira commented Sep 10, 2021


State of support

  • The core functionality of haskell-language-server is supported via ghcide.
  • Plugins and formatters needs to be updated to make it work with ghc-9.0.1 so they are not included until then.
  • So you should consider use other ghc version only if you are specially interested in those plugins o formatters
  • The plan is include a prebuilt executable for ghc-9.2.1 in the next hls release (1.6.0)

Has ghc-9.2.1 support

Formatters

  • hls-floskell-plugin
  • hls-ormolu-plugin
  • hls-fourmolu-plugin
  • hls-brittany-plugin
  • hls-stylish-haskell-plugin

Build system and CI

  • included in github release
    • .github/workflows/build.yml
  • hackage release with support for ghc-9.2.1: Make work stack-9.2.1.yaml and enable pedantic (-WError) for cabal  #2606
    • .github/workflows/hackage.yml
  • stack-9.2.1.yaml, added but not working
    • .circleci/config.yml
  • cabal-ghc921.project - Used for disabling the not yet working plugins and fetching upstream patches
  • nix support: with Flake ghc 92 #2621
    • ./configuration-ghc-921.nix
    • update .github/workflows/nix.yml
  • .github/workflows/test.yml - Uses the custom cabal.project and disables tests for non-working plugins. Needs to be updated when more plugins get ghc-9.2.1 support

Dependencies which needs updates and hackage release

  • TODO: track all dependencies with issues(prs taking as base the allow-newer field of cabal-ghc921.project
@jneira jneira added type: enhancement New feature or request old_type: meta Planing and organizing other issues old_type: distribution ghc-9 labels Sep 10, 2021
@fendor
Copy link
Collaborator

fendor commented Sep 10, 2021

The MR #2128 adds compat module hierarchy and functions compatible with the GHC API 9.2 in a backward compatible manner. With I think roughly 3 exceptions (which require some small changes), bringing basic support for ghc-9.2 is a matter of adding the appropriate imports, once retrie supports ghc-9.2.

@jneira jneira added this to the 1.5.0 milestone Sep 16, 2021
@Dessix
Copy link

Dessix commented Oct 1, 2021

Looks like the next portion of this is dependent on support for 9.2 in retrie, which has a WIP that needs carried over the finish-line.

@jneira
Copy link
Member Author

jneira commented Oct 29, 2021

as noted by @Ailrun here #297 (comment)
ghc-9.2.1 has been released

@mouse07410
Copy link

How near are we to releasing 1.5.0, and would it include GHC-9.2.1 support?

@jneira
Copy link
Member Author

jneira commented Nov 5, 2021

Hi, 1.5.0 will be released soon but i am afraid it will not include ghc-9.2.1 for sure, there is still lot of work to be done here

@mouse07410
Copy link

I am afraid it will not include ghc-9.2.1 for sure, there is still lot of work to be done here

Maybe at least include partial support??? (Assuming it can be done and makes sense)

@jneira
Copy link
Member Author

jneira commented Nov 5, 2021

I am afraid it will not include ghc-9.2.1 for sure, there is still lot of work to be done here

Maybe at least include partial support??? (Assuming it can be done and makes sense)

I am afraid that this is blocked on a ghcide change and ghcide is the core of hls so we cant release it even partially.

@jneira jneira added the status: blocked Not actionable, because blocked by upstream/GHC etc. label Nov 5, 2021
@pepeiborra pepeiborra pinned this issue Nov 23, 2021
@Ailrun
Copy link
Member

Ailrun commented Dec 13, 2021

Related PR: nikita-volkov/ptr-poker#7 (which is a dependency of jsonify, which is in turn of opentelemetry-extra)

@Dessix
Copy link

Dessix commented Dec 14, 2021

ghc-exactprint-1.3.0 has been released - that was the portion that was blocking retrie itself; the next step is to update retrie to use it, and then it can be used for HLS 9.2.

There's a work-in-progress branch at https://github.com/alanz/retrie/tree/ghc-9.2 - it appears they're stuck on something related to fixity processing.

@Ailrun
Copy link
Member

Ailrun commented Dec 14, 2021

@Dessix The branch is actually merged now. It's now the problem of release (However, even after that, we still have opentelemetry-extra issue)

@Dessix
Copy link

Dessix commented Dec 14, 2021

Looks like the retrie release went through.

ptr-poker #7 is also released. What can we do to move this forward into jsonify and subsequently opentelemetry-extra?

@Ailrun
Copy link
Member

Ailrun commented Dec 14, 2021

Unfortunately, there wese mistakes in the PR and in a fix committed afterwards. This PR fixes those mistakes: nikita-volkov/ptr-poker#8

@pepeiborra
Copy link
Collaborator

We don't really depend on opentelemetry-extra, only on opentelemetry. Does that help?

@Ailrun
Copy link
Member

Ailrun commented Dec 14, 2021

Huh? then Why do I get issues from a transitive dependency of opentelemetry-extra? That's weird... let me check..

Oh, that was actually of our flake setting! Weird... is there any reason to use opentelemetry-extra?

@pepeiborra
Copy link
Collaborator

opentelemetry-extra provides tools to analyse eventlogs in Tracy, Chrome and other open telemetry viewers. The flake builds it because I use it.

@Ailrun
Copy link
Member

Ailrun commented Dec 14, 2021

@pepeiborra: Thank you for the answer. I think, as both opentelemetry and opentelemetry-extra are managed in the same directory and as their CI fails under GHC 9.2, the situation remains the same, unfortunately. I listed some issues I experienced while I tried to build GHCIDE with GHC 9.2:

GHC 9.2 support of GHCIDE (probably not yet exhaustive):

Main library

Testing

@pepeiborra
Copy link
Collaborator

opentelemetry installs without issues for me:

cabal install opentelemetry --overwrite-policy=always -w ghc-9.2 
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
 - ghc-trace-events-0.1.2.4 (lib) (requires build)
 - opentelemetry-0.7.0 (lib) (requires build)
Starting     ghc-trace-events-0.1.2.4 (lib)
Building     ghc-trace-events-0.1.2.4 (lib)
Installing   ghc-trace-events-0.1.2.4 (lib)
Completed    ghc-trace-events-0.1.2.4 (lib)
Starting     opentelemetry-0.7.0 (lib)
Building     opentelemetry-0.7.0 (lib)
Installing   opentelemetry-0.7.0 (lib)
Completed    opentelemetry-0.7.0 (lib)

@pepeiborra
Copy link
Collaborator

WIP branch here: https://github.com/haskell/haskell-language-server/compare/ghc-9.2?expand=1

@Ailrun
Copy link
Member

Ailrun commented Dec 14, 2021

Awesome, let's wait how GHC 9.2 support goes in other repositories...

@jneira jneira modified the milestones: 1.5.0, 1.6.0 Dec 15, 2021
@wz1000
Copy link
Collaborator

wz1000 commented Dec 16, 2021

We can use head.hackage to obtain a build plan. It already has patches for th-extras, constraints-extras and primitive-unlifted

Edit: Oh I see that is what Pepe's branch does.

@pepeiborra
Copy link
Collaborator

We can use head.hackage to obtain a build plan. It already has patches for th-extras, constraints-extras and primitive-unlifted

It has a patch for primitive-unlifted-0.1.3.0 but it looks like we need a newer version:

cabal: Could not resolve dependencies:
[__0] trying: ghcide-1.5.0.1 (user goal)
[__1] trying: stm-containers-1.2 (dependency of ghcide)
[__2] trying: stm-hamt-1.2.0.7 (dependency of stm-containers)
[__3] trying: primitive-extras-0.10.1.2 (dependency of stm-hamt)
[__4] next goal: primitive-unlifted (dependency of primitive-extras)
[__4] rejecting: primitive-unlifted-1.0.0.0, primitive-unlifted-0.1.3.1
(constraint from project config
/Users/pepeiborra/scratch/ide/cabal-ghc921.project requires ==0.1.3.0)
[__4] rejecting: primitive-unlifted-0.1.3.0 (conflict: primitive-extras =>
primitive-unlifted>=1.0 && <1.1)

@Bodigrim
Copy link
Contributor

Because of haskell-primitive/primitive-unlifted#28 you need the following incantation:

allow-newer:
  primitive-unlifted:base,
allow-older:
  primitive-extras:primitive-unlifted
constraints:
  primitive-unlifted < 1

If the issue with GHC 9.2 support in primitive-unlifted gets stalled, Hackage trustees can make revisions to avoid allow-newer / allow-older.

@Bodigrim
Copy link
Contributor

I believe primitive-{extras,unlifted} tweaks are no longer needed now.

@Dessix
Copy link

Dessix commented Jan 14, 2022

#2503 has been merged, as have primitive-unlifted and Aeson support for 9.2.1; What's the next blocker, or are we just waiting for the next release?

@pepeiborra
Copy link
Collaborator

HEAD already has experimental support for GHC 9.2 - just waiting for a release now.

@jneira
Copy link
Member Author

jneira commented Jan 14, 2022

I've updated the issue description with a detailed check list tracking ghc-9.2.1 support

@lilnasy
Copy link

lilnasy commented Jan 24, 2022

If there are beginner friendly tasks for 9.2 support, I'd love to help out.

@jneira
Copy link
Member Author

jneira commented Jan 24, 2022

If there are beginner friendly tasks for 9.2 support, I'd love to help out.

@lilnasy
Many thanks for the offer. Well there are some plugins without 9.2.1 support. Some of thems need updates in the underlying library so they are blocked. Afaik the plugins which could be adapted would be:

  • hls-haddock-comments-plugin: maybe needs some extensive changes due to exactprint changes in 9.2.1 (not sure //cc @berberman )
  • hls-eval-plugin: complex codebase, may be difficult (//cc @tittoassini)
  • hls-class-plugin: maybe the easier to tackle? (//cc @Ailrun)
  • hls-tactics-plugin: complex codebase, recently added to 9.0 (//cc @isovector)

Not sure about retrie plugin neither, which needs support for retrie library (//cc @pepeiborra)

@mouse07410
Copy link

Somewhat out of topic: what about 9.0.2? Stackage moved nightly to 9.0.2, but HLS is still 9.0.1-only.

@jneira
Copy link
Member Author

jneira commented Jan 24, 2022

Somewhat out of topic: what about 9.0.2? Stackage moved nightly to 9.0.2, but HLS is still 9.0.1-only.

Support was tracked with #2541 and added with #2567 so the next release will include it

@TeofilC
Copy link

TeofilC commented Apr 24, 2022

hlint-3.4 has just been released with support for ghc-9.2 https://hackage.haskell.org/package/hlint-3.4/changelog

@konn
Copy link
Collaborator

konn commented May 28, 2022

GHC 9.2.3 has just been released, so it might be the time to tackle it.

@Dessix
Copy link

Dessix commented May 28, 2022

#2732 (OverloadedRecordDot support) may be worth adding to the checklist, as the IDE gets somewhat confused with 9.2's new record syntax otherwise.

@mouse07410
Copy link

mouse07410 commented Jun 10, 2022

Any word on GHC-9.2.3 support yet? It shouldn't be too different from 9.2.2 from the HLS point of view, I'd imagine?

@maerten
Copy link

maerten commented Jun 10, 2022

There's a PR for 9.2.3: #2936

@jneira
Copy link
Member Author

jneira commented Jun 19, 2022

Sorry this issue is outdated and i dont have time to keep up to date, please open a new one if you want to track support for newer versions of ghc-9.2

@jneira jneira closed this as completed Jun 19, 2022
@michaelpj michaelpj unpinned this issue Jun 21, 2022
@July541 July541 mentioned this issue Jun 22, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GHC issues with particular GHC versions old_type: distribution old_type: meta Planing and organizing other issues status: blocked Not actionable, because blocked by upstream/GHC etc. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests