gno icon indicating copy to clipboard operation
gno copied to clipboard

test store polluted by native object

Open ltzmaxwell opened this issue 1 year ago • 1 comments

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 avatar Jun 03 '24 15:06 ltzmaxwell

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.

ltzmaxwell avatar Jun 12 '24 09:06 ltzmaxwell

#1361

thehowl avatar Jan 23 '25 15:01 thehowl

This issue is stale because it has been open 6 months with no activity. Remove stale label or comment or this will be closed in 3 months.

github-actions[bot] avatar Aug 14 '25 02:08 github-actions[bot]

This issue was closed because it has been stalled for 3 months with no activity.

github-actions[bot] avatar Nov 13 '25 02:11 github-actions[bot]