Skip to content

Include hls ./install script when loading haskell-language-server with itself #145

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

Closed
jneira opened this issue Jun 4, 2020 · 6 comments · Fixed by #147
Closed

Include hls ./install script when loading haskell-language-server with itself #145

jneira opened this issue Jun 4, 2020 · 6 comments · Fixed by #147
Labels

Comments

@jneira
Copy link
Member

jneira commented Jun 4, 2020

  • From Failing to use haskell-language-server on itself #121
  • The install script lives under the subdirectory install and it does not belong to the main project (it is not a component or a subppackage of hls)
    • This was on purpose, to isolate it and use its own dependencies, resolver, etc
  • So if you load haskell-language-server on itself it is not able to load the install script, even if you add it in the hie.yaml
  • The workaround is open directly the install subdir in other editor window
  • @sir4ur0n suggested that it would be better to make possible open all the haskell code in the same editor "session"
    • though a change in hie-bios to make it able to load different stack (and cabal) projects with the same config
@sir4ur0n
Copy link
Collaborator

sir4ur0n commented Jun 4, 2020

Thank you for creating this dedicated issue for the ./install folder!

though a change in hie-bios to make it able to load different stack (and cabal) projects with the same config

I'm sorry, I'm not sure I understand what you mean. Is it already supported by hie-bios? Or is it a prerequisite?
If so, is there already such an issue in hie-bios repo?

@jneira
Copy link
Member Author

jneira commented Jun 4, 2020

I'm sorry, I'm not sure I understand what you mean. Is it already supported by hie-bios? Or is it a prerequisite?
If so, is there already such an issue in hie-bios repo?

It is not supported by hie-bios and it would be a prerequisite for use hls main project and install within an unique hie.yaml. I am afraid there is no issue about.

@sir4ur0n
Copy link
Collaborator

sir4ur0n commented Jun 4, 2020

Thank you!

In #147 I have marked the ./install/ directory with a none cradle, so that whoever opens the full hls project in any editor will not get any error. This is the best I could think of until hie-bios supports multi-stack project.

@sir4ur0n
Copy link
Collaborator

sir4ur0n commented Jun 4, 2020

I just opened haskell/hie-bios#191 to track this feature.

@jneira
Copy link
Member Author

jneira commented Jun 5, 2020

As @mipckering suggested we could use a ./install/hie.yaml to load them and add a specific ./install/hie.yaml.cbl and ./install/hie.yaml.stack in the repo if it works

@sir4ur0n
Copy link
Collaborator

sir4ur0n commented Jun 5, 2020

Yes that was my intention too, I'll try Matt's solution tonight and if it works, I will adapt my PR accordingly

pepeiborra pushed a commit that referenced this issue Dec 27, 2020
A while ago, `testSession` was modified to include a 0.5s wait, for
the sake of tests which were looking for a specific and complete set
of diagnostics, in order to ensure that all the incoming diagnostics
had been received before the comparison was made. This made sense at a
time when the vast majority of tests fit this pattern. Today we have
plenty of tests which have no need for this. Hence:

+ `testSession` has been renamed to `testSessionWait`

+ a new `testSession` has been added, which does not wait at all

+ all tests which use `expectDiagnostics` have been modified to use
  `testSessionWait`, all other tests use the new delayless
  `testSession`.

Locally this knocks almost 25% off the runtime of the full test
suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants