Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

Avi-D-coder
Copy link
Collaborator

No description provided.

@Avi-D-coder Avi-D-coder requested review from fendor, jneira and alanz July 2, 2020 06:00
Copy link
Collaborator

@alanz alanz left a 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).

Copy link
Collaborator

@fendor fendor left a 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")
Copy link
Collaborator

@fendor fendor Jul 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Member

@jneira jneira left a 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.

@fendor
Copy link
Collaborator

fendor commented Jul 2, 2020

@jneira If it aims to land in the next release, I agree, we need this in the README.

@Avi-D-coder
Copy link
Collaborator Author

I'll take a closer look at wrapper and add to the readme tomorrow.

@jneira
Copy link
Member

jneira commented Sep 9, 2020

Not sure what left here to merge it. Improve the readme can be done in follow up.
//cc @fendor @Ailrun @pepeiborra @Avi-D-coder

Reviewing https://github.com/Avi-D-coder/implicit-hie issues and readme it seems it lacks:

@fendor
Copy link
Collaborator

fendor commented Sep 9, 2020

IIRC, nothig is lacking except a rebase and fixing CI.

@Avi-D-coder
Copy link
Collaborator Author

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?

@fendor
Copy link
Collaborator

fendor commented Sep 9, 2020

I'm not clear what needs to be done

Essentially bringing these changes up-to-date is enough.

or even if this is still useful?

Afaict, gen-hie is actively being used, which hints that it is more useful than the implicit cradle stuff from hie-bios. Thus, I think it is useful.

@jneira
Copy link
Member

jneira commented Sep 10, 2020

I am afraid this needs to be cherry-picked in ghcide Development.IDE.Session (as @pepeiborra noted in irc)
I'll do it myself if you are busy @Avi-D-coder.

@jneira jneira closed this Sep 10, 2020
@Avi-D-coder
Copy link
Collaborator Author

That would be appreciated, I wouldn't be able to get to it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants