-
-
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
The code action to import a qualified identifier does not produce a qualified import anymore #3473
Comments
See
|
In particular https://gitlab.haskell.org/ghc/ghc/-/issues/22130 |
Okay! So I have two questions:
|
Not AFAIK. How would you convey it?
We don't distinguish between "working at all for a GHC version" and "working but with caveats". We could do, but we can barely keep up with the information as it is. |
@michaelpj now I'm confused, isn't the whole purpose of Tier 2 to signify "it works but with caveats"??
Well I'm asking because you're the LSP person ;-) |
Does it say that? Serious question, I would like to rephrase it to be clearer! The intention is more about whether we need to have it building with a new GHC before we release HLS/declare that we support that GHC version. We don't have a finer distinction for "this works with this GHC version but not very well".
I'm asking you where you'd like to see it because you're the user ;) But seriously, there are two problems |
As a user I find it very surprising that plugins marked as tier 1 might only partially work for GHC versions that HLS supports. When the plugins support tiers page indicates that a plugin is working I don't take that to mean "at least partially working". |
Since this is a GHC regression, we can't really do much about it in HLS. We simply do not have enough information in HLS with GHC 9.4 to fix this. I'm not sure what we can do here, because the plugin has been ported to GHC 9.4, its just that some features cannot work with GHC 9.4. |
@wz1000 indeed on the technical level there isn't much that can be done (and I'm not implying that you have failed in any way), however the tier system and its unwritten infidelities can be worked on to adhere closer to the principle of least surprise. Moreover, even if not perfect, functions like Of course I'm not throwing ideas and expecting you to implement them. If you're open to such a contribution, I can submit a patch for the compatibility data to be amended with the output of |
This sounds like a good idea, but it may be a lot more work than you bargained for. Many tests in the testsuite are disabled using these functions not because the feature doesn't work, but because nobody figured out how to make the test work, or due to subtle (but not incorrect) differences across GHC versions. |
It means working well enough that we think we can ship it. As @wz1000 says, almost all versions of GHC have a few quirks that make certain things not work or not work perfectly. I don't think we can realistically provide this information to users. I do think we could decide that we don't consider a plugin "supported" for a GHC version if it has critical bugs, and then we could have considered this a critical bug. Obviously, a PR claiming to make a tier 1 plugin support a new GHC version by disabling all the functionality would not be acceptable! |
At work we've dropped HLS (and re-adopted) quite a few times because of tier-1 features not working or having critical bugs. We tend to re-evaluate whenever a big major version gets released. If tier-1 guaranteed "no critical bugs" there would be less surprise for us re-adopting HLS. In fact I believe frustration from not knowing tier-1 didn't make the "no critical bugs" distinction might have led to us dropping HLS a few times when we didn't need to. |
Looks like the GHC issue got fixed for 9.8. We should check that it's working again and also extend the workaround in #3712 to cover 9.6 too. |
Although I am rather confused. It seems that the tests pass for 9.6 even though the workaround doesn't apply there. |
Tentatively closing since I think this is fixed |
Your environment
Which OS do you use? Fedora 36
Which version of GHC do you use and how did you install it? GHC 9.4.4 via ghcup
How is your project built (alternative: link to the project)? cabal
Which LSP client (editor/plugin) do you use? nvim_lsp
Which version of HLS do you use and how did you install it? latest master via ghcup
Have you configured HLS in any way (especially: a
hie.yaml
file)? noSteps to reproduce
Reproducer code
screenshot of the suggestions
Expected behaviour
HLS used to be able to suggest qualified imports for qualified identifiers
Actual behaviour
HLS is not able to suggest qualified imports for qualified identifiers anymore
Debug information
No idea what to include, please advise.
The text was updated successfully, but these errors were encountered: