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

Prelude.!!: index too large #327

Closed
fendor opened this issue Jun 27, 2020 · 1 comment · Fixed by #328
Closed

Prelude.!!: index too large #327

fendor opened this issue Jun 27, 2020 · 1 comment · Fixed by #328
Assignees
Labels
hie question Further information is requested

Comments

@fendor
Copy link

fendor commented Jun 27, 2020

Not sure whether this issue belongs here or to ghcide.

Stan doesnt work with HIE files generated by Haskell Language Server / ghcide.

The issue was described in reddit and the explanation of what is missing:

I think I know what happens. When contributing GHC-8.10 support in ghcide, I noticed that they create HIE files artificially and they erase source content from HIE files completely. That's why you see an error about too large index — there's simply no source code info in HIE files.

We can check indexes on our side in Stan, but you will see blank lines in report, which won't make it that useful to users.

If this is indeed what is happening, what you can do is to try to discuss this issue with the Haskell IDE engine team, reporting the bug to them. I see how this issue can break the integration of different tools and that resolving it can help different tools not to interfere with each other. I believe it's a good idea, in general, to build tooling around the same API and same expectations, otherwise we will have the broken ecosystem in area of IDE.

I confirmed in ghcide that the source bytestring is empty: https:/digital-asset/ghcide/blob/master/src/Development/IDE/Core/Compile.hs#L281 and https:/digital-asset/ghcide/blob/master/src-ghc88/Development/IDE/GHC/HieAst.hs#L94

@vrom911
Copy link
Member

vrom911 commented Jun 28, 2020

@fendor Unfortunately, we can't do anything with the fact that the generated HIE files are incomplete.
However, we can improve Stan's behaviour in this case, so the user can understand better the problem, and maybe open the follow-up issues in the responsible tools.

I have made such changes in #328, This should fix it 🙂

chshersh pushed a commit that referenced this issue Jun 28, 2020
…ailing (#328)

* [#327] Print <UNAVAILABLE> when HIE files are incomplete instead of failing

Resolves #327

* Fix HLint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hie question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants