Closed horatiohafnaugels closed 3 years ago
Thanks for the bug report. On the command line, can you try running tl types <filename>
on one of the files that are causing the error? You should see a JSON response.
Now that I think of it, the extension might have some trouble picking up the tl
executable because it assumes tl
is a .bat
script, not an .exe
: https://github.com/teal-language/vscode-teal/pull/11
Thanks for the bug report. On the command line, can you try running
tl types <filename>
on one of the files that are causing the error? You should see a JSON response.
tl types <filename>
invoked from the command line works as expected, producing the JSON response.
The issue should be fixed on latest master. I will push the fix to the marketplace as soon as tl
gets a new release.
@horatiohafnaugels @evanpaul22 I pushed a new release, does it work now?
@pdesaulniers That error went away for me!
I have a new (likely unrelated) error "[Error] Could not find the tl executable Please make sure that is available in the PATH"
This definitely seems like a me problem though; I actually have luarocks
and tl
installed on my Ubuntu WSL. Probably the answer would be to install them both outside of WSL and add tl
to the PATH like mentioned
@evanpaul22 Yeah, on Windows, the extension tries to invoke tl
using the default shell (generally cmd.exe
).
As a workaround, you could probably create a shell script called tl.bat
to serve as a bridge between cmd.exe and WSL. Something like this (disclaimer: I didn't test it!)
@echo off
wsl.exe tl %*
Then, just make sure the script is available in the PATH outside of WSL, so that the extension can detect it.
@evanpaul22 Yeah, on Windows, the extension tries to invoke
tl
using the default shell (generallycmd.exe
).As a workaround, you could probably create a shell script called
tl.bat
to serve as a bridge between cmd.exe and WSL. Something like this (disclaimer: I didn't test it!)@echo off wsl.exe tl %*
Then, just make sure the script is available in the PATH outside of WSL, so that the extension can detect it.
Clever! I'll give it a try. Thanks!
@evanpaul22 On second thoughts, you might run into some issues, considering that Windows-style paths differ from POSIX-style paths:
# POSIX
/somedir/myfile
# Win32
C:\\somedir\\myfile
tl
inside WSL might not be able to understand Windows-style paths. (Also, I don't know how require()
would behave with this setup :))
Anyway, I'm closing this issue in favor of https://github.com/teal-language/vscode-teal/issues/35.
@horatiohafnaugels @evanpaul22 I pushed a new release, does it work now?
Yes, it does. Thank you a lot!
Whenever I open or save a tl file with VS Code I get this error: [Error]
tl types
has returned an empty responseI'm using the latest precompiled binary version of tl (0.11.2+dev) on Windows 10 and the latest version of vscode-teal available on the marketplace (v0.7.4).