You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now the vscode-teal plugin will run tl command in the root of the workspace, so tl will use tlconfig.lua in this dir, it's ok if the workspace only contains one teal project, you can add the source dir to tlconfig.lua like project_name/src/.
However, sometimes we need to develop some independent projects in one workspace, so the include_dir may conflict if different projects contains the same file name. Demo: https://github.com/virusdefender/tlproject
If you want to edit project2/main.tl, you need to change include_dir to project2, if you want to edit project1/main.tl, you need to change include_dir to project1, or wrong functions.tl will be loaded, it's very inconvenient.
If tlconfig.luacan be found in the parent directories of the source file, the extension will run tl with cwd = <directory of the nearest tlconfig.lua file>.
Otherwise, the extension will run tl at the root of the workspace.
Now the vscode-teal plugin will run
tl
command in the root of the workspace, so tl will usetlconfig.lua
in this dir, it's ok if the workspace only contains one teal project, you can add the source dir totlconfig.lua
likeproject_name/src/
.However, sometimes we need to develop some independent projects in one workspace, so the
include_dir
may conflict if different projects contains the same file name. Demo: https://github.com/virusdefender/tlprojectIf you want to edit
project2/main.tl
, you need to changeinclude_dir
toproject2
, if you want to editproject1/main.tl
, you need to changeinclude_dir
toproject1
, or wrongfunctions.tl
will be loaded, it's very inconvenient.It seems
tl
supports searchingtlconfig.lua
outside current dir (https://github.com/teal-language/tl/blob/15bb48baa3a1055e6ae664ccb530665b49c7e02c/tl#L892), if vscode-teal run tl command withcwd = dirname(file_to_check_or_get_types)
,tl
will usetlconfig.lua
in the root of project instead of the root worksapce, so the problem in demo project can be avoided.The text was updated successfully, but these errors were encountered: