teal-language/tl

`tl check` does not add source_dir to include_dir in tlconfig.lua

Geschlossen

#1.119 geöffnet am 13.05.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Lua (156 Forks)batch import
buggood first issue

Repository-Metriken

Stars
 (2.794 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 6h) (1 gemergte PR in 30 T)

Beschreibung

I must note that this is only a bug on tl check. cyan build works perfectly fine with this setup.

-- src/vec.tl
local record Vec
  x: number
  y: number
end

return function(x, y): Vec
  return {x=x, y=y} as Vec
end
-- src/field.tl
local vec = require "vec"
--                  ^ module not found: 'vec'
-- tlconfig.lua
return {
  include_dir = {"include"}, -- Can't remove, I'm using an external library
  source_dir = "src",
  build_dir = "build"
}

If I replace the require "vec" with a require "src.vec", the error goes away in the editor, but the build starts to fail.

The temporary fix I attempted (adding "src" to include_dir manually) resulted in a warning.

Contributor Guide