Closed jneira closed 2 years ago
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.
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.
as noted by @Ailrun here https://github.com/haskell/haskell-language-server/issues/297#issuecomment-954904749 ghc-9.2.1 has been released
How near are we to releasing 1.5.0, and would it include GHC-9.2.1 support?
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
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 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.
Related PR: nikita-volkov/ptr-poker#7 (which is a dependency of jsonify, which is in turn of opentelemetry-extra)
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.
@Dessix The branch is actually merged now. It's now the problem of release (However, even after that, we still have opentelemetry-extra issue)
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
?
Unfortunately, there wese mistakes in the PR and in a fix committed afterwards. This PR fixes those mistakes: https://github.com/nikita-volkov/ptr-poker/pull/8
We don't really depend on opentelemetry-extra
, only on opentelemetry
. Does that help?
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
?
opentelemetry-extra
provides tools to analyse eventlogs in Tracy, Chrome and other open telemetry viewers. The flake builds it because I use it.
@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):
constraints-extras
(or we can use their HEAD)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)
Awesome, let's wait how GHC 9.2 support goes in other repositories...
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.
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)
Because of https://github.com/haskell-primitive/primitive-unlifted/issues/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
.
I believe primitive-{extras,unlifted}
tweaks are no longer needed now.
primitive-unlifted
and Aeson
support for 9.2.1; What's the next blocker, or are we just waiting for the next release?HEAD already has experimental support for GHC 9.2 - just waiting for a release now.
I've updated the issue description with a detailed check list tracking ghc-9.2.1 support
If there are beginner friendly tasks for 9.2 support, I'd love to help out.
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:
Not sure about retrie plugin neither, which needs support for retrie library (//cc @pepeiborra)
Somewhat out of topic: what about 9.0.2? Stackage moved nightly to 9.0.2, but HLS is still 9.0.1-only.
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 https://github.com/haskell/haskell-language-server/issues/2541 and added with https://github.com/haskell/haskell-language-server/pull/2567 so the next release will include it
hlint-3.4 has just been released with support for ghc-9.2 https://hackage.haskell.org/package/hlint-3.4/changelog
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?
There's a PR for 9.2.3: https://github.com/haskell/haskell-language-server/pull/2936
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
State of support
Has ghc-9.2.1 support
ghcide
haskell-language-server
hls-haddock-comments-plugin
hls-hlint-plugin
hls-pragmas-plugin
hls-retrie-plugin
without test, not included via flagshls-eval-plugin
hls-module-name-plugin
: it was not being tested in ci: see #2587. Doesnt compile for ghc-9.2.1. Fixed with #2594hls-class-plugin
hls-refine-imports-plugin
: #2601hls-splice-plugin
hls-tactic-plugin
hls-explicit-imports-plugin
hls-call-hierarchy-plugin
it is being tested so it works but it is not included in hls via flags: see #2587hls-alternate-number-format-plugin
hls-qualify-imported-names-plugin
: #2600Formatters
hls-floskell-plugin
hls-ormolu-plugin
hls-fourmolu-plugin
hls-brittany-plugin
hls-stylish-haskell-plugin
Build system and CI
.github/workflows/build.yml
.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 patchesconfiguration-ghc-921.nix
.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 supportDependencies which needs updates and hackage release
allow-newer
field ofcabal-ghc921.project