teal-language / tl

The compiler for Teal, a typed dialect of Lua
MIT License
2.1k stars 108 forks source link

canonicalize pathnames to improve behavior of env.loaded #538

Closed hishamhm closed 2 years ago

hishamhm commented 2 years ago

This does not go as far as converting pathnames to absolute as that would require going beyond pure-Lua, but it does improve the situation. In particular, it should allow type-checking the global_env_def file from the current folder without a confusion between "file.d.tl" and "./file.d.tl".

Fixes #518 (unless relative and absolute paths are mixed, but it's an incremental improvement)

github-actions[bot] commented 2 years ago

Teal Playground URL: https://538--teal-playground-preview.netlify.app

hishamhm commented 2 years ago

Closed in favor of #540