-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Remove the ghcide executable #2979
Comments
+1 Previous discussions: |
I did take a look, and it is currently non-trivial because the ghcide-testsuite depends on the ghcide executable and instructs it to emit certain LSP messages for the tests. To remove the ghcide executable, we need to make the testsuite depend on HLS which requires a bit more untangling of the hls-plugin-api/ghcide/HLS dependency graph. |
+1 |
Do you guys think this might be a good approach? we start by adding a core plugin, then move most of the ghcide functionality to the core plugin bit by bit((switching the test to use hls test in the proccess). This should solve the dependency problem. |
To be perfectly clear, ghcide would not expose a plugin any more, consequentially there would be barely any tests in ghcide? I am not sure that's enough, I think we should first focus on the dependency graph and look at what dependency edges we wish to sever. I created this: I hope there are no mistakes, but it can help identifying why it is non-trivial to refactor 🙃 |
I find the |
In the long run I'm not sure even that is enough. If we were starting again today, I doubt we would have a separate package like
I think what @soulomoon proposes is a way we could get there: create
I don't think it would be that hard to define a minimal HLS executable that only includes the core Haskell plugins? The objectionable bit about the ghcide executable is that adds a lot of very similar code to the HLS one, and leads to some confusing attempts to abstract the bits that they share. |
it is already quite abstracted? All the ghcide executable does is set up its configuration and call |
Sure, I'm just saying that it's confusing. And e.g. all the logger setup is duplicated (and not consistent). And they have different "commands" that we map between. It's just a bunch of unnecessary (IMO) stuff. |
Nice graph @fendor, it is even messier if we consider the
From a higher perspective, Since the refactor is Here is the part I think we can do first.
|
The HLS executable can already be built without all the plugins, there are flags for that. So it's unclear what purpose the
ghcide
executable serves any more. Removing it would let us simplify some code, and perhaps move some of the glue code out ofghcide
(is that desirable?).Anyone have any strong reasons to keep it?
The text was updated successfully, but these errors were encountered: