Open mvilera opened 4 years ago
The only thing that i notice is that the request sends the filepath on the WSL environment, and on Docker it has another path for the same file, perhaps the solargraph data library can't find a match due to that.
I think your diagnostic is correct. A workaround (no idea how limited it is, I think @castwide can shed some light here) is to create a symlink inside your container /home/mvilera/...
-> /home/app-user
. The idea is solargraph will be receiving queries saying "the file is /home/mvilera/...", which it can't find normally but, because of the link, it will.
@castwide Do you see a way this workaround would fail? If not, maybe we could include some config:
...
solargraph.dir: "/home/something/in/container"
...
defaulting to $(dirname pwd)
, and then, inside solargraph, interpret queries with file:/path/to/app/some/file
as $(solargraph.dir)/some/file
? Would that make sense?
My workaround was something like this:
solargraph:
image: ruby:2.7.5-slim-buster
command: solargraph socket --host=0.0.0.0 --port=7658
working_dir: $PWD
volumes:
- .:$PWD:cached,rw
ports:
- 7658:7658
This would map the local folder using its full name.
Hey there,
I'm developing a small Rails based API, current development environment consist on Windows 10, with Ubuntu 18.04 over WSL2, calling VSCode from inside the ubuntu shell, using the VSCode - Remote WSL extension.
I had this plugin working as intended for a couple days by setting up Solargraph settings to use an external transport and properly setting the solar daemon on a side docker service through docker-compose.
The problem is that it suddenly stop working, VSCode connects to solargraph daemon without problems, performs all the queries that it should do, Solargraph itselfs builds all the files and docs that it needs, but it's not returning any results when being consulted.
I have rebuilt everything, deleted .solargraph and .yard folders, reinstalled plugins and vscode, the only difference i can think of was that when it was working i had the 0.38.0 version, and updated to 0.38.2 yesterday.
This is the output of the solargraph service:
And this is my docker-compose:
The only thing that i notice is that the request sends the filepath on the WSL environment, and on Docker it has another path for the same file, perhaps the solargraph data library can't find a match due to that.