Hello,
I spent an evening attempting to migrate my current project to use Teal. Currently it uses LuaCheck combined with EmmyLua annotations for type safety. I used an LLM to help convert existing scripts and tried to configure a fully functional development environment for writing, debugging, and deploying. Here are my findings.
-
If you use an external editor, be aware that Teal has a narrow set of tooling options. I was forced to switch from IntelliJ IDEA to Visual Studio Code.
-
I couldn’t attach
.tlfiles as Defold components directly. Instead, for each script, you must create a Proxy script that requires the compiled Teal script and returns its methods. A straightforward implementation (a simplerequireand return of all methods) is insufficient because adding new methods in the.tlfile doesn’t automatically add them to the proxy. A more robust, automated solution is required. -
Debugging did not work for me. The editor would not stop on breakpoints placed in
.tlfiles. -
Hot reloading was also broken. Upon editing and triggering a hot reload, a “successfully replaced .luac” message appeared, but no changes were reflected in the running application.
-
Configuring the environment is not straightforward. The documentation lacks many crucial details, which could be a significant barrier for many developers.
-
Visual Studio Code uses the Defold Buddy extension, which has some bugs. It corrupted my
tlconfig.lua, downloaded incorrect versions, and the LSP (Language Server Protocol) did not function correctly. -
The only existing Teal type definitions for Defold are generated by mikatuo/defold-lsp-annotations, and the latest versions (1.10.*) are broken. While Lua ignores these errors, Teal rightfully refuses to compile, forcing you to fix the definition files yourself, which can be problematic for many of us.
-
There is a noticeable compilation delay. Of course, every Teal script and its dependencies must be recompiled before the game can run.
-
I encountered several Editor crashes. I did not save the error messages from the first occurrences, and they did not reappear. Logs likely contain these errors.
After fixing all these issues and achieving a working environment, I realized the workflow was too cumbersome. I gave Teal a second chance with a different approach:
-
I disabled the Teal plugin for the project.
-
Configured manual compilation:
-
Set up incremental recompilation for the entire project using
Cyan. -
Added
*.luato.gitignore.
-
-
In this setup,
.tlfiles are only the source for generating.luafiles, which are then required by the Proxy scripts.
The results of this hybrid approach were:
-
Debugging and hot reloading worked again. Breakpoints in the generated
.luafiles functioned without issue. -
Before every run or hot reload, manually recompiling the project with Cyan was mandatory.
-
Teal strips “unnecessary” elements like comments from the source, which is confusing during debugging. The resulting Lua files contain large gaps where this content was removed, which looks strange. This is a minor issue, but not a deal-breaker.
Finally, I ultimately decided to roll back all changes. For me, Teal introduced significant overhead and degraded my development, debugging, and deployment experience.