kadena-io / pact

The Pact Smart Contract Language
https://docs.kadena.io/build/pact
BSD 3-Clause "New" or "Revised" License
581 stars 100 forks source link

load with reset works in REPL but not in REPL files #722

Open arjunbaokar opened 4 years ago

arjunbaokar commented 4 years ago

The load function with the reset parameter works as intended when run in repl directly, but fails to find files if run in a repl file. This could be because it resets repl state?

Minimal Example:

fileANoReset.repl

(load "./fileB.repl")

fileAReset.repl

(load "./fileB.repl" true)

fileB.repl

(+ 1 1)
pact> (load "./fileANoReset.repl")
"Loading ./fileANoReset.repl..."
"Loading ./fileB.repl..."
2
pact> (load "./fileAReset.repl")
"Loading ./fileAReset.repl..."
"Loading ./fileB.repl..."
load: file load failed: ./fileB.repl, ./fileB.repl: openBinaryFile: does not exist (No such file or directory)
emilypi commented 4 years ago

Thanks Arjun, i'll look into this