documenting a bug i've experienced using seal compile on a darklua-bundled project
this doesn't affect me that much, but i do have a wip project i'm working on slowly that is affected by this
- i require something (it might not be std-specific, i haven't looked into it that far) in two different files
- when using
seal runorseal build/init.luauit works fine, with both fs a and b being correct - however, running the executable directly (via
seal scripts/build.luauand repro.exe) results inabeing nil whilebstill exists - it should output
fs a: table: <blablabla>andfs b: table: <blablabla> - instead, it outputs
fs a: nilandfs b: table: <blablabla>
- seal 0.0.6 and 0.0.7, both with the same results
- darklua 0.17.3
- rokit 1.2.0
- os: windows 10 home 22H2 (19045.6466, i think?)
- i've tried with both powershell 7 and command prompt, both with the same results
added this for convenience
local a = { cache = {} :: any }
do
do
local function __modImpl()
local b = require("@std/fs")
print(`fs b: {b}`)
return nil
end
function a.a(): typeof(__modImpl())
local b = a.cache.a
if not b then
b = { c = __modImpl() }
a.cache.a = b
end
return b.c
end
end
end
local b = require("@std/fs")
print(`fs a: {b}`)
a.a()