Support PackageImports in hiddenPackageSuggestion#4537
Conversation
48e4cc5 to
39d3f61
Compare
jian-lin
left a comment
There was a problem hiding this comment.
I think I have addressed all previous comments. Please take another look.
fendor
left a comment
There was a problem hiding this comment.
LGTM, thank you for your contribution ❤️
|
Thanks for your review! I had a great experience in my first HLS PR. |
There was a problem hiding this comment.
I also notice that the "not found" error remains even after the dependency is added by the code action (with and without PackageImports). That may be a bug of my lsp client (eglot on Emacs) or HLS. Needs further investigation.
Oh, it is indeed a known HLS bug. With HLS 2.10.0.0 and vscode 2.5.3, I need to manually restart HLS or saving hie.yaml after adding dependencies to .cabal file to let HLS find the newly added dependencies.
In addition, there seems to be a bug in my preferred setting: Emacs with eglot as a LSP client. In that setting, only manual restart works and saving hie.yaml has no effect.
|
@jian-lin It looks like you need to rebase your PR or merge changes from master into it before we can merge :) |
39d3f61 to
4efa5d7
Compare
|
@fendor Rebased. |
Fix: #4479
TODO: Probably I need to add more tests.
CC @VeryMilkyJoe @fendor
Video demo
hls-4479-demo.mp4
More info
Here is the string being matched.
With
PackageImportsWithout
PackageImportsI also notice that the "not found" error remains even after the dependency is added by the code action (with and without
PackageImports). That may be a bug of my lsp client (egloton Emacs) or HLS. Needs further investigation.