tilt-dev / vscode-tilt

Visual Studio Code extension with Tiltfile syntax highlighting & autocomplete
Apache License 2.0
11 stars 1 forks source link

`tiltfile.tilt.path` doesn't work as expected #51

Open alexgorbatchev opened 2 months ago

alexgorbatchev commented 2 months ago

in my .vscode/settings.json:

{
  "tiltfile.tilt.path": "bin/.bin/tilt",
}

in terminal project root

~/development/project $ bin/.bin/tilt version
v0.33.20, built 2024-09-03

~/development/project $ curl -I http://localhost:10350
HTTP/1.1 200 OK
Content-Length: 743
Content-Type: text/html; charset=utf-8
Set-Cookie: Tilt-Token=78a28fd2-ad3f-4c61-a225-c7133b4e468c; Path=/
Date: Thu, 26 Sep 2024 16:17:03 GMT

VSCode output panel:

[Info  - 9:12:49 AM] Tiltfile LSP started
tilt session watch errored: Error: spawn tilt ENOENT
[Error - 9:12:49 AM] bin/.bin/tilt: Error: spawn ./bin/.bin/tilt ENOENT
[Warn  - 9:12:49 AM] Could not find a version of Tilt to use with the Tiltfile extension. Please visit https://docs.tilt.dev/install.html to install Tilt v0.26 or higher. Autocomplete will not function without a compatible version of Tilt installed.
[Error - 9:12:49 AM] Starting client failed
Error: Tilt not found
tilt session watch exited w/ code -2
tilt session watch errored: Error: spawn tilt ENOENT
...

I was only able to bypass this error by specifying absolute path to tilt. This is not expected behaviour for the settings.json file, it should be able to work with paths relative to workspaceFolder.

Am I doing something wrong here?

nicksieger commented 2 months ago

I think this is probably a bug. The extension doesn't try to resolve the setting relative to the project. The code is here, would you be able to clone the code locally and try a suitable detection mechanism?

alexgorbatchev commented 2 months ago

I can probably figure out how to run it locally, yes :)