-
-
Notifications
You must be signed in to change notification settings - Fork 669
Closed
Labels
Description
In #1786, y’all kindly added a new transform
options to the cli’s main()
because of our discussion in torch2424/as-bind#75. However, I didn’t realize that the new code path doesn’t actually instantiate the transform or fixes up the prototype.
Transforms passed via --transform
get this code path:
Lines 519 to 529 in 7d0690d
Object.assign(classOrModule.prototype, { | |
program, | |
baseDir, | |
stdout, | |
stderr, | |
log: console.error, | |
readFile, | |
writeFile, | |
listFiles | |
}); | |
transforms.push(new classOrModule()); |
while the new main()
parameter gets:
Line 505 in 7d0690d
transforms.push(...options.transforms); |
I think it’d be great if both ways to pass in transforms get the same fix-ups applied.