In 2.1 a required lua file only runs once, which means these all return the same instance:
require("thing")
require("__modname__.thing")
require("__modname__/thing")
However, relative paths are each seen as unique:
require("__modname__/./thing")
require("__modname__/././thing")
require("__modname__/./././thing")
The expected behavior is that the path gets resolved to an absolute path first. (which also gets used when logging from within that file, vs it also being relative)
[2.1.9] requiring a relative lua path does not cache the file
Re: [2.1.9] requiring a relative lua path does not cache the file
Thanks for the report. As a simplification these types of paths will simply be disallowed for the next release. As far as I know there is no legitimate reason to ever use them.
If you want to get ahold of me I'm almost always on Discord.

