Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gno run should have an ExecContext #2834

Closed
thehowl opened this issue Sep 23, 2024 · 1 comment · Fixed by #2856
Closed

gno run should have an ExecContext #2834

thehowl opened this issue Sep 23, 2024 · 1 comment · Fixed by #2856

Comments

@thehowl
Copy link
Member

thehowl commented Sep 23, 2024

similar to testing exec context, to support functions like std.GetHeight(). It currently doesn't:

gno/gnovm/cmd/gno/run.go

Lines 115 to 121 in 9897b66

m := gno.NewMachineWithOptions(gno.MachineOptions{
PkgPath: string(files[0].PkgName),
Input: stdin,
Output: stdout,
Store: testStore,
Debug: cfg.debug || cfg.debugAddr != "",
})

cc @wyhaines

@wyhaines
Copy link
Contributor

So....I have a branch that implements this. It is based on how it works for the 'test' command. I'll clean it up a bit and provide a PR.

wyhaines added a commit to wyhaines/gno that referenced this issue Sep 26, 2024
This addresses this issue: gnolang#2834
It tries to hew very closely to how the context is created under `gno test` so that there is consistency of results between code that is executed in the test and run contexts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants