compose-go/dotenv/parser.go
Nicolas De Loof 6ac9323ede Revert the Logger option: warnings go through the global logrus logger again
Routing the warnings to a logging.Logger given by the caller cannot be
complete without new variants of the exported functions that warn (dotenv,
types.Project, paths...), and doubling the exported API for it is a bigger
cost than the benefit. The warnings are written to the standard logrus
logger again, as they were before the Logger option.

This reverts, in order:
- 0a2be5d feat: route more warnings to the configured Logger
- 85a97c0 cli: add WithLogger to route project discovery and loading warnings
- 0481a82 loader: add Options.Logger to route loading warnings
- 414395c template: let callers route the unset variable warning to a logger

and e24266a template: WithoutLogging also silences nested substitutions,
which only made sense with the Logger option: template.go goes back to its
state before 414395c, and the fuzz test of the template package to its state
before e24266a. The version conformance test now reads the warning from the
standard logrus logger instead of Options.Logger.

The type casts of the interpolation stay built for each load, as they have been
while the Logger option existed, rather than shared again through a package
level map that a caller could alter for every other load.

None of these commits belongs to a release.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-25 14:08:20 +01:00

296 lines
6.9 KiB