From c8cd8f4b6ccbe9f4ee5622032228553496186d51 Mon Sep 17 00:00:00 2001 From: David Manpearl Date: Thu, 19 Dec 2024 01:56:58 -0800 Subject: [PATCH 01/18] =?UTF-8?q?fix(lint):=20fix=20'make=20install'=20fai?= =?UTF-8?q?lure=20due=20to=20bad=20'BeginTransaction'=20c=E2=80=A6=20(#336?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses #3368 …all in lint.io lint.go: add missing 'gasMeter' param to 'BeginTransaction' call Impact: caused 'make install' to fail on branch 'master' with the following error: cmd/gno/lint.go:147:34: not enough arguments in call to ts.BeginTransaction have ("github.com/gnolang/gno/tm2/pkg/store/types".Store, "github.com/gnolang/gno/tm2/pkg/store/types".Store) want ("github.com/gnolang/gno/tm2/pkg/store/types".Store, "github.com/gnolang/gno/tm2/pkg/store/types".Store, "github.com/gnolang/gno/tm2/pkg/store/types".GasMeter) make[1]: *** [install] Error 1 Testing: This fix resolves test failure commanded by `make test`: FAIL github.com/gnolang/gno/gnovm/cmd/gno [build failed] --- gnovm/cmd/gno/lint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnovm/cmd/gno/lint.go b/gnovm/cmd/gno/lint.go index 8a1256772df..ce3465b484e 100644 --- a/gnovm/cmd/gno/lint.go +++ b/gnovm/cmd/gno/lint.go @@ -144,7 +144,7 @@ func execLint(cfg *lintCfg, args []string, io commands.IO) error { // Wrap in cache wrap so execution of the linter doesn't impact // other packages. cw := bs.CacheWrap() - gs := ts.BeginTransaction(cw, cw) + gs := ts.BeginTransaction(cw, cw, nil) // Run type checking if gmFile == nil || !gmFile.Draft { From 018ef433f6c48b256575eb8f83d856e32d916989 Mon Sep 17 00:00:00 2001 From: Miguel Victoria Villaquiran Date: Thu, 19 Dec 2024 07:45:01 -0500 Subject: [PATCH 02/18] fix: stdlib_diff published on pages (#3367) --- .github/workflows/gh-pages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 993c11b5941..3baf8e1ee8a 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -28,10 +28,10 @@ jobs: - run: echo $GOROOT - run: "cd misc/stdlib_diff && make gen" - run: "cd misc/gendocs && make install gen" - - run: "mkdir -p pages_ouput/stdlib_diff" + - run: "mkdir -p pages_output/stdlib_diff" - run: | - mv misc/gendocs/godoc pages_output - mv misc/stdlib_diff/stdlib_diff pages_ouput/stdlib_diff + cp -r misc/gendocs/godoc/* pages_output/ + cp -r misc/stdlib_diff/stdlib_diff/* pages_output/stdlib_diff/ - uses: actions/configure-pages@v5 id: pages - uses: actions/upload-pages-artifact@v3 From 87a503514c52fe3ec5543a1aca71a1ab4eca82cc Mon Sep 17 00:00:00 2001 From: Morgan Date: Thu, 19 Dec 2024 14:49:54 +0100 Subject: [PATCH 03/18] refactor(gno.land): use errors.As to detect out of gas exceptions (#3320) --- .../gnoland/testdata/addpkg_outofgas.txtar | 9 +- gno.land/pkg/sdk/vm/gas_test.go | 4 +- gno.land/pkg/sdk/vm/keeper.go | 151 +++++++----------- gnovm/pkg/gnolang/preprocess.go | 9 -- tm2/pkg/sdk/auth/ante.go | 2 +- tm2/pkg/sdk/baseapp.go | 2 +- tm2/pkg/store/exports.go | 4 +- tm2/pkg/store/types/gas.go | 22 ++- 8 files changed, 83 insertions(+), 120 deletions(-) diff --git a/gno.land/cmd/gnoland/testdata/addpkg_outofgas.txtar b/gno.land/cmd/gnoland/testdata/addpkg_outofgas.txtar index 56050f4733b..fc536b705c6 100644 --- a/gno.land/cmd/gnoland/testdata/addpkg_outofgas.txtar +++ b/gno.land/cmd/gnoland/testdata/addpkg_outofgas.txtar @@ -7,17 +7,12 @@ gnoland start gnokey maketx addpkg -pkgdir $WORK/foo -pkgpath gno.land/r/foo -gas-fee 1000000ugnot -gas-wanted 220000 -broadcast -chainid=tendermint_test test1 -# add bar package -# out of gas at store.GetPackage() with gas 60000 +# add bar package - out of gas at store.GetPackage() with gas 60000 ! gnokey maketx addpkg -pkgdir $WORK/bar -pkgpath gno.land/r/bar -gas-fee 1000000ugnot -gas-wanted 60000 -broadcast -chainid=tendermint_test test1 -# Out of gas error - stderr '--= Error =--' stderr 'Data: out of gas error' -stderr 'Msg Traces:' -stderr 'out of gas.*?in preprocess' stderr '--= /Error =--' @@ -28,8 +23,6 @@ stderr '--= /Error =--' stderr '--= Error =--' stderr 'Data: out of gas error' -stderr 'Msg Traces:' -stderr 'out of gas.*?in preprocess' stderr '--= /Error =--' diff --git a/gno.land/pkg/sdk/vm/gas_test.go b/gno.land/pkg/sdk/vm/gas_test.go index 0001e3acf7c..276aa9db0b0 100644 --- a/gno.land/pkg/sdk/vm/gas_test.go +++ b/gno.land/pkg/sdk/vm/gas_test.go @@ -38,7 +38,7 @@ func TestAddPkgDeliverTxInsuffGas(t *testing.T) { defer func() { if r := recover(); r != nil { switch r.(type) { - case store.OutOfGasException: + case store.OutOfGasError: res.Error = sdk.ABCIError(std.ErrOutOfGas("")) abort = true default: @@ -117,7 +117,7 @@ func TestAddPkgDeliverTxFailedNoGas(t *testing.T) { defer func() { if r := recover(); r != nil { switch r.(type) { - case store.OutOfGasException: + case store.OutOfGasError: res.Error = sdk.ABCIError(std.ErrOutOfGas("")) abort = true default: diff --git a/gno.land/pkg/sdk/vm/keeper.go b/gno.land/pkg/sdk/vm/keeper.go index f158524b3df..bf16cd44243 100644 --- a/gno.land/pkg/sdk/vm/keeper.go +++ b/gno.land/pkg/sdk/vm/keeper.go @@ -5,6 +5,7 @@ package vm import ( "bytes" "context" + goerrors "errors" "fmt" "io" "log/slog" @@ -392,18 +393,7 @@ func (vm *VMKeeper) AddPackage(ctx sdk.Context, msg MsgAddPackage) (err error) { GasMeter: ctx.GasMeter(), }) defer m2.Release() - defer func() { - if r := recover(); r != nil { - switch r.(type) { - case store.OutOfGasException: // panic in consumeGas() - panic(r) - default: - err = errors.Wrapf(fmt.Errorf("%v", r), "VM addpkg panic: %v\n%s\n", - r, m2.String()) - return - } - } - }() + defer doRecover(m2, &err) m2.RunMemPackage(memPkg, true) // Log the telemetry @@ -495,21 +485,7 @@ func (vm *VMKeeper) Call(ctx sdk.Context, msg MsgCall) (res string, err error) { }) defer m.Release() m.SetActivePackage(mpv) - defer func() { - if r := recover(); r != nil { - switch r := r.(type) { - case store.OutOfGasException: // panic in consumeGas() - panic(r) - case gno.UnhandledPanicError: - err = errors.Wrapf(fmt.Errorf("%v", r.Error()), "VM call panic: %s\nStacktrace: %s\n", - r.Error(), m.ExceptionsStacktrace()) - default: - err = errors.Wrapf(fmt.Errorf("%v", r), "VM call panic: %v\nMachine State:%s\nStacktrace: %s\n", - r, m.String(), m.Stacktrace().String()) - return - } - } - }() + defer doRecover(m, &err) rtvs := m.Eval(xn) for i, rtv := range rtvs { res = res + rtv.String() @@ -534,6 +510,35 @@ func (vm *VMKeeper) Call(ctx sdk.Context, msg MsgCall) (res string, err error) { // TODO pay for gas? TODO see context? } +func doRecover(m *gno.Machine, e *error) { + r := recover() + if r == nil { + return + } + if err, ok := r.(error); ok { + var oog types.OutOfGasError + if goerrors.As(err, &oog) { + // Re-panic and don't wrap. + panic(oog) + } + var up gno.UnhandledPanicError + if goerrors.As(err, &up) { + // Common unhandled panic error, skip machine state. + *e = errors.Wrapf( + errors.New(up.Descriptor), + "VM panic: %s\nStacktrace: %s\n", + up.Descriptor, m.ExceptionsStacktrace(), + ) + return + } + } + *e = errors.Wrapf( + fmt.Errorf("%v", r), + "VM panic: %v\nMachine State:%s\nStacktrace: %s\n", + r, m.String(), m.Stacktrace().String(), + ) +} + // Run executes arbitrary Gno code in the context of the caller's realm. func (vm *VMKeeper) Run(ctx sdk.Context, msg MsgRun) (res string, err error) { caller := msg.Caller @@ -583,37 +588,36 @@ func (vm *VMKeeper) Run(ctx sdk.Context, msg MsgRun) (res string, err error) { Params: NewSDKParams(vm, ctx), EventLogger: ctx.EventLogger(), } - // Parse and run the files, construct *PV. + buf := new(bytes.Buffer) output := io.Writer(buf) - if vm.Output != nil { - output = io.MultiWriter(buf, vm.Output) - } - m := gno.NewMachineWithOptions( - gno.MachineOptions{ - PkgPath: "", - Output: output, - Store: gnostore, - Alloc: gnostore.GetAllocator(), - Context: msgCtx, - GasMeter: ctx.GasMeter(), - }) - // XXX MsgRun does not have pkgPath. How do we find it on chain? - defer m.Release() - defer func() { - if r := recover(); r != nil { - switch r.(type) { - case store.OutOfGasException: // panic in consumeGas() - panic(r) - default: - err = errors.Wrapf(fmt.Errorf("%v", r), "VM run main addpkg panic: %v\n%s\n", - r, m.String()) - return - } + + // Run as self-executing closure to have own function for doRecover / m.Release defers. + pv := func() *gno.PackageValue { + // Parse and run the files, construct *PV. + if vm.Output != nil { + output = io.MultiWriter(buf, vm.Output) } - }() + m := gno.NewMachineWithOptions( + gno.MachineOptions{ + PkgPath: "", + Output: output, + Store: gnostore, + Alloc: gnostore.GetAllocator(), + Context: msgCtx, + GasMeter: ctx.GasMeter(), + }) + // XXX MsgRun does not have pkgPath. How do we find it on chain? + defer m.Release() + defer doRecover(m, &err) - _, pv := m.RunMemPackage(memPkg, false) + _, pv := m.RunMemPackage(memPkg, false) + return pv + }() + if err != nil { + // handle any errors happened within pv generation. + return + } m2 := gno.NewMachineWithOptions( gno.MachineOptions{ @@ -626,18 +630,7 @@ func (vm *VMKeeper) Run(ctx sdk.Context, msg MsgRun) (res string, err error) { }) defer m2.Release() m2.SetActivePackage(pv) - defer func() { - if r := recover(); r != nil { - switch r.(type) { - case store.OutOfGasException: // panic in consumeGas() - panic(r) - default: - err = errors.Wrapf(fmt.Errorf("%v", r), "VM run main call panic: %v\n%s\n", - r, m2.String()) - return - } - } - }() + defer doRecover(m2, &err) m2.RunMain() res = buf.String() @@ -758,18 +751,7 @@ func (vm *VMKeeper) QueryEval(ctx sdk.Context, pkgPath string, expr string) (res GasMeter: ctx.GasMeter(), }) defer m.Release() - defer func() { - if r := recover(); r != nil { - switch r.(type) { - case store.OutOfGasException: // panic in consumeGas() - panic(r) - default: - err = errors.Wrapf(fmt.Errorf("%v", r), "VM query eval panic: %v\n%s\n", - r, m.String()) - return - } - } - }() + defer doRecover(m, &err) rtvs := m.Eval(xx) res = "" for i, rtv := range rtvs { @@ -826,18 +808,7 @@ func (vm *VMKeeper) QueryEvalString(ctx sdk.Context, pkgPath string, expr string GasMeter: ctx.GasMeter(), }) defer m.Release() - defer func() { - if r := recover(); r != nil { - switch r.(type) { - case store.OutOfGasException: // panic in consumeGas() - panic(r) - default: - err = errors.Wrapf(fmt.Errorf("%v", r), "VM query eval string panic: %v\n%s\n", - r, m.String()) - return - } - } - }() + defer doRecover(m, &err) rtvs := m.Eval(xx) if len(rtvs) != 1 { return "", errors.New("expected 1 string result, got %d", len(rtvs)) diff --git a/gnovm/pkg/gnolang/preprocess.go b/gnovm/pkg/gnolang/preprocess.go index d47067854ca..79695d8888a 100644 --- a/gnovm/pkg/gnolang/preprocess.go +++ b/gnovm/pkg/gnolang/preprocess.go @@ -10,7 +10,6 @@ import ( "sync/atomic" "github.com/gnolang/gno/tm2/pkg/errors" - tmstore "github.com/gnolang/gno/tm2/pkg/store" ) const ( @@ -366,12 +365,6 @@ func initStaticBlocks(store Store, ctx BlockNode, bn BlockNode) { func doRecover(stack []BlockNode, n Node) { if r := recover(); r != nil { - // Catch the out-of-gas exception and throw it - if exp, ok := r.(tmstore.OutOfGasException); ok { - exp.Descriptor = fmt.Sprintf("in preprocess: %v", r) - panic(exp) - } - if _, ok := r.(*PreprocessError); ok { // re-panic directly if this is a PreprocessError already. panic(r) @@ -388,10 +381,8 @@ func doRecover(stack []BlockNode, n Node) { var err error rerr, ok := r.(error) if ok { - // NOTE: gotuna/gorilla expects error exceptions. err = errors.Wrap(rerr, loc.String()) } else { - // NOTE: gotuna/gorilla expects error exceptions. err = fmt.Errorf("%s: %v", loc.String(), r) } diff --git a/tm2/pkg/sdk/auth/ante.go b/tm2/pkg/sdk/auth/ante.go index 4495a1729ad..997478fe4b5 100644 --- a/tm2/pkg/sdk/auth/ante.go +++ b/tm2/pkg/sdk/auth/ante.go @@ -76,7 +76,7 @@ func NewAnteHandler(ak AccountKeeper, bank BankKeeperI, sigGasConsumer Signature defer func() { if r := recover(); r != nil { switch ex := r.(type) { - case store.OutOfGasException: + case store.OutOfGasError: log := fmt.Sprintf( "out of gas in location: %v; gasWanted: %d, gasUsed: %d", ex.Descriptor, tx.Fee.GasWanted, newCtx.GasMeter().GasConsumed(), diff --git a/tm2/pkg/sdk/baseapp.go b/tm2/pkg/sdk/baseapp.go index ea729abd6ae..746dd618800 100644 --- a/tm2/pkg/sdk/baseapp.go +++ b/tm2/pkg/sdk/baseapp.go @@ -759,7 +759,7 @@ func (app *BaseApp) runTx(ctx Context, tx Tx) (result Result) { defer func() { if r := recover(); r != nil { switch ex := r.(type) { - case store.OutOfGasException: + case store.OutOfGasError: log := fmt.Sprintf( "out of gas, gasWanted: %d, gasUsed: %d location: %v", gasWanted, diff --git a/tm2/pkg/store/exports.go b/tm2/pkg/store/exports.go index a1b4aba3655..d6e3b32bc25 100644 --- a/tm2/pkg/store/exports.go +++ b/tm2/pkg/store/exports.go @@ -22,8 +22,8 @@ type ( Gas = types.Gas GasMeter = types.GasMeter GasConfig = types.GasConfig - OutOfGasException = types.OutOfGasException - GasOverflowException = types.GasOverflowException + OutOfGasError = types.OutOfGasError + GasOverflowError = types.GasOverflowError ) var ( diff --git a/tm2/pkg/store/types/gas.go b/tm2/pkg/store/types/gas.go index 9d1f3d70c28..a86cff17d1a 100644 --- a/tm2/pkg/store/types/gas.go +++ b/tm2/pkg/store/types/gas.go @@ -21,17 +21,25 @@ const ( // Gas measured by the SDK type Gas = int64 -// OutOfGasException defines an error thrown when an action results in out of gas. -type OutOfGasException struct { +// OutOfGasError defines an error thrown when an action results in out of gas. +type OutOfGasError struct { Descriptor string } -// GasOverflowException defines an error thrown when an action results gas consumption +func (oog OutOfGasError) Error() string { + return "out of gas in location: " + oog.Descriptor +} + +// GasOverflowError defines an error thrown when an action results gas consumption // unsigned integer overflow. -type GasOverflowException struct { +type GasOverflowError struct { Descriptor string } +func (oog GasOverflowError) Error() string { + return "gas overflow in location: " + oog.Descriptor +} + // GasMeter interface to track gas consumption type GasMeter interface { GasConsumed() Gas @@ -88,13 +96,13 @@ func (g *basicGasMeter) ConsumeGas(amount Gas, descriptor string) { } consumed, ok := overflow.Add64(g.consumed, amount) if !ok { - panic(GasOverflowException{descriptor}) + panic(GasOverflowError{descriptor}) } // consume gas even if out of gas. // corollary, call (Did)ConsumeGas after consumption. g.consumed = consumed if consumed > g.limit { - panic(OutOfGasException{descriptor}) + panic(OutOfGasError{descriptor}) } } @@ -139,7 +147,7 @@ func (g *infiniteGasMeter) Remaining() Gas { func (g *infiniteGasMeter) ConsumeGas(amount Gas, descriptor string) { consumed, ok := overflow.Add64(g.consumed, amount) if !ok { - panic(GasOverflowException{descriptor}) + panic(GasOverflowError{descriptor}) } g.consumed = consumed } From e506a8d026aaaa1b1a998ed84f6a4ba3a6c05810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20=C5=BDivkovi=C4=87?= Date: Thu, 19 Dec 2024 22:23:15 +0100 Subject: [PATCH 04/18] feat: scope the CI and add QoL improvements (#3316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR modifies the monorepo workflows, and introduces QoL improvements to the overall CI. The PR is not meant to be a cover-all fix for the CI, but a start on how we can begin improving it. @gfanton We should start looking into how to group txtars soon 🙏 --- .github/.editorconfig | 8 + .github/codecov.yml | 8 +- .github/golangci.yml | 5 + .github/workflows/auto-author-assign.yml | 2 +- .github/workflows/autocounterd.yml | 12 +- .github/workflows/benchmark-master-push.yml | 12 +- .github/workflows/codeql.yml | 68 ++++---- .github/workflows/contribs.yml | 36 ++++- .github/workflows/dependabot-validate.yml | 3 +- .github/workflows/deploy-docs.yml | 4 +- .../workflows/{docs.yml => docs-linter.yml} | 4 +- .github/workflows/examples.yml | 30 ++-- .github/workflows/fossa.yml | 12 ++ .github/workflows/genesis-verify.yml | 7 +- .github/workflows/gh-pages.yml | 8 +- .github/workflows/gnofmt_template.yml | 19 ++- .github/workflows/gnoland.yml | 10 +- .github/workflows/gnovm.yml | 13 +- .github/workflows/labeler.yml | 8 +- .github/workflows/lint-pr-title.yml | 2 +- .github/workflows/lint_template.yml | 1 - .github/workflows/main_template.yml | 75 ++++----- .github/workflows/misc.yml | 7 +- .github/workflows/mod-tidy.yml | 12 +- .github/workflows/portal-loop.yml | 20 +-- .github/workflows/releaser-master.yml | 4 +- .github/workflows/releaser-nightly.yml | 2 +- .github/workflows/releaser.yml | 45 ------ .github/workflows/stale-bot.yml | 2 +- .github/workflows/test_template.yml | 146 ++++++++---------- .github/workflows/tm2.yml | 9 +- gno.land/cmd/gnoland/integration_test.go | 11 -- .../integration}/testdata/addpkg.txtar | 0 .../integration}/testdata/addpkg_domain.txtar | 0 .../testdata/addpkg_invalid.txtar | 0 .../testdata/addpkg_namespace.txtar | 0 .../testdata/addpkg_outofgas.txtar | 0 .../integration}/testdata/alloc_array.txtar | 0 .../testdata/alloc_byte_slice.txtar | 0 .../integration}/testdata/alloc_slice.txtar | 0 .../integration}/testdata/append.txtar | 0 .../testdata/assertorigincall.txtar | 0 .../testdata/event_callback.txtar | 0 .../testdata/event_defer_callback_loop.txtar | 0 .../testdata/event_for_statement.txtar | 0 .../testdata/event_multi_msg.txtar | 0 .../integration}/testdata/event_normal.txtar | 0 .../integration}/testdata/float_arg.txtar | 0 .../testdata/genesis_params.txtar | 0 .../integration}/testdata/ghverify.txtar | 0 .../testdata/gnokey_simulate.txtar | 0 .../testdata/gnoweb_airgapped.txtar | 0 .../testdata/grc20_invalid_address.txtar | 0 .../testdata/grc20_registry.txtar | 0 .../integration}/testdata/grc721_emit.txtar | 0 .../integration}/testdata/initctx.txtar | 0 .../integration}/testdata/issue_1167.txtar | 0 .../integration}/testdata/issue_1588.txtar | 0 .../integration}/testdata/issue_1786.txtar | 0 .../integration}/testdata/issue_2283.txtar | 0 .../testdata/issue_2283_cacheTypes.txtar | 0 .../testdata/issue_gnochess_97.txtar | 0 .../testdata/maketx_call_pure.txtar | 0 .../integration}/testdata/map_delete.txtar | 0 .../integration}/testdata/map_storage.txtar | 0 .../integration}/testdata/panic.txtar | 0 .../integration}/testdata/params.txtar | 0 .../integration}/testdata/prevrealm.txtar | 0 .../realm_banker_issued_coin_denom.txtar | 0 .../testdata/restart_missing_type.txtar | 0 .../testdata/restart_nonval.txtar | 0 .../integration}/testdata/run.txtar | 0 .../integration}/testdata/simulate_gas.txtar | 0 .../integration}/testdata/time_simple.txtar | 0 .../integration}/testdata/wugnot.txtar | 0 75 files changed, 302 insertions(+), 303 deletions(-) create mode 100644 .github/.editorconfig rename .github/workflows/{docs.yml => docs-linter.yml} (95%) delete mode 100644 .github/workflows/releaser.yml delete mode 100644 gno.land/cmd/gnoland/integration_test.go rename gno.land/{cmd/gnoland => pkg/integration}/testdata/addpkg.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/addpkg_domain.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/addpkg_invalid.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/addpkg_namespace.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/addpkg_outofgas.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/alloc_array.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/alloc_byte_slice.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/alloc_slice.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/append.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/assertorigincall.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/event_callback.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/event_defer_callback_loop.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/event_for_statement.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/event_multi_msg.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/event_normal.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/float_arg.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/genesis_params.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/ghverify.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/gnokey_simulate.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/gnoweb_airgapped.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/grc20_invalid_address.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/grc20_registry.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/grc721_emit.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/initctx.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/issue_1167.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/issue_1588.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/issue_1786.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/issue_2283.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/issue_2283_cacheTypes.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/issue_gnochess_97.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/maketx_call_pure.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/map_delete.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/map_storage.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/panic.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/params.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/prevrealm.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/realm_banker_issued_coin_denom.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/restart_missing_type.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/restart_nonval.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/run.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/simulate_gas.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/time_simple.txtar (100%) rename gno.land/{cmd/gnoland => pkg/integration}/testdata/wugnot.txtar (100%) diff --git a/.github/.editorconfig b/.github/.editorconfig new file mode 100644 index 00000000000..751cd705457 --- /dev/null +++ b/.github/.editorconfig @@ -0,0 +1,8 @@ +# Make sure this is the top-level editorconfig +# https://editorconfig.org/ +root = true + +# GitHub Actions Workflows +[workflows/**.yml] +indent_style = space +indent_size = 2 diff --git a/.github/codecov.yml b/.github/codecov.yml index d1ecba7ade3..f0cb9583cf2 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -4,7 +4,7 @@ codecov: wait_for_ci: true comment: - require_changes: false + require_changes: true coverage: round: down @@ -13,7 +13,7 @@ coverage: project: default: target: auto - threshold: 10 # Let's decrease this later. + threshold: 5 # Let's decrease this later. base: parent if_no_uploads: error if_not_found: success @@ -22,12 +22,12 @@ coverage: patch: default: target: auto - threshold: 10 # Let's decrease this later. + threshold: 5 # Let's decrease this later. base: auto if_no_uploads: error if_not_found: success if_ci_failed: error - only_pulls: false + only_pulls: true # Only check patch coverage on PRs flag_management: default_rules: diff --git a/.github/golangci.yml b/.github/golangci.yml index b8bd5537135..ca85620b7e6 100644 --- a/.github/golangci.yml +++ b/.github/golangci.yml @@ -44,9 +44,11 @@ linters: linters-settings: gofmt: simplify: true + goconst: min-len: 3 min-occurrences: 3 + gosec: excludes: - G204 # Subprocess launched with a potential tainted input or cmd arguments @@ -56,6 +58,7 @@ linters-settings: checks: [ "all", "-ST1022", "-ST1003" ] errorlint: asserts: false + gocritic: enabled-tags: - diagnostic @@ -63,6 +66,7 @@ linters-settings: - opinionated - performance - style + forbidigo: forbid: - p: '^regexp\.(Match|MatchString)$' @@ -74,6 +78,7 @@ issues: max-same-issues: 0 new: false fix: false + exclude-rules: - path: _test\.go linters: diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 06dfb4ab903..890e70da9ae 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -1,4 +1,4 @@ -name: auto-author-assign +name: Auto Assign PR Author on: pull_request_target: diff --git a/.github/workflows/autocounterd.yml b/.github/workflows/autocounterd.yml index 9217fe2eef2..dcba56178bd 100644 --- a/.github/workflows/autocounterd.yml +++ b/.github/workflows/autocounterd.yml @@ -1,19 +1,13 @@ -name: autocounterd +name: Portal Loop - autocounterd on: - pull_request: - branches: - - master push: + branches: + - "master" paths: - misc/autocounterd - misc/loop - .github/workflows/autocounterd.yml - branches: - - "master" - - "misc/autocounterd" - tags: - - "v*" permissions: contents: read diff --git a/.github/workflows/benchmark-master-push.yml b/.github/workflows/benchmark-master-push.yml index 622baefc0de..1c054077a3a 100644 --- a/.github/workflows/benchmark-master-push.yml +++ b/.github/workflows/benchmark-master-push.yml @@ -1,14 +1,14 @@ -name: run benchmarks when pushing on main branch +name: Run and Save Benchmarks on: push: branches: - master paths: - - contribs/** - - gno.land/** - - gnovm/** - - tm2/** + - contribs/**/*.go + - gno.land/**/*.go + - gnovm/**/*.go + - tm2/**/*.go permissions: # deployments permission to deploy GitHub pages website @@ -22,7 +22,7 @@ env: jobs: benchmarks: if: ${{ github.repository == 'gnolang/gno' }} - runs-on: [self-hosted, Linux, X64, benchmarks] + runs-on: [ self-hosted, Linux, X64, benchmarks ] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d2eef9d7445..270c422b3de 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,7 +9,7 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: CodeQL on: push: @@ -41,8 +41,8 @@ jobs: fail-fast: false matrix: include: - - language: go - build-mode: autobuild + - language: go + build-mode: autobuild # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both @@ -52,38 +52,38 @@ jobs: # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality - # If the analyze step fails for one of the languages you are analyzing with - # "We were unable to automatically build your code", modify the matrix above - # to set the build mode to "manual" for that language. Then modify this step - # to build your code. - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - if: matrix.build-mode == 'manual' - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - if: matrix.build-mode == 'manual' + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/contribs.yml b/.github/workflows/contribs.yml index 3739339f7be..c1de5e78c35 100644 --- a/.github/workflows/contribs.yml +++ b/.github/workflows/contribs.yml @@ -1,30 +1,54 @@ -name: contribs +name: Contribs on: push: branches: - master - workflow_dispatch: pull_request: + paths: + - contribs/** + workflow_dispatch: jobs: setup: runs-on: ubuntu-latest outputs: programs: ${{ steps.set-matrix.outputs.programs }} + go-versions: ${{ steps.get-go-versions.outputs.go-versions }} steps: - uses: actions/checkout@v4 + - id: set-matrix - run: echo "::set-output name=programs::$(ls -d contribs/*/ | cut -d/ -f2 | jq -R -s -c 'split("\n")[:-1]')" + run: | + echo "::set-output name=programs::$(ls -d contribs/*/ | cut -d/ -f2 | jq -R -s -c 'split("\n")[:-1]')" + + - id: get-go-versions + run: | + contribs_programs=$(ls -d contribs/*/ | cut -d/ -f2) + versions_map="{" + + for p in $contribs_programs; do + # Fetch the go version of the contribs entry, and save it + # to a versions map we can reference later in the workflow + go_version=$(grep "^go [0-9]" contribs/$p/go.mod | cut -d ' ' -f2) + versions_map="$versions_map\"$p\":\"$go_version\"," + done + + # Close out the JSON + versions_map="${versions_map%,}" + versions_map="$versions_map}" + echo "::set-output name=go-versions::$versions_map" + main: needs: setup strategy: - fail-fast: false - matrix: - program: ${{ fromJson(needs.setup.outputs.programs) }} + fail-fast: false + matrix: + program: ${{ fromJson(needs.setup.outputs.programs) }} name: Run Main uses: ./.github/workflows/main_template.yml with: modulepath: contribs/${{ matrix.program }} + go-version: ${{ (fromJson(needs.setup.outputs.go-versions))[matrix.program] }} secrets: codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/dependabot-validate.yml b/.github/workflows/dependabot-validate.yml index b1387dc0bb2..3d7b2c315c6 100644 --- a/.github/workflows/dependabot-validate.yml +++ b/.github/workflows/dependabot-validate.yml @@ -1,10 +1,11 @@ -name: dependabot validate +name: Validate Dependabot Config on: pull_request: paths: - '.github/dependabot.yml' - '.github/workflows/dependabot-validate.yml' + jobs: validate: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index d800147a498..f180f1679b1 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,4 +1,6 @@ -name: deploy docs on gnolang/docs.gno.land repository +# This workflow triggers a cross-repo workflow call, +# that deploys the monorepo docs on Netlify, using Docusaurus +name: Deploy the Documentation on: push: branches: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs-linter.yml similarity index 95% rename from .github/workflows/docs.yml rename to .github/workflows/docs-linter.yml index c9d9af0fb6f..d603d796ae9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs-linter.yml @@ -1,8 +1,8 @@ -name: "docs / lint" +name: Docs Linter on: push: - paths: + branches: - master pull_request: paths: diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 41d579c4567..e441d9c1dad 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -1,9 +1,13 @@ -name: examples +name: Gno Examples on: - pull_request: push: - branches: ["master"] + branches: + - master + pull_request: + paths: + - gnovm/**/*.gno + - examples/**/*.gno concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -67,26 +71,22 @@ jobs: # TODO: consider running lint on every other directories, maybe in "warning" mode? # TODO: track coverage fmt: - strategy: - fail-fast: false - matrix: - goversion: ["1.22.x"] + name: Run gno fmt runs-on: ubuntu-latest - timeout-minutes: 10 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - name: gno fmt + uses: ./.github/workflows/gnofmt_template.yml with: - go-version: ${{ matrix.goversion }} - - run: | - make fmt -C ./examples - # Check if there are changes after running make fmt + path: "examples/..." + - name: Check for unformatted gno files + run: | git diff --exit-code || (echo "Some gno files are not formatted, please run 'make fmt'." && exit 1) + mod-tidy: strategy: fail-fast: false matrix: - go-version: ["1.22.x"] + go-version: [ "1.22.x" ] # unittests: TODO: matrix with contracts runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 41d9a2cba94..e8defd00f7c 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -1,6 +1,18 @@ name: Dependency License Scanning on: + push: + branches: + - master + paths: + - '**/*.go' + - 'go.mod' + - 'go.sum' + pull_request: + paths: + - '**/*.go' + - 'go.mod' + - 'go.sum' workflow_dispatch: permissions: diff --git a/.github/workflows/genesis-verify.yml b/.github/workflows/genesis-verify.yml index 1288d588100..acc41cc99ad 100644 --- a/.github/workflows/genesis-verify.yml +++ b/.github/workflows/genesis-verify.yml @@ -1,9 +1,10 @@ -name: genesis-verify +name: Deployment genesis.json Verification on: - pull_request: + push: branches: - master + pull_request: paths: - "misc/deployments/**/genesis.json" - ".github/workflows/genesis-verify.yml" @@ -13,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - testnet: ["test5.gno.land"] + testnet: [ "test5.gno.land" ] runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 3baf8e1ee8a..a293469bb5d 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,9 +1,11 @@ -# generate docs and publish on gh-pages branch -name: gh-pages +# generate Go docs and publish on gh-pages branch +# Live at: https://gnolang.github.io/gno +name: Go Reference Docs Deployment on: push: - branches: [ "master" ] + branches: + - master workflow_dispatch: permissions: diff --git a/.github/workflows/gnofmt_template.yml b/.github/workflows/gnofmt_template.yml index 1ba66d0fbe3..aa85d52097e 100644 --- a/.github/workflows/gnofmt_template.yml +++ b/.github/workflows/gnofmt_template.yml @@ -1,12 +1,15 @@ on: workflow_call: - inputs: - path: - required: true - type: string - go-version: - required: true - type: string + inputs: + path: + description: "Path to run gno fmt on" + required: true + type: string + go-version: + description: "Go version to use" + required: false + type: string + default: "1.22.x" jobs: fmt: @@ -18,7 +21,7 @@ jobs: go-version: ${{ inputs.go-version }} - name: Checkout code uses: actions/checkout@v4 - - name: Fmt + - name: fmt env: GNOFMT_PATH: ${{ inputs.path }} run: go run ./gnovm/cmd/gno fmt -v -diff $GNOFMT_PATH diff --git a/.github/workflows/gnoland.yml b/.github/workflows/gnoland.yml index 59050f1baa4..0d3a7a10516 100644 --- a/.github/workflows/gnoland.yml +++ b/.github/workflows/gnoland.yml @@ -4,12 +4,18 @@ on: push: branches: - master - workflow_dispatch: pull_request: + paths: + - gno.land/** + # We trigger the testing workflow for gno.land on the following, + # since there are integration suites that cover the gnovm / tm2 + - gnovm/** + - tm2/** + workflow_dispatch: jobs: main: - name: Run Main + name: Run gno.land suite uses: ./.github/workflows/main_template.yml with: modulepath: "gno.land" diff --git a/.github/workflows/gnovm.yml b/.github/workflows/gnovm.yml index 7e7586b23d9..7a015b74e09 100644 --- a/.github/workflows/gnovm.yml +++ b/.github/workflows/gnovm.yml @@ -1,23 +1,26 @@ -name: gnovm +name: GnoVM on: push: branches: - master - workflow_dispatch: pull_request: + paths: + - gnovm/** + - tm2/** # GnoVM has a dependency on TM2 types + workflow_dispatch: jobs: main: - name: Run Main + name: Run GnoVM suite uses: ./.github/workflows/main_template.yml with: modulepath: "gnovm" + tests-extra-args: "-coverpkg=github.com/gnolang/gno/gnovm/..." secrets: codecov-token: ${{ secrets.CODECOV_TOKEN }} fmt: - name: Run Gno Fmt + name: Run gno fmt on stdlibs uses: ./.github/workflows/gnofmt_template.yml with: path: "gnovm/stdlibs/..." - go-version: "1.22.x" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 06b2daa1d3d..56075c31db3 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,6 +1,6 @@ -name: "Pull Request Labeler" +name: Pull Request Labeler on: -- pull_request_target + - pull_request_target jobs: triage: @@ -9,5 +9,5 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/labeler@v5 + - uses: actions/checkout@v4 + - uses: actions/labeler@v5 diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index 631f764c37f..3c7236b264f 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -1,4 +1,4 @@ -name: "lint-pr-title" +name: PR Title Linter on: pull_request_target: diff --git a/.github/workflows/lint_template.yml b/.github/workflows/lint_template.yml index b7568d19c41..43246572daa 100644 --- a/.github/workflows/lint_template.yml +++ b/.github/workflows/lint_template.yml @@ -8,7 +8,6 @@ on: required: true type: string - jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/main_template.yml b/.github/workflows/main_template.yml index 5b3437b54a1..a463bb330ea 100644 --- a/.github/workflows/main_template.yml +++ b/.github/workflows/main_template.yml @@ -1,41 +1,42 @@ on: - workflow_call: - inputs: - modulepath: - required: true - type: string - tests-extra-args: - required: false - type: string - secrets: - codecov-token: - required: true - -# TODO: environment variables cannot be sent to reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations -# env: -# GO_VERSION: "1.22.x" + workflow_call: + inputs: + modulepath: + required: true + type: string + tests-extra-args: + required: false + type: string + go-version: + description: "Go version to use" + required: false + type: string + default: "1.22.x" + secrets: + codecov-token: + required: true jobs: - lint: - name: Go Linter - uses: ./.github/workflows/lint_template.yml - with: - modulepath: ${{ inputs.modulepath }} - go-version: "1.22.x" - build: - name: Go Build - uses: ./.github/workflows/build_template.yml - with: - modulepath: ${{ inputs.modulepath }} - go-version: "1.22.x" - test: - name: Go Test - uses: ./.github/workflows/test_template.yml - with: - modulepath: ${{ inputs.modulepath }} - tests-timeout: "30m" - go-version: "1.22.x" - tests-extra-args: ${{ inputs.tests-extra-args }} - secrets: - codecov-token: ${{ secrets.codecov-token }} + lint: + name: Go Lint + uses: ./.github/workflows/lint_template.yml + with: + modulepath: ${{ inputs.modulepath }} + go-version: ${{ inputs.go-version }} + build: + name: Go Build + uses: ./.github/workflows/build_template.yml + with: + modulepath: ${{ inputs.modulepath }} + go-version: ${{ inputs.go-version }} + test: + name: Go Test + uses: ./.github/workflows/test_template.yml + with: + modulepath: ${{ inputs.modulepath }} + tests-timeout: "30m" + go-version: ${{ inputs.go-version }} + tests-extra-args: ${{ inputs.tests-extra-args }} + secrets: + codecov-token: ${{ secrets.codecov-token }} diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml index ad2c886e2ac..1116a87c300 100644 --- a/.github/workflows/misc.yml +++ b/.github/workflows/misc.yml @@ -6,8 +6,10 @@ on: push: branches: - master - workflow_dispatch: pull_request: + paths: + - misc/** + workflow_dispatch: jobs: main: @@ -21,9 +23,10 @@ jobs: - genstd - goscan - loop - name: Run Main + name: Run misc suite uses: ./.github/workflows/main_template.yml with: modulepath: misc/${{ matrix.program }} + tests-extra-args: "-coverpkg=github.com/gnolang/gno/misc/..." secrets: codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/mod-tidy.yml b/.github/workflows/mod-tidy.yml index 24eab553d19..5b6401b0d13 100644 --- a/.github/workflows/mod-tidy.yml +++ b/.github/workflows/mod-tidy.yml @@ -1,11 +1,19 @@ -name: Ensure go.mods are tidied +name: go.mod Tidy Checker on: push: branches: - master - workflow_dispatch: + paths: + - '**/*.go' + - 'go.mod' + - 'go.sum' pull_request: + paths: + - '**/*.go' + - 'go.mod' + - 'go.sum' + workflow_dispatch: jobs: main: diff --git a/.github/workflows/portal-loop.yml b/.github/workflows/portal-loop.yml index b898a149e9d..b5cafa459a7 100644 --- a/.github/workflows/portal-loop.yml +++ b/.github/workflows/portal-loop.yml @@ -1,19 +1,13 @@ -name: portal-loop +name: Portal Loop on: - pull_request: - branches: - - master push: + branches: + - "master" + pull_request: paths: - "misc/loop/**" - ".github/workflows/portal-loop.yml" - branches: - - "master" - # NOTE(albttx): branch name to simplify tests for this workflow - - "ci/portal-loop" - tags: - - "v*" permissions: contents: read @@ -69,14 +63,14 @@ jobs: while block_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height') echo "Current block height: $block_height" - [[ "$block_height" -lt 10 ]] + [[ "$block_height" -lt 2 ]] do sleep 1 done curl -s localhost:26657/status | jq - - name: "Buid new gnolang/gno image" + - name: "Build new gnolang/gno image" run: | docker build -t ghcr.io/gnolang/gno/gnoland:master -f Dockerfile --target gnoland . @@ -96,7 +90,7 @@ jobs: while block_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height') echo "Current block height: $block_height" - [[ "$block_height" -lt 10 ]] + [[ "$block_height" -lt 2 ]] do sleep 5 done diff --git a/.github/workflows/releaser-master.yml b/.github/workflows/releaser-master.yml index 3d194e2cb4c..6e3eed31914 100644 --- a/.github/workflows/releaser-master.yml +++ b/.github/workflows/releaser-master.yml @@ -1,9 +1,9 @@ -name: Trigger master build +name: Master Releases on: push: branches: - - "master" + - master workflow_dispatch: permissions: diff --git a/.github/workflows/releaser-nightly.yml b/.github/workflows/releaser-nightly.yml index 4308f1c4a7d..4f6e636af1b 100644 --- a/.github/workflows/releaser-nightly.yml +++ b/.github/workflows/releaser-nightly.yml @@ -1,4 +1,4 @@ -name: Trigger nightly build +name: Nightly Releases on: schedule: diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml deleted file mode 100644 index 309664bdcce..00000000000 --- a/.github/workflows/releaser.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Go Releaser - -on: - push: - tags: - - "v*" - -permissions: - contents: write # needed to write releases - id-token: write # needed for keyless signing - packages: write # needed for ghcr access - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true - - - uses: sigstore/cosign-installer@v3.7.0 - - uses: anchore/sbom-action/download-syft@v0.17.8 - - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - uses: goreleaser/goreleaser-action@v6 - with: - distribution: goreleaser-pro - version: ~> v2 - args: release --clean --config ./.github/goreleaser.yaml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml index 55a17ac60a8..6eb38ac5728 100644 --- a/.github/workflows/stale-bot.yml +++ b/.github/workflows/stale-bot.yml @@ -1,4 +1,4 @@ -name: "Close stale PRs" +name: Stale PR Bot on: schedule: - cron: "30 1 * * *" diff --git a/.github/workflows/test_template.yml b/.github/workflows/test_template.yml index c7956b4caf4..a1bc58ecebb 100644 --- a/.github/workflows/test_template.yml +++ b/.github/workflows/test_template.yml @@ -1,84 +1,70 @@ on: - workflow_call: - inputs: - modulepath: - required: true - type: string - tests-timeout: - required: true - type: string - go-version: - required: true - type: string - tests-extra-args: - required: false - type: string - secrets: - codecov-token: - required: true + workflow_call: + inputs: + modulepath: + required: true + type: string + tests-timeout: + required: true + type: string + go-version: + required: true + type: string + tests-extra-args: + required: false + type: string + secrets: + codecov-token: + required: true jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - name: Go test - working-directory: ${{ inputs.modulepath }} - env: - TXTARCOVERDIR: /tmp/txtarcoverdir # txtar cover output - GOCOVERDIR: /tmp/gocoverdir # go cover output - COVERDIR: /tmp/coverdir # final output - run: | - set -x # print commands + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ inputs.go-version }} + - name: Go test + working-directory: ${{ inputs.modulepath }} + env: + TXTARCOVERDIR: /tmp/txtarcoverdir # txtar cover output + GOCOVERDIR: /tmp/gocoverdir # go cover output + COVERDIR: /tmp/coverdir # final output + run: | + set -x # print commands + + mkdir -p "$GOCOVERDIR" "$TXTARCOVERDIR" "$COVERDIR" + + # Craft a filter flag based on the module path to avoid expanding coverage on unrelated tags. + export filter="-pkg=github.com/gnolang/gno/${{ inputs.modulepath }}/..." + + # codecov only supports "boolean" coverage (whether a line is + # covered or not); so using -covermode=count or atomic would be + # pointless here. + # XXX: Simplify coverage of txtar - the current setup is a bit + # confusing and meticulous. There will be some improvements in Go + # 1.23 regarding coverage, so we can use this as a workaround until + # then. + go test -covermode=set -timeout ${{ inputs.tests-timeout }} ${{ inputs.tests-extra-args }} ./... -test.gocoverdir=$GOCOVERDIR + + # Print results + (set +x; echo 'go coverage results:') + go tool covdata percent $filter -i=$GOCOVERDIR + (set +x; echo 'txtar coverage results:') + go tool covdata percent $filter -i=$TXTARCOVERDIR + + # Generate final coverage output + go tool covdata textfmt -v 1 $filter -i=$GOCOVERDIR,$TXTARCOVERDIR -o gocoverage.out - mkdir -p "$GOCOVERDIR" "$TXTARCOVERDIR" "$COVERDIR" - - # Craft a filter flag based on the module path to avoid expanding coverage on unrelated tags. - export filter="-pkg=github.com/gnolang/gno/${{ inputs.modulepath }}/..." - - # codecov only supports "boolean" coverage (whether a line is - # covered or not); so using -covermode=count or atomic would be - # pointless here. - # XXX: Simplify coverage of txtar - the current setup is a bit - # confusing and meticulous. There will be some improvements in Go - # 1.23 regarding coverage, so we can use this as a workaround until - # then. - go test -covermode=set -timeout ${{ inputs.tests-timeout }} ${{ inputs.tests-extra-args }} ./... -test.gocoverdir=$GOCOVERDIR - - # Print results - (set +x; echo 'go coverage results:') - go tool covdata percent $filter -i=$GOCOVERDIR - (set +x; echo 'txtar coverage results:') - go tool covdata percent $filter -i=$TXTARCOVERDIR - - # Generate final coverage output - go tool covdata textfmt -v 1 $filter -i=$GOCOVERDIR,$TXTARCOVERDIR -o gocoverage.out - - - name: Upload go coverage to Codecov - uses: codecov/codecov-action@v5 - with: - disable_search: true - fail_ci_if_error: true - files: ${{ inputs.modulepath }}/gocoverage.out - flags: ${{ inputs.modulepath }} - token: ${{ secrets.codecov-token }} - verbose: true # keep this enable as it help debugging when coverage fail randomly on the CI - - # TODO: We have to fix race conditions before running this job - # test-with-race: - # runs-on: ubuntu-latest - # steps: - # - name: Install Go - # uses: actions/setup-go@v5 - # with: - # go-version: ${{ inputs.go-version }} - # - name: Checkout code - # uses: actions/checkout@v4 - # - name: Go race test - # run: go test -race -timeout ${{ inputs.tests-timeout }} ./... - # working-directory: ${{ inputs.modulepath }} + - name: Upload go coverage to Codecov + uses: codecov/codecov-action@v5 + with: + disable_search: true + fail_ci_if_error: true + files: ${{ inputs.modulepath }}/gocoverage.out + flags: ${{ inputs.modulepath }} + token: ${{ secrets.codecov-token }} + verbose: true # keep this enable as it help debugging when coverage fails randomly on the CI diff --git a/.github/workflows/tm2.yml b/.github/workflows/tm2.yml index 57e84793c94..757391eab8c 100644 --- a/.github/workflows/tm2.yml +++ b/.github/workflows/tm2.yml @@ -1,17 +1,20 @@ -name: tm2 +name: TM2 on: push: branches: - master - workflow_dispatch: pull_request: + paths: + - tm2/** + workflow_dispatch: jobs: main: - name: Run Main + name: Run TM2 suite uses: ./.github/workflows/main_template.yml with: modulepath: "tm2" + tests-extra-args: "-coverpkg=github.com/gnolang/gno/tm2/..." secrets: codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/gno.land/cmd/gnoland/integration_test.go b/gno.land/cmd/gnoland/integration_test.go deleted file mode 100644 index 37451df9704..00000000000 --- a/gno.land/cmd/gnoland/integration_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package main - -import ( - "testing" - - "github.com/gnolang/gno/gno.land/pkg/integration" -) - -func TestTestdata(t *testing.T) { - integration.RunGnolandTestscripts(t, "testdata") -} diff --git a/gno.land/cmd/gnoland/testdata/addpkg.txtar b/gno.land/pkg/integration/testdata/addpkg.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/addpkg.txtar rename to gno.land/pkg/integration/testdata/addpkg.txtar diff --git a/gno.land/cmd/gnoland/testdata/addpkg_domain.txtar b/gno.land/pkg/integration/testdata/addpkg_domain.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/addpkg_domain.txtar rename to gno.land/pkg/integration/testdata/addpkg_domain.txtar diff --git a/gno.land/cmd/gnoland/testdata/addpkg_invalid.txtar b/gno.land/pkg/integration/testdata/addpkg_invalid.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/addpkg_invalid.txtar rename to gno.land/pkg/integration/testdata/addpkg_invalid.txtar diff --git a/gno.land/cmd/gnoland/testdata/addpkg_namespace.txtar b/gno.land/pkg/integration/testdata/addpkg_namespace.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/addpkg_namespace.txtar rename to gno.land/pkg/integration/testdata/addpkg_namespace.txtar diff --git a/gno.land/cmd/gnoland/testdata/addpkg_outofgas.txtar b/gno.land/pkg/integration/testdata/addpkg_outofgas.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/addpkg_outofgas.txtar rename to gno.land/pkg/integration/testdata/addpkg_outofgas.txtar diff --git a/gno.land/cmd/gnoland/testdata/alloc_array.txtar b/gno.land/pkg/integration/testdata/alloc_array.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/alloc_array.txtar rename to gno.land/pkg/integration/testdata/alloc_array.txtar diff --git a/gno.land/cmd/gnoland/testdata/alloc_byte_slice.txtar b/gno.land/pkg/integration/testdata/alloc_byte_slice.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/alloc_byte_slice.txtar rename to gno.land/pkg/integration/testdata/alloc_byte_slice.txtar diff --git a/gno.land/cmd/gnoland/testdata/alloc_slice.txtar b/gno.land/pkg/integration/testdata/alloc_slice.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/alloc_slice.txtar rename to gno.land/pkg/integration/testdata/alloc_slice.txtar diff --git a/gno.land/cmd/gnoland/testdata/append.txtar b/gno.land/pkg/integration/testdata/append.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/append.txtar rename to gno.land/pkg/integration/testdata/append.txtar diff --git a/gno.land/cmd/gnoland/testdata/assertorigincall.txtar b/gno.land/pkg/integration/testdata/assertorigincall.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/assertorigincall.txtar rename to gno.land/pkg/integration/testdata/assertorigincall.txtar diff --git a/gno.land/cmd/gnoland/testdata/event_callback.txtar b/gno.land/pkg/integration/testdata/event_callback.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/event_callback.txtar rename to gno.land/pkg/integration/testdata/event_callback.txtar diff --git a/gno.land/cmd/gnoland/testdata/event_defer_callback_loop.txtar b/gno.land/pkg/integration/testdata/event_defer_callback_loop.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/event_defer_callback_loop.txtar rename to gno.land/pkg/integration/testdata/event_defer_callback_loop.txtar diff --git a/gno.land/cmd/gnoland/testdata/event_for_statement.txtar b/gno.land/pkg/integration/testdata/event_for_statement.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/event_for_statement.txtar rename to gno.land/pkg/integration/testdata/event_for_statement.txtar diff --git a/gno.land/cmd/gnoland/testdata/event_multi_msg.txtar b/gno.land/pkg/integration/testdata/event_multi_msg.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/event_multi_msg.txtar rename to gno.land/pkg/integration/testdata/event_multi_msg.txtar diff --git a/gno.land/cmd/gnoland/testdata/event_normal.txtar b/gno.land/pkg/integration/testdata/event_normal.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/event_normal.txtar rename to gno.land/pkg/integration/testdata/event_normal.txtar diff --git a/gno.land/cmd/gnoland/testdata/float_arg.txtar b/gno.land/pkg/integration/testdata/float_arg.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/float_arg.txtar rename to gno.land/pkg/integration/testdata/float_arg.txtar diff --git a/gno.land/cmd/gnoland/testdata/genesis_params.txtar b/gno.land/pkg/integration/testdata/genesis_params.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/genesis_params.txtar rename to gno.land/pkg/integration/testdata/genesis_params.txtar diff --git a/gno.land/cmd/gnoland/testdata/ghverify.txtar b/gno.land/pkg/integration/testdata/ghverify.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/ghverify.txtar rename to gno.land/pkg/integration/testdata/ghverify.txtar diff --git a/gno.land/cmd/gnoland/testdata/gnokey_simulate.txtar b/gno.land/pkg/integration/testdata/gnokey_simulate.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/gnokey_simulate.txtar rename to gno.land/pkg/integration/testdata/gnokey_simulate.txtar diff --git a/gno.land/cmd/gnoland/testdata/gnoweb_airgapped.txtar b/gno.land/pkg/integration/testdata/gnoweb_airgapped.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/gnoweb_airgapped.txtar rename to gno.land/pkg/integration/testdata/gnoweb_airgapped.txtar diff --git a/gno.land/cmd/gnoland/testdata/grc20_invalid_address.txtar b/gno.land/pkg/integration/testdata/grc20_invalid_address.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/grc20_invalid_address.txtar rename to gno.land/pkg/integration/testdata/grc20_invalid_address.txtar diff --git a/gno.land/cmd/gnoland/testdata/grc20_registry.txtar b/gno.land/pkg/integration/testdata/grc20_registry.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/grc20_registry.txtar rename to gno.land/pkg/integration/testdata/grc20_registry.txtar diff --git a/gno.land/cmd/gnoland/testdata/grc721_emit.txtar b/gno.land/pkg/integration/testdata/grc721_emit.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/grc721_emit.txtar rename to gno.land/pkg/integration/testdata/grc721_emit.txtar diff --git a/gno.land/cmd/gnoland/testdata/initctx.txtar b/gno.land/pkg/integration/testdata/initctx.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/initctx.txtar rename to gno.land/pkg/integration/testdata/initctx.txtar diff --git a/gno.land/cmd/gnoland/testdata/issue_1167.txtar b/gno.land/pkg/integration/testdata/issue_1167.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/issue_1167.txtar rename to gno.land/pkg/integration/testdata/issue_1167.txtar diff --git a/gno.land/cmd/gnoland/testdata/issue_1588.txtar b/gno.land/pkg/integration/testdata/issue_1588.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/issue_1588.txtar rename to gno.land/pkg/integration/testdata/issue_1588.txtar diff --git a/gno.land/cmd/gnoland/testdata/issue_1786.txtar b/gno.land/pkg/integration/testdata/issue_1786.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/issue_1786.txtar rename to gno.land/pkg/integration/testdata/issue_1786.txtar diff --git a/gno.land/cmd/gnoland/testdata/issue_2283.txtar b/gno.land/pkg/integration/testdata/issue_2283.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/issue_2283.txtar rename to gno.land/pkg/integration/testdata/issue_2283.txtar diff --git a/gno.land/cmd/gnoland/testdata/issue_2283_cacheTypes.txtar b/gno.land/pkg/integration/testdata/issue_2283_cacheTypes.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/issue_2283_cacheTypes.txtar rename to gno.land/pkg/integration/testdata/issue_2283_cacheTypes.txtar diff --git a/gno.land/cmd/gnoland/testdata/issue_gnochess_97.txtar b/gno.land/pkg/integration/testdata/issue_gnochess_97.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/issue_gnochess_97.txtar rename to gno.land/pkg/integration/testdata/issue_gnochess_97.txtar diff --git a/gno.land/cmd/gnoland/testdata/maketx_call_pure.txtar b/gno.land/pkg/integration/testdata/maketx_call_pure.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/maketx_call_pure.txtar rename to gno.land/pkg/integration/testdata/maketx_call_pure.txtar diff --git a/gno.land/cmd/gnoland/testdata/map_delete.txtar b/gno.land/pkg/integration/testdata/map_delete.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/map_delete.txtar rename to gno.land/pkg/integration/testdata/map_delete.txtar diff --git a/gno.land/cmd/gnoland/testdata/map_storage.txtar b/gno.land/pkg/integration/testdata/map_storage.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/map_storage.txtar rename to gno.land/pkg/integration/testdata/map_storage.txtar diff --git a/gno.land/cmd/gnoland/testdata/panic.txtar b/gno.land/pkg/integration/testdata/panic.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/panic.txtar rename to gno.land/pkg/integration/testdata/panic.txtar diff --git a/gno.land/cmd/gnoland/testdata/params.txtar b/gno.land/pkg/integration/testdata/params.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/params.txtar rename to gno.land/pkg/integration/testdata/params.txtar diff --git a/gno.land/cmd/gnoland/testdata/prevrealm.txtar b/gno.land/pkg/integration/testdata/prevrealm.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/prevrealm.txtar rename to gno.land/pkg/integration/testdata/prevrealm.txtar diff --git a/gno.land/cmd/gnoland/testdata/realm_banker_issued_coin_denom.txtar b/gno.land/pkg/integration/testdata/realm_banker_issued_coin_denom.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/realm_banker_issued_coin_denom.txtar rename to gno.land/pkg/integration/testdata/realm_banker_issued_coin_denom.txtar diff --git a/gno.land/cmd/gnoland/testdata/restart_missing_type.txtar b/gno.land/pkg/integration/testdata/restart_missing_type.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/restart_missing_type.txtar rename to gno.land/pkg/integration/testdata/restart_missing_type.txtar diff --git a/gno.land/cmd/gnoland/testdata/restart_nonval.txtar b/gno.land/pkg/integration/testdata/restart_nonval.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/restart_nonval.txtar rename to gno.land/pkg/integration/testdata/restart_nonval.txtar diff --git a/gno.land/cmd/gnoland/testdata/run.txtar b/gno.land/pkg/integration/testdata/run.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/run.txtar rename to gno.land/pkg/integration/testdata/run.txtar diff --git a/gno.land/cmd/gnoland/testdata/simulate_gas.txtar b/gno.land/pkg/integration/testdata/simulate_gas.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/simulate_gas.txtar rename to gno.land/pkg/integration/testdata/simulate_gas.txtar diff --git a/gno.land/cmd/gnoland/testdata/time_simple.txtar b/gno.land/pkg/integration/testdata/time_simple.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/time_simple.txtar rename to gno.land/pkg/integration/testdata/time_simple.txtar diff --git a/gno.land/cmd/gnoland/testdata/wugnot.txtar b/gno.land/pkg/integration/testdata/wugnot.txtar similarity index 100% rename from gno.land/cmd/gnoland/testdata/wugnot.txtar rename to gno.land/pkg/integration/testdata/wugnot.txtar From b9aedb126846d6bcf2ad6ce2e2920ff813df7891 Mon Sep 17 00:00:00 2001 From: Alexis Colin Date: Fri, 20 Dec 2024 06:50:02 +0900 Subject: [PATCH 05/18] style: various gnoweb fix after revamp (#3376) Continue fixing the issues reported in #3355 mainly: - Colors a11y issues - Directory layout - Copy btn style - code element font-size to follow parent's one --- gno.land/pkg/gnoweb/components/directory.gohtml | 9 ++++----- gno.land/pkg/gnoweb/components/help.gohtml | 2 +- gno.land/pkg/gnoweb/components/index.gohtml | 2 +- gno.land/pkg/gnoweb/components/source.gohtml | 8 ++++---- gno.land/pkg/gnoweb/frontend/css/input.css | 2 +- gno.land/pkg/gnoweb/public/styles.css | 2 +- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/gno.land/pkg/gnoweb/components/directory.gohtml b/gno.land/pkg/gnoweb/components/directory.gohtml index 4cdeff12a38..2254886f7af 100644 --- a/gno.land/pkg/gnoweb/components/directory.gohtml +++ b/gno.land/pkg/gnoweb/components/directory.gohtml @@ -1,15 +1,14 @@ {{ define "renderDir" }}
-
- +
{{ $pkgpath := .PkgPath }} -
-
+
+

{{ $pkgpath }}

-
+
Directory · {{ .FileCounter }} Files
diff --git a/gno.land/pkg/gnoweb/components/help.gohtml b/gno.land/pkg/gnoweb/components/help.gohtml index 1ea8ba1927a..535cb56e9d6 100644 --- a/gno.land/pkg/gnoweb/components/help.gohtml +++ b/gno.land/pkg/gnoweb/components/help.gohtml @@ -89,7 +89,7 @@

Command

-
-
+
diff --git a/gno.land/pkg/gnoweb/components/source.gohtml b/gno.land/pkg/gnoweb/components/source.gohtml index 20e710ca29b..cb2430b504a 100644 --- a/gno.land/pkg/gnoweb/components/source.gohtml +++ b/gno.land/pkg/gnoweb/components/source.gohtml @@ -5,10 +5,10 @@

{{ .FileName }}

-
- {{ .FileSize }} · {{ .FileLines }} lines -