Skip to content

chore(deps): bump go-logr/logr to v1.2.4#46

Open
moralpriest wants to merge 1 commit into
DEROFDN:community-devfrom
moralpriest:chore/deps/logr-v1.2.4
Open

chore(deps): bump go-logr/logr to v1.2.4#46
moralpriest wants to merge 1 commit into
DEROFDN:community-devfrom
moralpriest:chore/deps/logr-v1.2.4

Conversation

@moralpriest

Copy link
Copy Markdown

Summary

Vendored dependency bump (prep for eventual Go toolchain bump). Replaces the pre-release v1.0.0-rc1 of github.com/go-logr/logr with the stable v1.2.4.

go-logr/logr is the structured-logging interface used by all 21 DERO components (CORE, MEMPOOL, REGPOOL, p2p, wallet, miner, explorer, xswd, etc.). Each component declares var logger logr.Logger and gets the zap-backed logger via globals.Logger.WithName(...). The concrete backend (zap) is bridged through go-logr/zapr at globals/globals.go:182. This bump modernizes the interface only — no behavior change.

Why this is safe (one-at-a-time dep bump)

  • Self-contained: v1.2.4 has no require directives; go directive is 1.16 (<= our go 1.17). Clean standalone PR.
  • API unchanged: the Logger interface (Enabled/Info/Error/V/WithName/New) and logr.Discard() are unchanged between rc1 and v1.2.4 (stabilized at v1.0.0).
  • zapr compatibility: the vendored go-logr/zapr go.mod already requires logr v1.1.0 — v1.2.4 is backward-compatible, so no zapr bump needed.
  • New files: funcr/ package (a built-in test LogSink, unused by DERO) + testing/, testr/, examples/ subpackages and their tests.

Verification

  • go build ./... — green (exit 0).
  • go vet ./globals/... ./blockchain/... — only pre-existing unreachable-code warnings (idiom, untouched).
  • Smoke test: built derod + dero-miner, ran derod --testnet. The logr->zapr wiring works — CORE/MEMPOOL/REGPOOL loggers emit INFO/DEBUG via WithName and V(n).

Not consensus-critical (logging interface only); no PoW impact.

Notes / follow-ups

  • Remaining go<=1.17 vendored-dep candidates are now exhausted (xxhash skipped: import-path/module mismatch, consensus-critical; socks5 skipped: pseudo-version only; lumberjack no-op). Next phase is go 1.18+ deps (go-logr/zapr v1.3.0, etc.) or the final go-directive bump.
  • ConnectRPC feature work remains stashed pending dependency-env repair.

Replace vendored pre-release v1.0.0-rc1 with stable v1.2.4.

- Self-contained, no new requires, go 1.16 (<= go 1.17 directive)
- Logger interface (Enabled/Info/Error/V/WithName/New/Discard) unchanged
- logr.Discard() preserved; zapr adapter (requires logr v1.1.0) compatible
- Adds funcr/ testing sink (unused by DERO) + subpackages
- Verified: go build ./... green, derod --testnet starts and logs via
  zapr->logr wiring (CORE/MEMPOOL/REGPOOL loggers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant