cyan icon indicating copy to clipboard operation
cyan copied to clipboard

cyan attempts to compile lua files as if they were teal files.

Open vlaaad opened this issue 1 year ago • 3 comments

See repro: cyan-lua-compilation-repro.zip

When I have a following file structure: Screenshot 2024-07-15 at 15 29 51 And tlconfg.lua set to:

return {
    build_dir = "build",
    include_dir = {"src"},
    source_dir = "src"
}

Then cyan build fails:

$ cyan build
     Error 2 type errors in src/test.lua
       ... src/test.lua 3:7
       ...    3 | local a
       ...      |       ^
       ...      | variable 'a' has no type or initial value
       ... 
       ... src/test.lua 4:7
       ...    4 | local b
       ...      |       ^
       ...      | variable 'b' has no type or initial value
      Info Type checked src/main.tl

It looks like cyan tries to typecheck a lua file as if it was a teal file (even though there is a corresponding .d.tl file!).

vlaaad avatar Jul 15 '24 13:07 vlaaad