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

issue: gnovm/cmd/TestGnoDoc failed with incompatible gno packages from the earlier build #1142

Open
piux2 opened this issue Sep 18, 2023 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@piux2
Copy link
Contributor

piux2 commented Sep 18, 2023

Description

go test ./cmd/...

       --- FAIL: TestGnoDoc (0.05s)
          --- FAIL: TestGnoDoc/doc_avl (0.01s)
              main_test.go:143: stdout package avl // import "gno.land/p/demo/avl"
      
                  type MutTree struct{ ... }
                      func NewMutTree() *MutTree
                  type Tree struct{ ... }
                      func NewTree(key string, value interface{}) *Tree
      
              main_test.go:143:
        	          Error Trace:	/Users/b/dev/gnofix/gno/gnovm/cmd/gno/main_test.go:71
        	            				          /Users/b/dev/gnofix/gno/gnovm/cmd/gno/main_test.go:143
        	          Error:      	"package avl // import \"gno.land/p/demo/avl\"\n\ntype MutTree struct{ ... }\n    func NewMutTree() *MutTree\ntype Tree struct{ ... }\n    func NewTree(key string, value interface{}) *Tree\n" does not contain "func NewNode"
        	          Test:       	TestGnoDoc/doc_avl
        	          Messages:   	stdout should contain
@piux2 piux2 changed the title gnovm/cmd/TestGnoDoc failed in CI. issue: gnovm/cmd/TestGnoDoc failed in CI. Sep 18, 2023
@thehowl
Copy link
Member

thehowl commented Sep 18, 2023

master seems to be succeeding normally. try cloning gno in a clean directory and running the test again there.

is your directory examples/gno.land/p/demo/avl dirty?

@moul moul moved this to 🚀 Needed for Launch in 🚀 The Launch [DEPRECATED] Sep 18, 2023
@moul moul added the 🐞 bug Something isn't working label Sep 18, 2023
@moul moul added this to the 🚀 main.gno.land (required) milestone Sep 18, 2023
@piux2 piux2 changed the title issue: gnovm/cmd/TestGnoDoc failed in CI. issue: gnovm/cmd/TestGnoDoc failed with incompatible gno packages. Sep 18, 2023
@piux2
Copy link
Contributor Author

piux2 commented Sep 18, 2023

master seems to be succeeding normally. try cloning gno in a clean directory and running the test again there.

is your directory examples/gno.land/p/demo/avl dirty?

thank you @thehowl for the help. here is the update.

I cloned a fresh local copy and run following command.

cd gnovm
make _test.cmd

or run test directly
go test ./cmd/gno -run '^TestGnoDoc$'

the error still exists.

it turns out, I had an old version of avl package here from an early build. The old avl does not have NewNode() and the test pick it up.
~/.gno/pkg/mod/gno.land/p/demo/avl

This does not happen in CI on github.

I removed ~/.gno/pkg, the test passed.

I have updated the name to reflect the new findings.

@piux2 piux2 changed the title issue: gnovm/cmd/TestGnoDoc failed with incompatible gno packages. issue: gnovm/cmd/TestGnoDoc failed with incompatible gno packages from the earlier build Sep 18, 2023
@thehowl
Copy link
Member

thehowl commented Sep 19, 2023

maybe we could apply a fix to make it so that root dir for gnovm tests is always the project's git root.

I'd say either (a) close this, and open new issue to do that or (b) repurpose this issue and change the title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
Status: 🚀 Needed for Launch
Development

Successfully merging a pull request may close this issue.

4 participants