Skip to content

Commit

Permalink
fix(gnovm): remove sort from gonative packages (#2168)
Browse files Browse the repository at this point in the history
Fixes #2139.

Removing `sort` from the list of native packages allows tests to use the
full-Gno `sort` implementation, which has support for `sort.Sort` and
will not cause the panic mentioned by @leohhhn.
  • Loading branch information
thehowl committed May 23, 2024
1 parent 11e13f8 commit 16ed32f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gnovm/tests/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"os"
"path/filepath"
"reflect"
"sort"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -332,11 +331,6 @@ func TestStore(rootDir, filesPath string, stdin io.Reader, stdout, stderr io.Wri
pkg := gno.NewPackageNode("big", pkgPath, nil)
pkg.DefineGoNativeValue("NewInt", big.NewInt)
return pkg, pkg.NewPackage()
case "sort":
pkg := gno.NewPackageNode("sort", pkgPath, nil)
pkg.DefineGoNativeValue("Strings", sort.Strings)
// pkg.DefineGoNativeValue("Sort", sort.Sort)
return pkg, pkg.NewPackage()
case "flag":
pkg := gno.NewPackageNode("flag", pkgPath, nil)
pkg.DefineGoNativeType(reflect.TypeOf(flag.Flag{}))
Expand Down

0 comments on commit 16ed32f

Please sign in to comment.