Skip to content

v1.1.0

Latest

Choose a tag to compare

@ryboe ryboe released this 28 Nov 04:00

Highlights

Zero External Dependencies

q now has zero external dependencies. The formatting, indentation, and map-key sorting logic previously pulled from github.com/kr/pretty, github.com/kr/text, and github.com/rogpeppe/go-internal has been inlined into internal/pretty with full license attribution, removing go.sum and vendor/ (#154, #155). Sorting maps with unsafe.Pointer keys is also now supported cleanly (#155).

Go Modules Required

Legacy GO111MODULE=off / $GOPATH/src/q (import "q") installation is no longer supported. Install via Go modules with go get github.com/ryboe/q and import "github.com/ryboe/q" (#157).

Bug Fixes

  • Multi-line calls preserve argument names: Match the call's opening parenthesis (call.Lparen) line rather than its closing line so multi-line q.Q(...) calls keep name=value labels (#147).
  • Same-line ambiguity handling: Omit argument names when multiple q.Q() calls appear on the same line instead of printing mismatched labels (#148).
  • Avoid false matches on local q variables: Check the .Q selector in isQPackage so method calls like q.Get(key) on a variable named q aren't treated as q.Q() calls (#149).
  • Fix re-entrant GoString() deadlock: Format arguments and parse caller source outside the logger mutex, preventing deadlocks when a GoString() implementation calls q.Q() and reducing lock contention under concurrency (#150).
  • Handle unavailable caller info cleanly: Initialize the logger start time and emit a [HH:MM:SS] header when runtime.Caller fails (e.g., invalid CallDepth), preventing saturated (~292-year) elapsed timestamps and keeping unknown-caller entries in their own group (#151).

Docs & Maintenance

  • Update README.md and doc.go for Go module installation (#157), add Zed snippet / drop Atom snippet (#144), remove the Go Report Card badge (#156), and format Markdown docs and VS Code config (#158).
  • Harden and modernize CI workflows: target main and PRs in CodeQL, add govulncheck, and update linting/Dependabot configuration (#143, #144, #145, #153).

Full Changelog: v1.0.26...v1.1.0