-
-
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
Stan integration #258 #2908
Stan integration #258 #2908
Conversation
57fa2d1
to
45df923
Compare
] | ||
++ map (" - " <>) (inspectionSolution inspection) | ||
|
||
getHieFile :: NormalizedFilePath -> Action (Maybe HieFile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something we should provide alongside the other HIE stuff? WDYT @wz1000 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least this needs some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelpj For me this function signature looks pretty self-explanatory. What else could be said about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a list of questions that I have about this function after reading it:
- Why isn't this function provided with the other HIE file functions we have? Is it doing something suspicious? Is there a reason we don't want to provide HIE files? Is it working against the direction of travel with hiedb?
- How does it work? Are we sure we're constructing HIE files correctly? Can the information we get from the rules be inconsistent with what's coming from hiedb?
I'm sure you thought about a bunch of these things when you were writing it, but all that knowledge is going to be lost unless it gets written down! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was written by @pepeiborra , so I do not know the answers #258 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we have code to create HieFile in Core.Rules and/or Core.Compile
It would be nice to merge it with getHieFile in order to ensure that it stays working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean creating separate rule for HieFile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just abstracting and reusing the same code everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pepeiborra I do not know which code should be abstracted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough
I do not understand why CI fails. Plugin is disabled for GHC < 9, but Cabal build still fails: https://github.com/haskell/haskell-language-server/pull/2908/files#diff-aaf5dad5ddf1d2c16a2e8034c6435719f6eb3327cfe1bcd042df5a84b939afe3R282 |
@pepeiborra changed how you have a plugin that's only enabled on some versions recently. I'm not sure what the right way is off the top of my head (@pepeiborra if you write something here I'll add it to the contributing docs). |
You need to set the haskell-language-server/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal Lines 20 to 24 in 8cbefb7
|
3c812d7
to
f8a592a
Compare
49cc3e2
to
3baa6e9
Compare
Can we have a document as #2066 mentioned? |
Marked as draft, to squash comits before merging. |
I tried to use plugin, but it does not show anything to me. Does something in VS Code Haskell need to be tweaked for this to work? |
Not at all. I am in my phone right now, but if the test suite passes you should see the diagnostics in VSCode already. |
I'm not sure that's true. I think all plugins automatically get a "globalOn" option that needs to be set to enable them. I'm not sure if there's a way to turn it on by default when testing (@berberman ?). For vscode, we have an ongoing issue that nobody seems to be sure what the deal is with options in the vscode extension (see #2827). It would be great if someone could find out and help us document it. |
Agree this. Noticed you are using hint severity,it may not showy as you expected in vscode. |
If you don't specify haskell-language-server/hls-plugin-api/src/Ide/Plugin/Config.hs Lines 116 to 118 in 310e6a4
So no worries about
Yes, I can write a documentation for that later. |
is this still in progress or ready for review? |
@pepeiborra Marked as ready to review. |
@uhbif19 there are stack build failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but it would be nice to make the suggested refactoring
] | ||
++ map (" - " <>) (inspectionSolution inspection) | ||
|
||
getHieFile :: NormalizedFilePath -> Action (Maybe HieFile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, perhaps move this function to the ghcide package and refactor other pieces of similar code around the Core/Compile.hs and Core/Rules.hs modules.
Did you have a chance to look into this refactoring?
@michaelpj CircleCI stuck again. |
#258