Skip to content

chore(deps): migrate to sypl v2 - #12

Merged
thalesfsp merged 1 commit into
mainfrom
chore/sypl-v2
Jul 14, 2026
Merged

chore(deps): migrate to sypl v2#12
thalesfsp merged 1 commit into
mainfrom
chore/sypl-v2

Conversation

@thalesfsp

Copy link
Copy Markdown
Owner

What

Migrates dal (module github.com/thalesfsp/dal/v2) from sypl v1 to sypl v2.

  • Rewrites every sypl import to the /v2 module path (base sypl, plus fields, formatter, level, output, processor).
  • go.mod: requires github.com/thalesfsp/sypl/v2 v2.0.0 directly; drops the v1 direct dependency. sypl v1 now appears only as an // indirect entry, pulled transitively by github.com/thalesfsp/concurrentloop (which has not migrated yet).

Scope / why it's a clean mechanical migration

dal uses only sypl's core surface — sypl.New, output.Console, level.*, processor.*, formatter.Text, fields.Fields. It touches none of v2's three breaking changes:

  • No ElasticSearch outputs (output.ElasticSearch* / sypl's elasticsearch package) → the new es/v2 submodule is not needed. dal's own elasticsearch/ package is its storage adapter over go-elasticsearch and is unrelated to sypl.
  • No numeric level literals / FromInt → unaffected by the Warn/Info reordering.
  • No removed APIs (SetName, GetProcessor, SetContent, SetLevel, AnyMaxLevel, SetBuiltinLogger, debug.Match*).

Verification (local, macOS)

  • go build ./... and go vet ./...: clean.
  • go test -short -race ./... (ENVIRONMENT=testing, the default Make test target): all packages pass except file's TestFile_CreateIfNotExistDoesNotLeakFDs, which is a pre-existing macOS-only failure — it reads /proc/self/fd (Linux procfs, absent on Darwin). Verified identical on unmodified origin/main; it passes on Linux CI. Not a regression from this change.
  • Integration tests (mongodb, redis, elasticsearch, postgres, sftp) self-skip under ENVIRONMENT=testing and were not run locally (no databases stood up). CI exercises them.

Downstream impact

Tagging a new dal release after this merges lets downstream consumers (e.g. etler, which flagged dal as its remaining v1 source) evict sypl v1 from their direct module graphs.

Rewrite all sypl imports to the `/v2` module path and update go.mod to
require `github.com/thalesfsp/sypl/v2 v2.0.0` directly, dropping the v1
direct dependency (v1 now lingers only as an indirect via concurrentloop).

dal uses only sypl's core surface (sypl.New, output.Console, level,
processor, formatter, fields) — no ElasticSearch outputs, no removed
APIs, and no numeric level literals — so this is a pure import-path
migration. dal's own elasticsearch/ storage adapter (go-elasticsearch)
is unrelated to sypl and untouched.
@thalesfsp
thalesfsp merged commit 598316f into main Jul 14, 2026
1 check passed
@thalesfsp
thalesfsp deleted the chore/sypl-v2 branch July 14, 2026 04:45
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