Open rjharmon opened 10 months ago
Do you have the complete output from running this program?
added in private thread
I'm unable to replicate this.
I'm using the following test:
import { Program } from "@hyperionbt/helios";
export default async function test() {
const program = Program.new(`
testing nested_modules
import { foo } from Foo
func main() -> Bool {
foo()
}
`, [
`
module Foo
import { bar } from Bar
func foo() -> Bool {
print("foo");
bar()
}
`,
`module Bar
func bar() -> Bool {
if (1 == 1) {
error("bar")
};
true
}`
]);
console.log((await program.compile(false).run([])).toString())
}
test()
The printed output is:
INFO (Foo:6:18) foo
INFO (Bar:5:22) bar
Error: thrown during UPLC evaluation
INFO (Foo:6:18) foo
ERROR (Bar:5:22) bar
TRACE (Bar:4:13)
TRACE (Foo:7:16)
TRACE (nested_modules:7:12)
script:
import {foo} from foo; ... foo()
foo:
bar:
I'm expecting all the issues in bar to be reported at sites in bar, but are reported at foo "line 42" instead. Nothing catastrophic, but for good modularity support...