lang: Use the source finder wherever we can

This was easy to add and it works great!
This commit is contained in:
James Shubin
2025-06-06 00:33:39 -04:00
parent 573bd283cd
commit 4f977dbe57

View File

@@ -189,9 +189,9 @@ func (obj *Lang) Init(ctx context.Context) error {
LexParser: parser.LexParse, LexParser: parser.LexParse,
Downloader: nil, // XXX: is this used here? Downloader: nil, // XXX: is this used here?
StrInterpolater: interpolate.StrInterpolate, StrInterpolater: interpolate.StrInterpolate,
SourceFinder: func(string) ([]byte, error) { SourceFinder: func(p string) ([]byte, error) {
// We're running a bundle as part of a deploy. // We're running a bundle as part of a deploy.
return nil, fmt.Errorf("not implemented") // XXX: read from the fs? return output.FS.ReadFile(p)
}, },
//Local: obj.Local, // TODO: do we need this? //Local: obj.Local, // TODO: do we need this?
//World: obj.World, // TODO: do we need this? //World: obj.World, // TODO: do we need this?