commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

Provide an example on how to use the application #8

Closed arybczak closed 9 years ago

arybczak commented 9 years ago

Hey,

I installed ide-backend-client, ide-backend and ide-backend-server, but when I try to run ide-backend-client from its root git repository, I get this:

unknown@localhost ide-backend-client $ ./ide-backend-client cabal .
{"response":"welcome","version":{"minor":1,"major":0,"patch":0}}
ide-backend-client: internal error: there is no configuration data for component CLibName
chrisdone commented 9 years ago

I don't know what that error is, I'll get back to you tomorrow.

arybczak commented 9 years ago

FYI, empty session starts fine, it's just the cabal one that fails.

tobiasgwaaler commented 9 years ago

Yes, I have the same issue. By building an image from the following Dockerfile you can reproduce it:

FROM haskell:7.10

RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/chrisdone/ide-backend-client.git

RUN cabal update
RUN cd ide-backend-client && cabal install
RUN cabal install ide-backend ide-backend-server ide-backend-rts

ENTRYPOINT ["/bin/bash"]

inside the container you can run ./ide-backend-client/dist/build/ide-backend-client/ide-backend-client cabal /ide-backend-client/ to start ide-backend-client (with itself as the target)

tobiasgwaaler commented 9 years ago

If the cabal version is relevant, this is the output from cabal --version

cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library
Codas commented 9 years ago

for the cabal command, the target command line option is more or less mandatory at the moment.

ide-backend-client cabal --target ide-backend-client .

should do the trick.

tobiasgwaaler commented 9 years ago

Thanks, @Codas, that worked

lukexi commented 9 years ago

@arybczak are you still having this issue with stack-ide (with the instructions in the README) or is it safe to close this?

arybczak commented 9 years ago

Explicitly providing the target indeed does solve the problem, thanks!