-
Notifications
You must be signed in to change notification settings - Fork 423
Open
Labels
📦 ⛰️ gno.landIssues or PRs gno.land package relatedIssues or PRs gno.land package related❓ questionQuestions about GnoQuestions about Gno
Description
Description
A while back I noticed we can self import a pkg in _test.gno files. For example this is a totally valid gno test file.
avl_test.gno
:
package avl // import path `gno.land/p/demo/avl`
import (
"testing"
"gno.land/p/demo/avl" // importing itself
)
func TestXXX(t *testing.T) {
t := avl.Tree{}
_ = t
}
I'm aware that we never run _test.gno
files on chain. But since we publish them on chain and are a part of pkg/realm. We should validate them before publishing and disallow self import to keep the behaviour consistent with Go.
--
PR #1206 highlights/removes all the instances of import cycles in _test.gno
files.
zivkovicmilos
Metadata
Metadata
Assignees
Labels
📦 ⛰️ gno.landIssues or PRs gno.land package relatedIssues or PRs gno.land package related❓ questionQuestions about GnoQuestions about Gno