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

test store polluted by native object #2268

Open
ltzmaxwell opened this issue Jun 3, 2024 · 1 comment
Open

test store polluted by native object #2268

ltzmaxwell opened this issue Jun 3, 2024 · 1 comment
Labels
🐞 bug Something isn't working 🌟 must have 🌟 Mandatory work needed to complete a project 📦 🤖 gnovm Issues or PRs gnovm related

Comments

@ltzmaxwell
Copy link
Contributor

ltzmaxwell commented Jun 3, 2024

this happens when testing this file.
it imports gno.land/p/demo/testutils, and then import std, cause an error(pre-configured manually) on math/overflow package which is not imported and used.

package main

import (
	"gno.land/p/demo/testutils"
)

func main() {
	println(testutils.TestVar1)
}

// Output:
// 123
@ltzmaxwell ltzmaxwell changed the title Unnecessary check for unused import paths unnecessary check for unused import paths Jun 3, 2024
@Kouteki Kouteki added 🐞 bug Something isn't working 📦 🤖 gnovm Issues or PRs gnovm related labels Jun 7, 2024
@ltzmaxwell ltzmaxwell changed the title unnecessary check for unused import paths test store polluted by native object Jun 12, 2024
@ltzmaxwell
Copy link
Contributor Author

ltzmaxwell commented Jun 12, 2024

the cause for this is when conducting test with native_libs, stdlibs are loaded as well. this. The test store is kinda polluted that std libs will reference the corresponding native object which was injected priorly to the test store . in some edge cases, cause a type mismatch.

@zivkovicmilos zivkovicmilos added the 🌟 must have 🌟 Mandatory work needed to complete a project label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🌟 must have 🌟 Mandatory work needed to complete a project 📦 🤖 gnovm Issues or PRs gnovm related
Development

No branches or pull requests

3 participants