Skip to content

fix(deps): adopt the rewritten logger via forge v1.11.0 - #108

Closed
juicycleff wants to merge 1 commit into
mainfrom
chore/adopt-new-logger-v2
Closed

juicycleff wants to merge 1 commit into
mainfrom
chore/adopt-new-logger-v2

Conversation

@juicycleff

Copy link
Copy Markdown
Contributor

Moves authsome to forge v1.11.0 and go-utils v1.3.0.

authsome was the last repository blocked on the go-utils logger rewrite, and
not by its own code. It pulls forge from the proxy, and the published
forge@v1.9.11's internal/logger references symbols v1.3.0 removed, so
bumping go-utils alone failed:

forge@v1.9.11/internal/logger/exports.go: undefined: log.FormatConfig

forge v1.11.0 carries the rewritten internal/logger, so both move together.

No API changes were needed

authsome uses almost none of the surface that changed. Its single
NewBeautifulLogger call still works through a deprecated shim; it now reads
log.New(log.Config{Name: "authsome"}), because an example is the wrong place
to demonstrate a deprecated constructor.

What changes at runtime

Log output picks its own format: a terminal gets aligned coloured columns,
anything else gets JSON, FORGE_LOG_FORMAT overrides both, and a go test
binary stays quiet unless -v is passed.

Three files: go.mod, go.sum, and the one example line. 98 packages build
and test clean.

Titled fix(deps) rather than chore deliberately, so the bump actually
releases. A chore subject would land it and leave consumers resolving the old
forge.

Moves to forge v1.11.0 and go-utils v1.3.0. authsome was blocked on this and
not by its own code: it pulled a published forge whose internal/logger
referenced symbols go-utils v1.3.0 removed, so bumping go-utils alone failed
with

  forge@v1.9.11/internal/logger/exports.go: undefined: log.FormatConfig

forge v1.11.0 carries the rewritten internal/logger, so both move together.

No API changes were needed. authsome uses almost none of the surface that
changed, and its single NewBeautifulLogger call still works through a
deprecated shim. That call now reads log.New(log.Config{Name: "authsome"}),
since an example is the wrong place to demonstrate a deprecated constructor.

What changes at runtime: log output picks its own format. A terminal gets
aligned coloured columns, anything else gets JSON, FORGE_LOG_FORMAT overrides
both, and a go test binary stays quiet unless -v is passed.

Typed fix rather than chore so the bump actually releases.

98 packages build and test clean.
@juicycleff

Copy link
Copy Markdown
Contributor Author

Closing as stale. Its base predates four commits that have since landed, so
merging it now would revert them:

Concretely, it would undo #109's work, for example putting back

payload, _ := json.Marshal(j.Payload)

and dropping sdk/go/client_refresh.go entirely. git diff main HEAD shows
313 insertions against 1311 deletions, almost all of it reversal rather than
change. Its ci / Lint also still fails, because the branch predates the fix
that turned lint green.

The version bumps this PR carried are already on main via 2ceff13, so the
only thing still outstanding is the one-line example change, moving
_examples/standalone/main.go off the deprecated NewBeautifulLogger shim.
That is in #110, cut from current main.

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