Skip to content

Remove hie-compat #4613

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

Merged
merged 1 commit into from
Aug 2, 2025
Merged

Conversation

dschrempf
Copy link
Collaborator

After removing support for GHC 9.4, I was in the mood of cleaning up a bit more. While removing references to GHC 9.4, I realized that some parts of HLS are referring to even older versions of GHC.

Now, some people may hate me for that, but: I completely removed the now obsolete hie-compat library.

hie-compat is a compatibility library backporting support of Haskell IDE Engine (HIE) features to older versions of GHC. Since GHC 9.2, hie-compat only re-exported definitions already present in the ghc library, and so, is essentially obsolete.

FYI: We still have hie-compat in the dependency graph, because some libraries (e.g., hiedb) are using it.

This may be a bit harsh, but let me know what you think!

@dschrempf dschrempf force-pushed the dom/remove-hie-compat branch 4 times, most recently from d330291 to 3c9d053 Compare June 4, 2025 19:58
@dschrempf dschrempf marked this pull request as ready for review June 5, 2025 04:12
@michaelpj
Copy link
Collaborator

Yeah, I think this is a good idea. In principle, I think we'd like to have some kind of compatibility layer library, but in practice I think it's just spread out everywhere.

@dschrempf
Copy link
Collaborator Author

dschrempf commented Jun 5, 2025

There is Development.IDE.GHC.Compat, which we could extract into a separate package. That would probably make sense.

@dschrempf dschrempf force-pushed the dom/remove-hie-compat branch 2 times, most recently from b6b5ecb to ec910c4 Compare June 10, 2025 07:05
@dschrempf
Copy link
Collaborator Author

dschrempf commented Jun 12, 2025

Any other opinions? (I don't feel like dragging this along for too long, but maybe there is a way forward?)

@michaelpj
Copy link
Collaborator

I think @wz1000 is most likely to have a real opinion?

@dschrempf dschrempf force-pushed the dom/remove-hie-compat branch 4 times, most recently from 11ab93f to be8be55 Compare June 23, 2025 18:21
@dschrempf
Copy link
Collaborator Author

It seems there are no more opinions. I sgguest reviewing/merging or closing this PR.

@michaelpj
Copy link
Collaborator

I think we just need an opinion from @wz1000

@dschrempf
Copy link
Collaborator Author

I think we should go ahead and rebase/review/merge or close.

@wz1000
Copy link
Collaborator

wz1000 commented Jul 10, 2025

I think this is fine, but we do lose a bit of flexibility by losing the ability to backport fixes and improvements to hie file generation. The format is more stable now, so perhaps that isn't such a big concern and we just require upgrading the ghc version to get access to newer hie file fixes.

@dschrempf dschrempf force-pushed the dom/remove-hie-compat branch from be8be55 to 990ef2b Compare July 30, 2025 13:26
@dschrempf
Copy link
Collaborator Author

dschrempf commented Jul 30, 2025

Thank you @wz1000 for your opinion. I have rebased the PR.

I think it is good to remove unnecessary compability layers. The only concern I have is that on the Hackage page of hie-compat (https://hackage.haskell.org/package/hie-compat) we link to this repository, and after merging this PR the relevant files will be gone.

@michaelpj
Copy link
Collaborator

Nothing stops us reviving the package and publishing new versions in the future if we need, so let's do this for now.

@michaelpj michaelpj added the merge me Label to trigger pull request merge label Jul 30, 2025
@dschrempf
Copy link
Collaborator Author

I am unsure what the two failing checks mean. Let me know, if I can do something about them! @michaelpj

While removing references to GHC 9.4, I realized that some parts of HLS are
referring to even older versions of GHC.

For example, `hie-compat` is a compatibility library backporting support of
Haskell IDE Engine (HIE) features to older versions of GHC. Since GHC 9.2,
`hie-compat` only re-exported definitions already present in the `ghc` library,
and so, is essentially obsolete.

FYI: We still have `hie-compat` in the dependency graph, because some
libraries (e.g., `hiedb`) are using it.
@dschrempf dschrempf force-pushed the dom/remove-hie-compat branch from 990ef2b to 1854c11 Compare August 1, 2025 11:41
@michaelpj michaelpj merged commit 59b733f into haskell:master Aug 2, 2025
46 of 51 checks passed
jian-lin added a commit to linj-fork/haskell-language-server that referenced this pull request Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants