Skip to content

Commit

Permalink
chore: Merge remote-tracking branch 'origin/master' into forbid-impor…
Browse files Browse the repository at this point in the history
…t-cycle
  • Loading branch information
n0izn0iz committed Jan 20, 2025
2 parents 784d508 + 8702da9 commit ebc87af
Show file tree
Hide file tree
Showing 46 changed files with 926 additions and 88 deletions.
24 changes: 0 additions & 24 deletions contribs/gnohealth/health.go

This file was deleted.

2 changes: 1 addition & 1 deletion contribs/gnohealth/internal/timestamp/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewTimestampCmd(io commands.IO) *commands.Command {
return commands.NewCommand(
commands.Metadata{
Name: "timestamp",
ShortUsage: "[flags]",
ShortUsage: "timestamp [flags]",
ShortHelp: "check if block timestamps are drifting",
LongHelp: "This command checks if block timestamps are drifting on a blockchain by connecting to a specified node via RPC.",
},
Expand Down
15 changes: 14 additions & 1 deletion contribs/gnohealth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ import (
"context"
"os"

"github.com/gnolang/gno/contribs/gnohealth/internal/timestamp"
"github.com/gnolang/gno/tm2/pkg/commands"
)

func main() {
cmd := newHealthCmd(commands.NewDefaultIO())
cmd := commands.NewCommand(
commands.Metadata{
ShortUsage: "<subcommand> [flags]",
LongHelp: "Gno health check suite, to verify that different parts of Gno are working correctly",
},
commands.NewEmptyConfig(),
commands.HelpExec,
)

io := commands.NewDefaultIO()
cmd.AddSubCommands(
timestamp.NewTimestampCmd(io),
)

cmd.Execute(context.Background(), os.Args[1:])
}
6 changes: 4 additions & 2 deletions gnovm/cmd/gno/download_deps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ func TestDownloadDeps(t *testing.T) {
},
},
},
requirements: []string{"avl"},
requirements: []string{"avl", "ufmt"},
ioErrContains: []string{
"gno: downloading gno.land/p/demo/avl",
"gno: downloading gno.land/p/demo/ufmt",
},
}, {
desc: "fetch_gno.land/p/demo/blog6",
Expand Down Expand Up @@ -80,9 +81,10 @@ func TestDownloadDeps(t *testing.T) {
New: module.Version{Path: "gno.land/p/demo/avl"},
}},
},
requirements: []string{"avl"},
requirements: []string{"avl", "ufmt"},
ioErrContains: []string{
"gno: downloading gno.land/p/demo/avl",
"gno: downloading gno.land/p/demo/ufmt",
},
}, {
desc: "fetch_replace_local",
Expand Down
2 changes: 2 additions & 0 deletions gnovm/pkg/gnolang/go2gno.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ func Go2Gno(fs *token.FileSet, gon ast.Node) (n Node) {
}
case *ast.FuncLit:
type_ := Go2Gno(fs, gon.Type).(*FuncTypeExpr)
type_.IsClosure = true

return &FuncLitExpr{
Type: *type_,
Body: toBody(fs, gon.Body),
Expand Down
Loading

0 comments on commit ebc87af

Please sign in to comment.