Conversation
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Chengxuan
marked this pull request as draft
September 10, 2026 14:51
Contributor
Author
|
Hold on for this upgrade as it will change developer toolings and affect the wider firefly ecosystem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both tools needed major version bumps.
golangci-lintwas pinned at v1.64.8, the last v1 release (the project has fully moved to v2, which uses a new config schema).mockerywas installed fromgithub.com/vektra/mockery/cmd/mockery@latest, an unversioned v1 import path that's frozen years behind current releases. Neither had a version left to bump within their existing major, so this does both migrations together.They're bundled in one PR because the mockery jump is what makes the golangci-lint jump safe to verify: golangci-lint v2's
staticcheck(merged withgosimple/stylecheck) flags a few things in the mock output as generated code changes shape, and running the fullmake lint && make testcycle once, on the final state of both tools, is the only way to be confident neither upgrade silently broke the other's assumptions. Splitting them would mean landing a golangci-lint config rewrite that's only really been exercised against soon-to-be-replaced mocks, or landing a mock rewrite that hasn't been linted with the tool version it'll actually ship next to.Changes
.golangci.yml: migrated to the v2 config schema (viagolangci-lint migrate), same linter set preserved (v2 mergesgosimple/stylecheckintostaticcheck;errcheck/govet/ineffassign/unusedare default-enabled in v2 and no longer need listing)..mockery.yml(new): v3 is config-driven, no CLI flags. Configured the same 4 interfaces (Backend,Subscription,Manager,BlockListener) at their existing output paths and package names, withunroll-variadic: trueto preserve v2's variadic-arg-flattening behavior (v3 defaults to passing them as a single slice, which broke two existing test suites'.On(...)expectations).Makefile:mockstarget now just runsmockery(config does the rest);lint/mockeryinstall targets bumped to v2.13.2 / v3.8.0.EXPECT()API, no test changes needed.staticcheck(QF1008): redundant embedded-field selectors (bl.BlockListenerConfig.X→bl.X) inexec_query.go,prepare_transaction.go,blocklistener.go,confirmation_reconciler.go,ethrpc.go.goconst: repeated JSON map-key string literals inpkg/ethrpcreplaced with shared constants (keyAddress,keyBlockHash,keyBlockNumber,keyHash,keyLogsBloom,keyNumber,keyTransactionIndex).Test plan
make lint— 0 issuesmake test— all packages passmockeryrun twice produces identical output)make mocksworks from a clean toolchain (binaries removed and reinstalled)🤖 Generated with Claude Code and then edited to make the wordings clear