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

gnomod bug demo #18

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

gnomod bug demo #18

wants to merge 2 commits into from

Conversation

moul
Copy link
Member

@moul moul commented Jul 23, 2023

DO NOT MERGE

It appears that the code is functioning correctly without any imports. However, when trying to import the current directory, as defined in the gno.mod file, the following error is encountered:

❯ go run github.com/gnolang/gno/gnovm/cmd/gno test .
panic: fail on queue_filetest.gno: got unexpected error: main/queue_filetest.gno:1: unknown import path gno.land/r/demo/getting_started/003_debug_gno_code

goroutine 1 [running]:
github.com/gnolang/gno/gnovm/tests.RunFileTest({0x140000420c0, 0x50}, {0x140001bc450, 0x12}, {0x1400045b9b0, 0x1, 0x0?})
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/gnovm/tests/file.go:286 +0x984
main.gnoTestPkg({0x140003945b9, 0x3}, {0x1400018bf90?, 0x1, 0x10284574d?}, {0x1400018bfb0, 0x1, 0x0?}, 0x140001a2c00, 0x14000114230)
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/gnovm/cmd/gno/test.go:326 +0x5a4
main.execTest(0x140001a2c00, {0x1400018be90, 0x1, 0x1}, 0x0?)
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/gnovm/cmd/gno/test.go:205 +0x7f0
main.newTestCmd.func1({0x0?, 0x0?}, {0x1400018be90?, 0x14000110a38?, 0x0?})
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/gnovm/cmd/gno/test.go:48 +0x38
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x0?, {0x102c104f8?, 0x14000192000?})
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/tm2/pkg/commands/command.go:233 +0x17c
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x140001106e0?, {0x102c104f8?, 0x14000192000?})
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/tm2/pkg/commands/command.go:237 +0x12c
github.com/gnolang/gno/tm2/pkg/commands.(*Command).ParseAndRun(0x14000180000?, {0x102c104f8, 0x14000192000}, {0x1400018e190?, 0x60?, 0x0?})
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/tm2/pkg/commands/command.go:118 +0x4c
main.main()
        /Users/moul/go/pkg/mod/github.com/gnolang/[email protected]/gnovm/cmd/gno/main.go:14 +0x74
exit status 2

It seems that the import path gno.land/r/demo/getting_started/003_debug_gno_code is not recognized.

Please check the import statement and the gno.mod file to ensure that the import path is correctly defined and points to the appropriate location. If the issue persists, further investigation might be needed to identify the root cause of the error.

@moul moul self-assigned this Jul 23, 2023
@moul-bot moul-bot force-pushed the dev/moul/gnomod-bug branch from cae39fd to e420b0f Compare July 23, 2023 12:32
Signed-off-by: Manfred Touron <[email protected]>
@moul-bot moul-bot force-pushed the dev/moul/gnomod-bug branch from e420b0f to 18f0717 Compare July 23, 2023 12:43
@moul moul changed the title dev/moul/gnomod bug gnomod bug demo Jul 23, 2023
Signed-off-by: Manfred Touron <[email protected]>
@harry-hov
Copy link

Sorry. I don't have much context about this repository.

But seems like it's the problem with gno test. It's not related to gnomod in any way.
Few things to remember:

  • gno test does not respect gno.mod file
  • gno test does not work if package is not part of official gno repository

@moul
Copy link
Member Author

moul commented Jul 23, 2023

Yes, that's precisely why we'll keep this pull request open – as a reminder to address it in the future.

We'd greatly appreciate your assistance in linking related pull requests. I believe you have two that align with this direction.

@harry-hov
Copy link

harry-hov commented Jul 23, 2023

Yeah. I have opened few PRs in this direction

PRs not directly related to this issue but enhances gno.mod experience and make it more inclusive:

@moul moul unassigned moul and thehowl Jul 28, 2023
@moul moul added the bug Something isn't working label Jul 28, 2023
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: 🙏🏻 To Delegate
Development

Successfully merging this pull request may close these issues.

3 participants