-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Implicit hie cradle #186
Implicit hie cradle #186
Conversation
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 am happy for this to go in once @fendor is happy too (and it passes CI).
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.
The code in hls-wrapper: https://github.com/haskell/haskell-language-server/blob/master/exe/Wrapper.hs#L68
needs to be modified as well, otherwise we still use c-h
exe/Wrapper.hs
Outdated
@@ -65,7 +66,7 @@ main = do | |||
logm $ "args:" ++ show args | |||
|
|||
-- Get the cabal directory from the cradle | |||
cradle <- findLocalCradle (d </> "File.hs") | |||
cradle <- loadImplicitHieCradle (d </> "File.hs") |
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.
cradle <- loadImplicitHieCradle (d </> "File.hs") | |
hieYaml <- findCradle (d </> "File.hs") | |
cradle <- maybe (loadImplicitHieCradle $ addTrailingPathSeparator d) loadCradle hieYaml |
something like that, otherwise we are not using any existing hie.yaml
definitions, right?
Then the behaviour would be different to the loading logic in Main.hs
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'll take your word for it I am not familiar with the wrapper code, since I don't use wrapper.
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.
@fendor Are we still planing on using cabal-helper in wrapper or should I just tear it out.
What is it doing for us in wrapper?
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.
It is not used anymore, afaict. You already teared it out :)
It is doing the same thing as before, we are trying to find a cradle and based on that cradle we try to find the ghc version. If we find an ghc version, try to launch the correct hls version.
Co-authored-by: fendor <[email protected]>
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.
From the original pr:
However i think that it would need a specific section in the readme, specifying in which known cases the implicit config will not work for sure.
Or a link to implicit-hie doc listing them.
It could be done in a follow up, though.
@jneira If it aims to land in the next release, I agree, we need this in the README. |
I'll take a closer look at wrapper and add to the readme tomorrow. |
Not sure what left here to merge it. Improve the readme can be done in follow up. Reviewing https://github.com/Avi-D-coder/implicit-hie issues and readme it seems it lacks:
|
IIRC, nothig is lacking except a rebase and fixing CI. |
Sorry, I have not had time to work on this. I'm not clear what needs to be done, or even if this is still useful? |
Essentially bringing these changes up-to-date is enough.
Afaict, |
I am afraid this needs to be cherry-picked in ghcide |
That would be appreciated, I wouldn't be able to get to it this week. |
No description provided.