Repository navigation
chore: upgrade ecp to v0.3.0 - #4
Merged
Merged
Conversation
No source change is needed: the hooks this package installs, BuildKey and LookupValue, keep their names and signatures. The release fixes two panics reachable from a flag value, a named type slice ([]Level) and a pointer to a named type (*time.Duration), an unbounded exponent expansion that could hang startup for minutes on a value like 1e1000000, and a `-` tag being bound to a real key. Behaviour is unchanged. The example prints byte-for-byte the same output across no flags, a full set of flags, -h, an empty flag value, a bool default turned off, a `3d` duration and a `1e3` number. Tests: TestGua only checked that parsing does not fail, so an upgrade could break every parsed value without failing it. Added TestParseFlags, which parses a real flag set and asserts the results, and TestParseDefaults. go.mod moves to go 1.19, the version ecp requires. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wrfly
force-pushed
the
chore/upgrade-ecp-0.3.0
branch
from
August 19, 2026 16:04
227256b to
1676595
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
ecpfrom v0.2.3 to v0.3.0.No source change needed
The hooks this package installs —
BuildKeyandLookupValue— keep their names and signatures, so the upgrade is ago.modbump.What it fixes for gua
All of these are reachable from a flag value:
[]Level) and a pointer to a named type (*time.Duration)1e1000000-style numbers — an unbounded exponent expansion that spent ~100s building a 1MB string before failingname:"-"— a-tag was still bound to a real keyVerification
example/prints byte-for-byte identical output before and after, across all eight scenarios: no flags; the full flag set (-nnnnname -age -extra.loc -extra.debug -sliceint -time -type);-husage;-extra.valid=false(booldefault:"true"turned off);-nnnnname ""(empty flag value);-slice "a b c";-time 3d;-age 1e3.Tests
TestGuaonly asserted that parsing does not return an error — an upgrade could have broken every parsed value without failing it. Added:TestParseFlags— parses a real flag set and asserts the results, including adefault:"true"bool turned off from the command line, a string slice, a3dduration and a nested keyTestParseDefaults— defaults survive when no flag is givenCompatibility
gua's own API is unchanged.go.modmoves togo 1.19, the versionecprequires — the only thing consumers need to care about.🤖 Generated with Claude Code