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

Contents are null #31

Closed
cocreature opened this issue Jul 19, 2015 · 10 comments
Closed

Contents are null #31

cocreature opened this issue Jul 19, 2015 · 10 comments

Comments

@cocreature
Copy link
Contributor

For some reason I can't seem to get stack ide working on some repositories. E.g. take the cabal repo which has a stack.yaml file. However if I try to run stack ide cabal-install I get the message:

{"tag":"ResponseWelcome","contents":[0,1,0]}
{"tag":"ResponseUpdateSession","contents":null}

After that nothing happens and stack ide just stays silent and keeps running. I have run stack build before and that works just fine.

This happens on some repositories but other repositories like the stack-ide repo itself work just fine. So far I couldn't find a pattern.

@rvion
Copy link

rvion commented Jul 19, 2015

Same for me: in most repositories, stack ide only print

{"tag":"ResponseWelcome","contents":[0,1,0]}
{"tag":"ResponseUpdateSession","contents":null}

then remains silent.
For some other repo like the stack-ide one, it works

$ stack --version
Version 0.1.1.0, Git revision 112e8c281d73fb3b34a00073b9150c239172ce15

On a macbook air

@CRogers
Copy link
Contributor

CRogers commented Jul 19, 2015

I'm also seeing this. I've never got anything other than null.

On Sun, 19 Jul 2015 09:33 Rémi Vion [email protected] wrote:

Same for me: most repository do not work, but some does like the stack-ide
one


Reply to this email directly or view it on GitHub
#31 (comment)
.

@lukexi
Copy link
Contributor

lukexi commented Jul 19, 2015

Hi guys! This was a problem with ide-backend (fpco/ide-backend#289, where you'd need to have the internal ide-backend-rts package available in each project's package database for ide-backend to work correctly).

That's been fixed now — can you try again with the newest (i.e. from git — I don't think all the releases have been made yet) stack, ide-backend and stack-ide? Basically following the installation instructions from https://github.com/commercialhaskell/stack-ide/blob/master/README.md

@cocreature
Copy link
Contributor Author

@lukexi Sorry I forgot to mention it, but I am already using it. Still it doesn't always work. stack ide cabal-install still doesn't do anything. Interestingly stack ide Cabal works. I also have some other projects that don't work, but they are not yet online so I can't link to them.

Edit: Other examples that don't work are

  • stack ide ide-backend
  • stack ide ide-backend-common
  • stack ide ide-backend-server
    Obiously I ran all of those from the root directory of the ide-backend repo.

@rvion
Copy link

rvion commented Jul 20, 2015

same for me, I was using git versions from yesterday for both stack and stack ide

@cocreature
Copy link
Contributor Author

@rvion You also need to have the git version of ide-backend.

@rvion
Copy link

rvion commented Jul 20, 2015

I now do but:

➜  ide-backend git:(master) $ stack ide ide-backend
{"tag":"ResponseWelcome","contents":[0,1,0]}
{"tag":"ResponseUpdateSession","contents":null}

or

➜  test22  $ stack ide test22
{"tag":"ResponseWelcome","contents":[0,1,0]}
{"tag":"ResponseUpdateSession","contents":null}

@lukexi
Copy link
Contributor

lukexi commented Jul 20, 2015

(see my reply to @rvion's newer "not enough bytes" issue #33 if you are having that problem)

I can confirm that stack ide ide-backend doesn't work here either...

Aha, this should help. Try pasting this into the terminal window after running stack ide <someproject>:

{"tag":"RequestGetSourceErrors","contents":[]}

That should force a more descriptive error.

@cocreature
Copy link
Contributor Author

Allright, the problem is not using stackage nightly because old ghcs/cabals need to be patched. Once I switched my projects to nightly everything works. cabal-install is an exception, but that seems to do some very weird stuff that seems to be unrelated. Thanks for your help @lukexi

@mgsloan
Copy link
Contributor

mgsloan commented Jul 20, 2015

While stack ide not working on some projects is definitely a bug, right now the {"tag":"ResponseUpdateSession","contents":null} is expected - see commercialhaskell/stack#640

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

No branches or pull requests

5 participants