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: we should not allow injecting methods on a non-exist PackageNode #1099

Open
piux2 opened this issue Sep 6, 2023 · 2 comments
Open
Assignees
Labels
🐞 bug Something isn't working

Comments

@piux2
Copy link
Contributor

piux2 commented Sep 6, 2023

          >  For instance, in the foo/bar scenario, where foo is an empty package but has a native implementation defined in imports.go, and bar is a standard package containing gno files. Previously, this would have triggered a panic on foo import due to the empty package name rather than appropriately using the native foo fallback.

The panic is expected behavior. We do not want to change it.

for foo/bar, only one package node created. pn.Name = bar pn.PkgPath = gnoland/xxx/foo/bar.
No package node is created for foo.

Try to inject native method at foo should should panic in stdlibs/stdlib.go ( for on chain ) and tests/import.go ( for off chain testing).

The native method can only be injected in a valid PackageNode.

Originally posted by @piux2 in #1076 (comment)

@Villaquiranm
Copy link
Contributor

Hello @Kouteki Is this still necessary ?
I was looking and the historic and would like to take a look but before I wanted to be sure that it is still needed thanks 👍

@Kouteki
Copy link
Contributor

Kouteki commented Nov 18, 2024

@Villaquiranm I've assigned @notJoon to work on this because he looked into it earlier and has a clear idea how to solve it.

Don't worry, there's plenty of other work for you :)

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
No open projects
Development

No branches or pull requests

6 participants