Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dyff for openSUSE:Factory checked in at 2026-02-25 21:11:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dyff (Old) and /work/SRC/openSUSE:Factory/.dyff.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dyff" Wed Feb 25 21:11:05 2026 rev:17 rq:1335020 version:1.10.5 Changes: -------- --- /work/SRC/openSUSE:Factory/dyff/dyff.changes 2026-02-10 21:12:36.136014874 +0100 +++ /work/SRC/openSUSE:Factory/.dyff.new.1977/dyff.changes 2026-02-25 21:11:26.572328959 +0100 @@ -1,0 +2,11 @@ +Wed Feb 25 09:24:47 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 1.10.5: + * refactor: extract Colorizer interface for pluggable diff + coloring + * build(deps): bump golang.org/x/tools from 0.41.0 to 0.42.0 + * build(deps): bump golang.org/x/net from 0.49.0 to 0.50.0 + * build(deps): bump golang.org/x/mod from 0.32.0 to 0.33.0 + * build(deps): bump golang.org/x/text from 0.33.0 to 0.34.0 + +------------------------------------------------------------------- Old: ---- dyff-1.10.4.obscpio New: ---- dyff-1.10.5.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dyff.spec ++++++ --- /var/tmp/diff_new_pack.4Ojz1M/_old 2026-02-25 21:11:27.168353569 +0100 +++ /var/tmp/diff_new_pack.4Ojz1M/_new 2026-02-25 21:11:27.168353569 +0100 @@ -17,7 +17,7 @@ Name: dyff -Version: 1.10.4 +Version: 1.10.5 Release: 0 Summary: Diff tool for YAML files, and sometimes JSON License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.4Ojz1M/_old 2026-02-25 21:11:27.208355222 +0100 +++ /var/tmp/diff_new_pack.4Ojz1M/_new 2026-02-25 21:11:27.216355552 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/homeport/dyff</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v1.10.4</param> + <param name="revision">v1.10.5</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.4Ojz1M/_old 2026-02-25 21:11:27.244356707 +0100 +++ /var/tmp/diff_new_pack.4Ojz1M/_new 2026-02-25 21:11:27.248356873 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/homeport/dyff</param> - <param name="changesrevision">708c92dd1b184cca5aaba2b636eae5d97a0b52a0</param></service></servicedata> + <param name="changesrevision">0c7ba9461bf06f54f9527d9945c3f879efc76770</param></service></servicedata> (No newline at EOF) ++++++ dyff-1.10.4.obscpio -> dyff-1.10.5.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.4/go.mod new/dyff-1.10.5/go.mod --- old/dyff-1.10.4/go.mod 2026-02-09 10:52:46.000000000 +0100 +++ new/dyff-1.10.5/go.mod 2026-02-22 13:42:39.000000000 +0100 @@ -42,11 +42,11 @@ github.com/spf13/pflag v1.0.10 // indirect github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect - golang.org/x/mod v0.32.0 // indirect - golang.org/x/net v0.49.0 // indirect + golang.org/x/mod v0.33.0 // indirect + golang.org/x/net v0.50.0 // indirect golang.org/x/sync v0.19.0 // indirect golang.org/x/sys v0.41.0 // indirect - golang.org/x/term v0.39.0 // indirect - golang.org/x/text v0.33.0 // indirect - golang.org/x/tools v0.41.0 // indirect + golang.org/x/term v0.40.0 // indirect + golang.org/x/text v0.34.0 // indirect + golang.org/x/tools v0.42.0 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.4/go.sum new/dyff-1.10.5/go.sum --- old/dyff-1.10.4/go.sum 2026-02-09 10:52:46.000000000 +0100 +++ new/dyff-1.10.5/go.sum 2026-02-22 13:42:39.000000000 +0100 @@ -104,21 +104,21 @@ go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= -golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= +golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= -golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= -golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= -golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= -golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= -golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= +golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.4/pkg/dyff/colors.go new/dyff-1.10.5/pkg/dyff/colors.go --- old/dyff-1.10.4/pkg/dyff/colors.go 2026-02-09 10:52:46.000000000 +0100 +++ new/dyff-1.10.5/pkg/dyff/colors.go 2026-02-22 13:42:39.000000000 +0100 @@ -24,18 +24,42 @@ "fmt" "github.com/gonvenience/bunt" + "github.com/gonvenience/neat" "github.com/lucasb-eyer/go-colorful" ) +// Colorizer is the interface for applying colors to diff output. Implement this +// to replace the default bunt-based coloring with an alternative (e.g. ANSI). +type Colorizer interface { + Green(text string) string + Greenf(format string, a ...interface{}) string + Red(text string) string + Redf(format string, a ...interface{}) string + Yellowf(format string, a ...interface{}) string + LightGreen(text string) string + LightRed(text string) string + DimGray(text string) string + Bold(text string) string + Italic(text string) string + BoldGreen(text string) string + BoldRed(text string) string + StylizeHeader(header string) string + YAMLInRedishColors(input interface{}, useIndentLines bool) (string, error) + YAMLInGreenishColors(input interface{}, useIndentLines bool) (string, error) +} + +// BuntColorizer is the default Colorizer using bunt and go-colorful. +type BuntColorizer struct{} + var ( - additionGreen = color("#58BF38") - modificationYellow = color("#C7C43F") - removalRed = color("#B9311B") + additionGreen = hexColor("#58BF38") + modificationYellow = hexColor("#C7C43F") + removalRed = hexColor("#B9311B") ) -func color(hex string) colorful.Color { - color, _ := colorful.Hex(hex) - return color +func hexColor(hex string) colorful.Color { + c, _ := colorful.Hex(hex) + return c } func render(format string, a ...interface{}) string { @@ -46,62 +70,121 @@ return fmt.Sprintf(format, a...) } -func green(text string) string { +func colored(color colorful.Color, text string) string { + return bunt.Style(text, + bunt.EachLine(), + bunt.Foreground(color), + ) +} + +func coloredf(color colorful.Color, format string, a ...interface{}) string { + return bunt.Style(render(format, a...), + bunt.EachLine(), + bunt.Foreground(color), + ) +} + +func defaultColorizer() Colorizer { + return &BuntColorizer{} +} + +func (c *BuntColorizer) Green(text string) string { return colored(additionGreen, text) } -func greenf(format string, a ...interface{}) string { +func (c *BuntColorizer) Greenf(format string, a ...interface{}) string { return coloredf(additionGreen, format, a...) } -func red(text string) string { +func (c *BuntColorizer) Red(text string) string { return colored(removalRed, text) } -func redf(format string, a ...interface{}) string { +func (c *BuntColorizer) Redf(format string, a ...interface{}) string { return coloredf(removalRed, format, a...) } -func yellowf(format string, a ...interface{}) string { +func (c *BuntColorizer) Yellowf(format string, a ...interface{}) string { return coloredf(modificationYellow, format, a...) } -func lightgreen(text string) string { +func (c *BuntColorizer) LightGreen(text string) string { return colored(bunt.LightGreen, text) } -func lightred(text string) string { +func (c *BuntColorizer) LightRed(text string) string { return colored(bunt.LightSalmon, text) } -func dimgray(text string) string { +func (c *BuntColorizer) DimGray(text string) string { return colored(bunt.DimGray, text) } -func bold(text string) string { +func (c *BuntColorizer) Bold(text string) string { return bunt.Style(text, bunt.EachLine(), bunt.Bold(), ) } -func italic(text string) string { +func (c *BuntColorizer) Italic(text string) string { return bunt.Style(text, bunt.EachLine(), bunt.Italic(), ) } -func colored(color colorful.Color, text string) string { - return bunt.Style(text, - bunt.EachLine(), - bunt.Foreground(color), - ) +func (c *BuntColorizer) BoldGreen(text string) string { + return c.Bold(c.Green(text)) } -func coloredf(color colorful.Color, format string, a ...interface{}) string { - return bunt.Style(render(format, a...), - bunt.EachLine(), - bunt.Foreground(color), +func (c *BuntColorizer) BoldRed(text string) string { + return c.Bold(c.Red(text)) +} + +func (c *BuntColorizer) StylizeHeader(header string) string { + return bunt.Style( + header, + bunt.ForegroundFunc(func(x int, _ int, _ rune) *colorful.Color { + switch { + case x < 7: + return &colorful.Color{R: .45, G: .71, B: .30} + case x < 13: + return &colorful.Color{R: .79, G: .76, B: .38} + case x < 21: + return &colorful.Color{R: .65, G: .17, B: .17} + } + return nil + }), ) } + +func (c *BuntColorizer) YAMLInRedishColors(input interface{}, useIndentLines bool) (string, error) { + return neat.NewOutputProcessor(useIndentLines, true, &map[string]colorful.Color{ + "keyColor": bunt.FireBrick, + "indentLineColor": {R: 0.2, G: 0, B: 0}, + "scalarDefaultColor": bunt.LightCoral, + "boolColor": bunt.LightCoral, + "floatColor": bunt.LightCoral, + "intColor": bunt.LightCoral, + "multiLineTextColor": bunt.DarkSalmon, + "nullColor": bunt.Salmon, + "emptyStructures": bunt.LightSalmon, + "dashColor": bunt.FireBrick, + }).ToYAML(input) +} + +func (c *BuntColorizer) YAMLInGreenishColors(input interface{}, useIndentLines bool) (string, error) { + return neat.NewOutputProcessor(useIndentLines, true, &map[string]colorful.Color{ + "keyColor": bunt.Green, + "indentLineColor": {R: 0, G: 0.2, B: 0}, + "scalarDefaultColor": bunt.LimeGreen, + "boolColor": bunt.LimeGreen, + "floatColor": bunt.LimeGreen, + "intColor": bunt.LimeGreen, + "multiLineTextColor": bunt.OliveDrab, + "nullColor": bunt.Olive, + "emptyStructures": bunt.DarkOliveGreen, + "dashColor": bunt.Green, + }).ToYAML(input) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.4/pkg/dyff/output.go new/dyff-1.10.5/pkg/dyff/output.go --- old/dyff-1.10.4/pkg/dyff/output.go 2026-02-09 10:52:46.000000000 +0100 +++ new/dyff-1.10.5/pkg/dyff/output.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,57 +0,0 @@ -// Copyright © 2019 The Homeport Team -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package dyff - -import ( - "github.com/gonvenience/bunt" - "github.com/gonvenience/neat" - "github.com/lucasb-eyer/go-colorful" -) - -func yamlStringInRedishColors(input interface{}, useIndentLines bool) (string, error) { - return neat.NewOutputProcessor(useIndentLines, true, &map[string]colorful.Color{ - "keyColor": bunt.FireBrick, - "indentLineColor": {R: 0.2, G: 0, B: 0}, - "scalarDefaultColor": bunt.LightCoral, - "boolColor": bunt.LightCoral, - "floatColor": bunt.LightCoral, - "intColor": bunt.LightCoral, - "multiLineTextColor": bunt.DarkSalmon, - "nullColor": bunt.Salmon, - "emptyStructures": bunt.LightSalmon, - "dashColor": bunt.FireBrick, - }).ToYAML(input) -} - -func yamlStringInGreenishColors(input interface{}, useIndentLines bool) (string, error) { - return neat.NewOutputProcessor(useIndentLines, true, &map[string]colorful.Color{ - "keyColor": bunt.Green, - "indentLineColor": {R: 0, G: 0.2, B: 0}, - "scalarDefaultColor": bunt.LimeGreen, - "boolColor": bunt.LimeGreen, - "floatColor": bunt.LimeGreen, - "intColor": bunt.LimeGreen, - "multiLineTextColor": bunt.OliveDrab, - "nullColor": bunt.Olive, - "emptyStructures": bunt.DarkOliveGreen, - "dashColor": bunt.Green, - }).ToYAML(input) -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.4/pkg/dyff/output_human.go new/dyff-1.10.5/pkg/dyff/output_human.go --- old/dyff-1.10.4/pkg/dyff/output_human.go 2026-02-09 10:52:46.000000000 +0100 +++ new/dyff-1.10.5/pkg/dyff/output_human.go 2026-02-22 13:42:39.000000000 +0100 @@ -38,7 +38,6 @@ "github.com/gonvenience/term" "github.com/gonvenience/text" "github.com/gonvenience/ytbx" - "github.com/lucasb-eyer/go-colorful" "github.com/sergi/go-diff/diffmatchpatch" "github.com/texttheater/golang-levenshtein/levenshtein" yamlv3 "go.yaml.in/yaml/v3" @@ -61,6 +60,14 @@ OmitHeader bool UseGoPatchPaths bool PrefixMultiline bool + Colorizer Colorizer +} + +func (report *HumanReport) colorizer() Colorizer { + if report.Colorizer != nil { + return report.Colorizer + } + return defaultColorizer() } // WriteReport writes a human readable report to the provided writer @@ -71,6 +78,8 @@ // Only show the document index if there is more than one document to show showPathRoot := len(report.From.Documents) > 1 + c := report.colorizer() + // Show banner if enabled if !report.OmitHeader { var header = fmt.Sprintf(` _ __ __ @@ -84,23 +93,7 @@ ytbx.HumanReadableLocationInformation(report.To), bunt.Style(text.Plural(len(report.Diffs), "difference"), bunt.Bold())) - _, _ = writer.WriteString(bunt.Style( - header, - bunt.ForegroundFunc(func(x int, _ int, _ rune) *colorful.Color { - switch { - case x < 7: - return &colorful.Color{R: .45, G: .71, B: .30} - - case x < 13: - return &colorful.Color{R: .79, G: .76, B: .38} - - case x < 21: - return &colorful.Color{R: .65, G: .17, B: .17} - } - - return nil - }), - )) + _, _ = writer.WriteString(c.StylizeHeader(header)) } // Loop over the diff and generate each report into the buffer @@ -163,29 +156,30 @@ func (report *HumanReport) generateHumanDetailOutputAddition(detail Detail) (string, error) { var output bytes.Buffer + c := report.colorizer() switch detail.To.Kind { case yamlv3.DocumentNode: - _, _ = fmt.Fprint(&output, yellowf("%c %s added:\n", + _, _ = fmt.Fprint(&output, c.Yellowf("%c %s added:\n", ADDITION, text.Plural(len(detail.To.Content), "document"), )) case yamlv3.SequenceNode: - _, _ = output.WriteString(yellowf("%c %s added:\n", + _, _ = output.WriteString(c.Yellowf("%c %s added:\n", ADDITION, text.Plural(len(detail.To.Content), "list entry", "list entries"), )) case yamlv3.MappingNode: - _, _ = output.WriteString(yellowf("%c %s added:\n", + _, _ = output.WriteString(c.Yellowf("%c %s added:\n", ADDITION, text.Plural(len(detail.To.Content)/2, "map entry", "map entries"), )) } ytbx.RestructureObject(detail.To) - yamlOutput, err := yamlStringInGreenishColors(detail.To, report.UseIndentLines) + yamlOutput, err := c.YAMLInGreenishColors(detail.To, report.UseIndentLines) if err != nil { return "", err } @@ -197,25 +191,26 @@ func (report *HumanReport) generateHumanDetailOutputRemoval(detail Detail) (string, error) { var output bytes.Buffer + c := report.colorizer() switch detail.From.Kind { case yamlv3.DocumentNode: - _, _ = fmt.Fprint(&output, yellowf("%c %s removed:\n", + _, _ = fmt.Fprint(&output, c.Yellowf("%c %s removed:\n", REMOVAL, text.Plural(len(detail.From.Content), "document"), )) case yamlv3.SequenceNode: text := text.Plural(len(detail.From.Content), "list entry", "list entries") - _, _ = output.WriteString(yellowf("%c %s removed:\n", REMOVAL, text)) + _, _ = output.WriteString(c.Yellowf("%c %s removed:\n", REMOVAL, text)) case yamlv3.MappingNode: text := text.Plural(len(detail.From.Content)/2, "map entry", "map entries") - _, _ = output.WriteString(yellowf("%c %s removed:\n", REMOVAL, text)) + _, _ = output.WriteString(c.Yellowf("%c %s removed:\n", REMOVAL, text)) } ytbx.RestructureObject(detail.From) - yamlOutput, err := yamlStringInRedishColors(detail.From, report.UseIndentLines) + yamlOutput, err := c.YAMLInRedishColors(detail.From, report.UseIndentLines) if err != nil { return "", err } @@ -227,6 +222,7 @@ func (report *HumanReport) generateHumanDetailOutputModification(detail Detail) (string, error) { var output bytes.Buffer + c := report.colorizer() fromType := humanReadableType(detail.From) toType := humanReadableType(detail.To) @@ -250,29 +246,29 @@ return "", err } - _, _ = output.WriteString(yellowf("%c content change\n", MODIFICATION)) + _, _ = output.WriteString(c.Yellowf("%c content change\n", MODIFICATION)) if report.PrefixMultiline { report.writeTextBlocks(&output, 0, - red(createStringWithContinuousPrefix("- ", hex.Dump(from), report.Indent)), - green(createStringWithContinuousPrefix("+ ", hex.Dump(to), report.Indent)), + c.Red(createStringWithContinuousPrefix("- ", hex.Dump(from), report.Indent)), + c.Green(createStringWithContinuousPrefix("+ ", hex.Dump(to), report.Indent)), ) } else { report.writeTextBlocks(&output, 0, - red(createStringWithPrefix("- ", hex.Dump(from), report.Indent)), - green(createStringWithPrefix("+ ", hex.Dump(to), report.Indent)), + c.Red(createStringWithPrefix("- ", hex.Dump(from), report.Indent)), + c.Green(createStringWithPrefix("+ ", hex.Dump(to), report.Indent)), ) } default: if fromType != toType { - _, _ = output.WriteString(yellowf("%c type change from %s to %s\n", + _, _ = output.WriteString(c.Yellowf("%c type change from %s to %s\n", MODIFICATION, - italic(fromType), - italic(toType), + c.Italic(fromType), + c.Italic(toType), )) } else { - _, _ = output.WriteString(yellowf("%c value change\n", + _, _ = output.WriteString(c.Yellowf("%c value change\n", MODIFICATION, )) } @@ -287,8 +283,8 @@ return "", err } - _, _ = output.WriteString(red(createStringWithPrefix("- ", strings.TrimRight(from, "\n"), report.Indent))) - _, _ = output.WriteString(green(createStringWithPrefix("+ ", strings.TrimRight(to, "\n"), report.Indent))) + _, _ = output.WriteString(c.Red(createStringWithPrefix("- ", strings.TrimRight(from, "\n"), report.Indent))) + _, _ = output.WriteString(c.Green(createStringWithPrefix("+ ", strings.TrimRight(to, "\n"), report.Indent))) } return output.String(), nil @@ -296,8 +292,9 @@ func (report *HumanReport) generateHumanDetailOutputOrderchange(detail Detail) (string, error) { var output bytes.Buffer + c := report.colorizer() - _, _ = output.WriteString(yellowf("%c order changed\n", ORDERCHANGE)) + _, _ = output.WriteString(c.Yellowf("%c order changed\n", ORDERCHANGE)) switch detail.From.Kind { case yamlv3.SequenceNode: asStringList := func(sequenceNode *yamlv3.Node) ([]string, error) { @@ -331,13 +328,13 @@ fromSingleLineLength := stringArrayLen(from) + ((len(from) - 1) * plainTextLength(singleLineSeparator)) toStringleLineLength := stringArrayLen(to) + ((len(to) - 1) * plainTextLength(singleLineSeparator)) if estimatedLength := max(fromSingleLineLength, toStringleLineLength); estimatedLength < threshold { - _, _ = output.WriteString(redf(strings.Repeat(" ", report.Indent)+"- %s\n", strings.Join(from, singleLineSeparator))) - _, _ = output.WriteString(greenf(strings.Repeat(" ", report.Indent)+"+ %s\n", strings.Join(to, singleLineSeparator))) + _, _ = output.WriteString(c.Redf(strings.Repeat(" ", report.Indent)+"- %s\n", strings.Join(from, singleLineSeparator))) + _, _ = output.WriteString(c.Greenf(strings.Repeat(" ", report.Indent)+"+ %s\n", strings.Join(to, singleLineSeparator))) } else { _, _ = output.WriteString(CreateTableStyleString(" ", 2, - red(strings.Join(from, "\n")), - green(strings.Join(to, "\n")))) + c.Red(strings.Join(from, "\n")), + c.Green(strings.Join(to, "\n")))) } } @@ -345,18 +342,19 @@ } func (report *HumanReport) writeStringDiff(output stringWriter, from string, to string) { + c := report.colorizer() fromCertText, toCertText, err := report.LoadX509Certs(from, to) switch { case err == nil: - _, _ = output.WriteString(yellowf("%c certificate change\n", MODIFICATION)) + _, _ = output.WriteString(c.Yellowf("%c certificate change\n", MODIFICATION)) _, _ = output.WriteString(report.highlightByLine(fromCertText, toCertText)) case isWhitespaceOnlyChange(from, to): - _, _ = output.WriteString(yellowf("%c whitespace only change\n", MODIFICATION)) + _, _ = output.WriteString(c.Yellowf("%c whitespace only change\n", MODIFICATION)) report.writeTextBlocks(output, 0, - red(createStringWithPrefix("- ", showWhitespaceCharacters(from), report.Indent)), - green(createStringWithPrefix("+ ", showWhitespaceCharacters(to), report.Indent)), + c.Red(createStringWithPrefix("- ", report.showWhitespaceCharacters(from), report.Indent)), + c.Green(createStringWithPrefix("+ ", report.showWhitespaceCharacters(to), report.Indent)), ) case isMultiLine(from, to): @@ -374,11 +372,11 @@ // color and format each diff by type switch d.Type { case diffmatchpatch.DiffInsert: - fmt.Fprint(&buf, green(createStringWithContinuousPrefix("+ ", d.Text, report.Indent))) + fmt.Fprint(&buf, c.Green(createStringWithContinuousPrefix("+ ", d.Text, report.Indent))) ins++ case diffmatchpatch.DiffDelete: - fmt.Fprint(&buf, red(createStringWithContinuousPrefix("- ", d.Text, report.Indent))) + fmt.Fprint(&buf, c.Red(createStringWithContinuousPrefix("- ", d.Text, report.Indent))) del++ case diffmatchpatch.DiffEqual: @@ -403,29 +401,30 @@ text.Plural((upper-lower), "line"), strings.Join(lines[upper:], "\n")) } - fmt.Fprint(&buf, dimgray(createStringWithContinuousPrefix(" ", val, report.Indent))) + fmt.Fprint(&buf, c.DimGray(createStringWithContinuousPrefix(" ", val, report.Indent))) } } _, _ = output.WriteString( - yellowf("%c value change in multiline text (%s, %s)\n", + c.Yellowf("%c value change in multiline text (%s, %s)\n", MODIFICATION, text.Plural(ins, "insert"), text.Plural(del, "deletion"))) _, _ = output.WriteString(buf.String()) _, _ = output.WriteString("\n") case isMinorChange(from, to, report.MinorChangeThreshold): - _, _ = output.WriteString(yellowf("%c value change\n", MODIFICATION)) + _, _ = output.WriteString(c.Yellowf("%c value change\n", MODIFICATION)) diffs := diffmatchpatch.New().DiffMain(from, to, false) - _, _ = output.WriteString(highlightRemovals(diffs, report.Indent)) - _, _ = output.WriteString(highlightAdditions(diffs, report.Indent)) + _, _ = output.WriteString(report.highlightRemovals(diffs, report.Indent)) + _, _ = output.WriteString(report.highlightAdditions(diffs, report.Indent)) default: - _, _ = output.WriteString(yellowf("%c value change\n", MODIFICATION)) - _, _ = output.WriteString(red(createStringWithPrefix("- ", from, report.Indent))) - _, _ = output.WriteString(green(createStringWithPrefix("+ ", to, report.Indent))) + _, _ = output.WriteString(c.Yellowf("%c value change\n", MODIFICATION)) + _, _ = output.WriteString(c.Red(createStringWithPrefix("- ", from, report.Indent))) + _, _ = output.WriteString(c.Green(createStringWithPrefix("+ ", to, report.Indent))) } } func (report *HumanReport) highlightByLine(from, to string) string { + c := report.colorizer() fromLines := strings.Split(from, "\n") toLines := strings.Split(to, "\n") @@ -434,29 +433,29 @@ if len(fromLines) == len(toLines) { for i := range fromLines { if fromLines[i] != toLines[i] { - fromLines[i] = red(fromLines[i]) - toLines[i] = green(toLines[i]) + fromLines[i] = c.Red(fromLines[i]) + toLines[i] = c.Green(toLines[i]) } else { - fromLines[i] = lightred(fromLines[i]) - toLines[i] = lightgreen(toLines[i]) + fromLines[i] = c.LightRed(fromLines[i]) + toLines[i] = c.LightGreen(toLines[i]) } } if report.PrefixMultiline { report.writeTextBlocks(&buf, 0, - createStringWithContinuousPrefix(redf("- "), strings.Join(fromLines, "\n"), report.Indent), - createStringWithContinuousPrefix(greenf("+ "), strings.Join(toLines, "\n"), report.Indent)) + createStringWithContinuousPrefix(c.Redf("- "), strings.Join(fromLines, "\n"), report.Indent), + createStringWithContinuousPrefix(c.Greenf("+ "), strings.Join(toLines, "\n"), report.Indent)) } else { report.writeTextBlocks(&buf, 0, - createStringWithPrefix(red("- "), strings.Join(fromLines, "\n"), report.Indent), - createStringWithPrefix(green("+ "), strings.Join(toLines, "\n"), report.Indent)) + createStringWithPrefix(c.Red("- "), strings.Join(fromLines, "\n"), report.Indent), + createStringWithPrefix(c.Green("+ "), strings.Join(toLines, "\n"), report.Indent)) } } else { report.writeTextBlocks(&buf, 0, - red(createStringWithPrefix("- ", from, report.Indent)), - green(createStringWithPrefix("+ ", to, report.Indent)), + c.Red(createStringWithPrefix("- ", from, report.Indent)), + c.Green(createStringWithPrefix("+ ", to, report.Indent)), ) } @@ -494,17 +493,18 @@ panic(fmt.Errorf("unknown and therefore unsupported kind %v", node.Kind)) } -func highlightRemovals(diffs []diffmatchpatch.Diff, indent int) string { +func (report *HumanReport) highlightRemovals(diffs []diffmatchpatch.Diff, indent int) string { + c := report.colorizer() var buf bytes.Buffer - buf.WriteString(redf("%s- ", strings.Repeat(" ", indent))) + buf.WriteString(c.Redf("%s- ", strings.Repeat(" ", indent))) for _, part := range diffs { switch part.Type { case diffmatchpatch.DiffEqual: - buf.WriteString(lightred(part.Text)) + buf.WriteString(c.LightRed(part.Text)) case diffmatchpatch.DiffDelete: - buf.WriteString(bold(red(part.Text))) + buf.WriteString(c.BoldRed(part.Text)) } } @@ -512,17 +512,18 @@ return buf.String() } -func highlightAdditions(diffs []diffmatchpatch.Diff, indent int) string { +func (report *HumanReport) highlightAdditions(diffs []diffmatchpatch.Diff, indent int) string { + c := report.colorizer() var buf bytes.Buffer - buf.WriteString(greenf("%s+ ", strings.Repeat(" ", indent))) + buf.WriteString(c.Greenf("%s+ ", strings.Repeat(" ", indent))) for _, part := range diffs { switch part.Type { case diffmatchpatch.DiffEqual: - buf.WriteString(lightgreen(part.Text)) + buf.WriteString(c.LightGreen(part.Text)) case diffmatchpatch.DiffInsert: - buf.WriteString(bold(green(part.Text))) + buf.WriteString(c.BoldGreen(part.Text)) } } @@ -639,13 +640,14 @@ return strings.Contains(from, "\n") || strings.Contains(to, "\n") } -func showWhitespaceCharacters(text string) string { +func (report *HumanReport) showWhitespaceCharacters(text string) string { + c := report.colorizer() return strings.ReplaceAll( strings.ReplaceAll(text, "\n", - bold("↵\n")), + c.Bold("↵\n")), " ", - bold("·"), + c.Bold("·"), ) } ++++++ dyff.obsinfo ++++++ --- /var/tmp/diff_new_pack.4Ojz1M/_old 2026-02-25 21:11:27.516367940 +0100 +++ /var/tmp/diff_new_pack.4Ojz1M/_new 2026-02-25 21:11:27.520368104 +0100 @@ -1,5 +1,5 @@ name: dyff -version: 1.10.4 -mtime: 1770630766 -commit: 708c92dd1b184cca5aaba2b636eae5d97a0b52a0 +version: 1.10.5 +mtime: 1771764159 +commit: 0c7ba9461bf06f54f9527d9945c3f879efc76770 ++++++ vendor.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/net/html/node.go new/vendor/golang.org/x/net/html/node.go --- old/vendor/golang.org/x/net/html/node.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/net/html/node.go 2026-02-22 13:42:39.000000000 +0100 @@ -11,6 +11,7 @@ // A NodeType is the type of a Node. type NodeType uint32 +//go:generate stringer -type NodeType const ( ErrorNode NodeType = iota TextNode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/net/html/nodetype_string.go new/vendor/golang.org/x/net/html/nodetype_string.go --- old/vendor/golang.org/x/net/html/nodetype_string.go 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/golang.org/x/net/html/nodetype_string.go 2026-02-22 13:42:39.000000000 +0100 @@ -0,0 +1,31 @@ +// Code generated by "stringer -type NodeType"; DO NOT EDIT. + +package html + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[ErrorNode-0] + _ = x[TextNode-1] + _ = x[DocumentNode-2] + _ = x[ElementNode-3] + _ = x[CommentNode-4] + _ = x[DoctypeNode-5] + _ = x[RawNode-6] + _ = x[scopeMarkerNode-7] +} + +const _NodeType_name = "ErrorNodeTextNodeDocumentNodeElementNodeCommentNodeDoctypeNodeRawNodescopeMarkerNode" + +var _NodeType_index = [...]uint8{0, 9, 17, 29, 40, 51, 62, 69, 84} + +func (i NodeType) String() string { + idx := int(i) - 0 + if i < 0 || idx >= len(_NodeType_index)-1 { + return "NodeType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _NodeType_name[_NodeType_index[idx]:_NodeType_index[idx+1]] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/go/ast/inspector/cursor.go new/vendor/golang.org/x/tools/go/ast/inspector/cursor.go --- old/vendor/golang.org/x/tools/go/ast/inspector/cursor.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/go/ast/inspector/cursor.go 2026-02-22 13:42:39.000000000 +0100 @@ -18,8 +18,11 @@ // // Two Cursors compare equal if they represent the same node. // -// Call [Inspector.Root] to obtain a valid cursor for the virtual root -// node of the traversal. +// The zero value of Cursor is not valid. +// +// Call [Inspector.Root] to obtain a cursor for the virtual root node +// of the traversal. This is the sole valid cursor for which [Cursor.Node] +// returns nil. // // Use the following methods to navigate efficiently around the tree: // - for ancestors, use [Cursor.Parent] and [Cursor.Enclosing]; @@ -37,7 +40,7 @@ index int32 // index of push node; -1 for virtual root node } -// Root returns a cursor for the virtual root node, +// Root returns a valid cursor for the virtual root node, // whose children are the files provided to [New]. // // Its [Cursor.Node] method return nil. @@ -61,14 +64,23 @@ return Cursor{in, index} } +// Valid reports whether the cursor is valid. +// The zero value of cursor is invalid. +// Unless otherwise documented, it is not safe to call +// any other method on an invalid cursor. +func (c Cursor) Valid() bool { + return c.in != nil +} + // Inspector returns the cursor's Inspector. +// It returns nil if the Cursor is not valid. func (c Cursor) Inspector() *Inspector { return c.in } // Index returns the index of this cursor position within the package. // // Clients should not assume anything about the numeric Index value // except that it increases monotonically throughout the traversal. -// It is provided for use with [At]. +// It is provided for use with [Inspector.At]. // // Index must not be called on the Root node. func (c Cursor) Index() int32 { @@ -89,7 +101,7 @@ // String returns information about the cursor's node, if any. func (c Cursor) String() string { - if c.in == nil { + if !c.Valid() { return "(invalid)" } if c.index < 0 { @@ -233,6 +245,18 @@ return unpackEdgeKindAndIndex(events[pop].parent) } +// ParentEdgeKind returns the kind component of the result of [Cursor.ParentEdge]. +func (c Cursor) ParentEdgeKind() edge.Kind { + ek, _ := c.ParentEdge() + return ek +} + +// ParentEdgeIndex returns the index component of the result of [Cursor.ParentEdge]. +func (c Cursor) ParentEdgeIndex() int { + _, index := c.ParentEdge() + return index +} + // ChildAt returns the cursor for the child of the // current node identified by its edge and index. // The index must be -1 if the edge.Kind is not a slice. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/go/ast/inspector/inspector.go new/vendor/golang.org/x/tools/go/ast/inspector/inspector.go --- old/vendor/golang.org/x/tools/go/ast/inspector/inspector.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/go/ast/inspector/inspector.go 2026-02-22 13:42:39.000000000 +0100 @@ -87,7 +87,7 @@ // Type can be recovered from the sole bit in typ. // [Tried this, wasn't faster. --adonovan] -// Preorder visits all the nodes of the files supplied to New in +// Preorder visits all the nodes of the files supplied to [New] in // depth-first order. It calls f(n) for each node n before it visits // n's children. // @@ -133,7 +133,7 @@ } } -// Nodes visits the nodes of the files supplied to New in depth-first +// Nodes visits the nodes of the files supplied to [New] in depth-first // order. It calls f(n, true) for each node n before it visits n's // children. If f returns true, Nodes invokes f recursively for each // of the non-nil children of the node, followed by a call of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/go/ast/inspector/iter.go new/vendor/golang.org/x/tools/go/ast/inspector/iter.go --- old/vendor/golang.org/x/tools/go/ast/inspector/iter.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/go/ast/inspector/iter.go 2026-02-22 13:42:39.000000000 +0100 @@ -12,13 +12,31 @@ ) // PreorderSeq returns an iterator that visits all the -// nodes of the files supplied to New in depth-first order. +// nodes of the files supplied to [New] in depth-first order. // It visits each node n before n's children. // The complete traversal sequence is determined by ast.Inspect. // -// The types argument, if non-empty, enables type-based -// filtering of events: only nodes whose type matches an -// element of the types slice are included in the sequence. +// The types argument, if non-empty, enables type-based filtering: +// only nodes whose type matches an element of the types slice are +// included in the sequence. +// +// Example: +// +// for call := range in.PreorderSeq((*ast.CallExpr)(nil)) { ... } +// +// The [All] function is more convenient if there is exactly one node type: +// +// for call := range All[*ast.CallExpr](in) { ... } +// +// See also the newer and more flexible [Cursor] API, which lets you +// start the traversal at an arbitrary node, and reports each matching +// node by its Cursor, enabling easier navigation. +// The above example would be written thus: +// +// for curCall := range in.Root().Preorder((*ast.CallExpr)(nil)) { +// call := curCall.Node().(*ast.CallExpr) +// ... +// } func (in *Inspector) PreorderSeq(types ...ast.Node) iter.Seq[ast.Node] { // This implementation is identical to Preorder, @@ -53,6 +71,16 @@ // Example: // // for call := range All[*ast.CallExpr](in) { ... } +// +// See also the newer and more flexible [Cursor] API, which lets you +// start the traversal at an arbitrary node, and reports each matching +// node by its Cursor, enabling easier navigation. +// The above example would be written thus: +// +// for curCall := range in.Root().Preorder((*ast.CallExpr)(nil)) { +// call := curCall.Node().(*ast.CallExpr) +// ... +// } func All[N interface { *S ast.Node diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/go/packages/packages.go new/vendor/golang.org/x/tools/go/packages/packages.go --- old/vendor/golang.org/x/tools/go/packages/packages.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/go/packages/packages.go 2026-02-22 13:42:39.000000000 +0100 @@ -284,6 +284,8 @@ } } + ld.externalDriver = external + return ld.refine(response) } @@ -692,10 +694,11 @@ type loader struct { pkgs map[string]*loaderPackage // keyed by Package.ID Config - sizes types.Sizes // non-nil if needed by mode - parseCache map[string]*parseValue - parseCacheMu sync.Mutex - exportMu sync.Mutex // enforces mutual exclusion of exportdata operations + sizes types.Sizes // non-nil if needed by mode + parseCache map[string]*parseValue + parseCacheMu sync.Mutex + exportMu sync.Mutex // enforces mutual exclusion of exportdata operations + externalDriver bool // true if an external GOPACKAGESDRIVER handled the request // Config.Mode contains the implied mode (see impliedLoadMode). // Implied mode contains all the fields we need the data for. @@ -1226,6 +1229,10 @@ } if lpkg.Module != nil && lpkg.Module.GoVersion != "" { tc.GoVersion = "go" + lpkg.Module.GoVersion + } else if ld.externalDriver && lpkg.goVersion != 0 { + // Module information is missing when GOPACKAGESDRIVER is used, + // so use the go version from the driver response. + tc.GoVersion = fmt.Sprintf("go1.%d", lpkg.goVersion) } if (ld.Mode & typecheckCgo) != 0 { if !typesinternal.SetUsesCgo(tc) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go new/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go --- old/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go 2026-02-22 13:42:39.000000000 +0100 @@ -29,7 +29,6 @@ "strconv" "strings" - "golang.org/x/tools/internal/aliases" "golang.org/x/tools/internal/typesinternal" ) @@ -281,10 +280,10 @@ T := o.Type() if alias, ok := T.(*types.Alias); ok { - if r := findTypeParam(obj, aliases.TypeParams(alias), path, opTypeParam); r != nil { + if r := findTypeParam(obj, alias.TypeParams(), path, opTypeParam); r != nil { return Path(r), nil } - if r := find(obj, aliases.Rhs(alias), append(path, opRhs)); r != nil { + if r := find(obj, alias.Rhs(), append(path, opRhs)); r != nil { return Path(r), nil } @@ -694,14 +693,11 @@ case opRhs: if alias, ok := t.(*types.Alias); ok { - t = aliases.Rhs(alias) - } else if false && aliases.Enabled() { - // The Enabled check is too expensive, so for now we - // simply assume that aliases are not enabled. - // + t = alias.Rhs() + } else if false { // Now that go1.24 is assured, we should be able to - // replace this with "if true {", but it causes tests - // to fail. TODO(adonovan): investigate. + // replace this with "if true {", but it causes objectpath + // tests to fail. TODO(adonovan): investigate. return nil, fmt.Errorf("cannot apply %q to %s (got %T, want alias)", code, t, t) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/aliases/aliases.go new/vendor/golang.org/x/tools/internal/aliases/aliases.go --- old/vendor/golang.org/x/tools/internal/aliases/aliases.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/aliases/aliases.go 2026-02-22 13:42:39.000000000 +0100 @@ -9,30 +9,10 @@ "go/types" ) -// Package aliases defines backward compatible shims -// for the types.Alias type representation added in 1.22. -// This defines placeholders for x/tools until 1.26. - -// NewAlias creates a new TypeName in Package pkg that +// New creates a new TypeName in Package pkg that // is an alias for the type rhs. -// -// The enabled parameter determines whether the resulting [TypeName]'s -// type is an [types.Alias]. Its value must be the result of a call to -// [Enabled], which computes the effective value of -// GODEBUG=gotypesalias=... by invoking the type checker. The Enabled -// function is expensive and should be called once per task (e.g. -// package import), not once per call to NewAlias. -// -// Precondition: enabled || len(tparams)==0. -// If materialized aliases are disabled, there must not be any type parameters. -func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type, tparams []*types.TypeParam) *types.TypeName { - if enabled { - tname := types.NewTypeName(pos, pkg, name, nil) - SetTypeParams(types.NewAlias(tname, rhs), tparams) - return tname - } - if len(tparams) > 0 { - panic("cannot create an alias with type parameters when gotypesalias is not enabled") - } - return types.NewTypeName(pos, pkg, name, rhs) +func New(pos token.Pos, pkg *types.Package, name string, rhs types.Type, tparams []*types.TypeParam) *types.TypeName { + tname := types.NewTypeName(pos, pkg, name, nil) + types.NewAlias(tname, rhs).SetTypeParams(tparams) + return tname } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go new/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go --- old/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,80 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package aliases - -import ( - "go/ast" - "go/parser" - "go/token" - "go/types" -) - -// Rhs returns the type on the right-hand side of the alias declaration. -func Rhs(alias *types.Alias) types.Type { - if alias, ok := any(alias).(interface{ Rhs() types.Type }); ok { - return alias.Rhs() // go1.23+ - } - - // go1.22's Alias didn't have the Rhs method, - // so Unalias is the best we can do. - return types.Unalias(alias) -} - -// TypeParams returns the type parameter list of the alias. -func TypeParams(alias *types.Alias) *types.TypeParamList { - if alias, ok := any(alias).(interface{ TypeParams() *types.TypeParamList }); ok { - return alias.TypeParams() // go1.23+ - } - return nil -} - -// SetTypeParams sets the type parameters of the alias type. -func SetTypeParams(alias *types.Alias, tparams []*types.TypeParam) { - if alias, ok := any(alias).(interface { - SetTypeParams(tparams []*types.TypeParam) - }); ok { - alias.SetTypeParams(tparams) // go1.23+ - } else if len(tparams) > 0 { - panic("cannot set type parameters of an Alias type in go1.22") - } -} - -// TypeArgs returns the type arguments used to instantiate the Alias type. -func TypeArgs(alias *types.Alias) *types.TypeList { - if alias, ok := any(alias).(interface{ TypeArgs() *types.TypeList }); ok { - return alias.TypeArgs() // go1.23+ - } - return nil // empty (go1.22) -} - -// Origin returns the generic Alias type of which alias is an instance. -// If alias is not an instance of a generic alias, Origin returns alias. -func Origin(alias *types.Alias) *types.Alias { - if alias, ok := any(alias).(interface{ Origin() *types.Alias }); ok { - return alias.Origin() // go1.23+ - } - return alias // not an instance of a generic alias (go1.22) -} - -// Enabled reports whether [NewAlias] should create [types.Alias] types. -// -// This function is expensive! Call it sparingly. -func Enabled() bool { - // The only reliable way to compute the answer is to invoke go/types. - // We don't parse the GODEBUG environment variable, because - // (a) it's tricky to do so in a manner that is consistent - // with the godebug package; in particular, a simple - // substring check is not good enough. The value is a - // rightmost-wins list of options. But more importantly: - // (b) it is impossible to detect changes to the effective - // setting caused by os.Setenv("GODEBUG"), as happens in - // many tests. Therefore any attempt to cache the result - // is just incorrect. - fset := token.NewFileSet() - f, _ := parser.ParseFile(fset, "a.go", "package p; type A = int", parser.SkipObjectResolution) - pkg, _ := new(types.Config).Check("p", fset, []*ast.File{f}, nil) - _, enabled := pkg.Scope().Lookup("A").Type().(*types.Alias) - return enabled -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/event/core/event.go new/vendor/golang.org/x/tools/internal/event/core/event.go --- old/vendor/golang.org/x/tools/internal/event/core/event.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/event/core/event.go 2026-02-22 13:42:39.000000000 +0100 @@ -7,6 +7,7 @@ import ( "fmt" + "iter" "time" "golang.org/x/tools/internal/event/label" @@ -34,10 +35,8 @@ if !ev.at.IsZero() { fmt.Fprint(f, ev.at.Format("2006/01/02 15:04:05 ")) } - for index := 0; ev.Valid(index); index++ { - if l := ev.Label(index); l.Valid() { - fmt.Fprintf(f, "\n\t%v", l) - } + for l := range ev.Labels() { + fmt.Fprintf(f, "\n\t%v", l) } } @@ -52,6 +51,22 @@ return ev.dynamic[index-len(ev.static)] } +// Labels returns an iterator over the event's valid labels. +func (ev Event) Labels() iter.Seq[label.Label] { + return func(yield func(label.Label) bool) { + for _, l := range ev.static { + if l.Valid() && !yield(l) { + return + } + } + for _, l := range ev.dynamic { + if l.Valid() && !yield(l) { + return + } + } + } +} + func (ev Event) Find(key label.Key) label.Label { for _, l := range ev.static { if l.Key() == key { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/event/keys/keys.go new/vendor/golang.org/x/tools/internal/event/keys/keys.go --- old/vendor/golang.org/x/tools/internal/event/keys/keys.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/event/keys/keys.go 2026-02-22 13:42:39.000000000 +0100 @@ -6,14 +6,13 @@ import ( "fmt" - "io" "math" "strconv" "golang.org/x/tools/internal/event/label" ) -// Value represents a key for untyped values. +// Value is a [label.Key] for untyped values. type Value struct { name string description string @@ -27,11 +26,11 @@ func (k *Value) Name() string { return k.name } func (k *Value) Description() string { return k.description } -func (k *Value) Format(w io.Writer, buf []byte, l label.Label) { - fmt.Fprint(w, k.From(l)) +func (k *Value) Append(buf []byte, l label.Label) []byte { + return fmt.Append(buf, k.From(l)) } -// Get can be used to get a label for the key from a label.Map. +// Get returns the label for the key of a label.Map. func (k *Value) Get(lm label.Map) any { if t := lm.Find(k); t.Valid() { return k.From(t) @@ -39,7 +38,7 @@ return nil } -// From can be used to get a value from a Label. +// From returns the value of a Label. func (k *Value) From(t label.Label) any { return t.UnpackValue() } // Of creates a new Label with this key and the supplied value. @@ -54,7 +53,7 @@ description string } -// NewTag creates a new Key for tagging labels. +// NewTag creates a new [label.Key] for tagging labels. func NewTag(name, description string) *Tag { return &Tag{name: name, description: description} } @@ -62,18 +61,18 @@ func (k *Tag) Name() string { return k.name } func (k *Tag) Description() string { return k.description } -func (k *Tag) Format(w io.Writer, buf []byte, l label.Label) {} +func (k *Tag) Append(buf []byte, l label.Label) []byte { return buf } // New creates a new Label with this key. func (k *Tag) New() label.Label { return label.OfValue(k, nil) } -// Int represents a key +// Int is a [label.Key] for signed integers. type Int struct { name string description string } -// NewInt creates a new Key for int values. +// NewInt returns a new [label.Key] for int64 values. func NewInt(name, description string) *Int { return &Int{name: name, description: description} } @@ -81,381 +80,92 @@ func (k *Int) Name() string { return k.name } func (k *Int) Description() string { return k.description } -func (k *Int) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) +func (k *Int) Append(buf []byte, l label.Label) []byte { + return strconv.AppendInt(buf, k.From(l), 10) } // Of creates a new Label with this key and the supplied value. -func (k *Int) Of(v int) label.Label { return label.Of64(k, uint64(v)) } +func (k *Int) Of(v int) label.Label { return k.Of64(int64(v)) } -// Get can be used to get a label for the key from a label.Map. -func (k *Int) Get(lm label.Map) int { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *Int) From(t label.Label) int { return int(t.Unpack64()) } - -// Int8 represents a key -type Int8 struct { - name string - description string -} - -// NewInt8 creates a new Key for int8 values. -func NewInt8(name, description string) *Int8 { - return &Int8{name: name, description: description} -} - -func (k *Int8) Name() string { return k.name } -func (k *Int8) Description() string { return k.description } - -func (k *Int8) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Int8) Of(v int8) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *Int8) Get(lm label.Map) int8 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *Int8) From(t label.Label) int8 { return int8(t.Unpack64()) } - -// Int16 represents a key -type Int16 struct { - name string - description string -} - -// NewInt16 creates a new Key for int16 values. -func NewInt16(name, description string) *Int16 { - return &Int16{name: name, description: description} -} - -func (k *Int16) Name() string { return k.name } -func (k *Int16) Description() string { return k.description } - -func (k *Int16) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Int16) Of(v int16) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *Int16) Get(lm label.Map) int16 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *Int16) From(t label.Label) int16 { return int16(t.Unpack64()) } - -// Int32 represents a key -type Int32 struct { - name string - description string -} +// Of64 creates a new Label with this key and the supplied value. +func (k *Int) Of64(v int64) label.Label { return label.Of64(k, uint64(v)) } -// NewInt32 creates a new Key for int32 values. -func NewInt32(name, description string) *Int32 { - return &Int32{name: name, description: description} -} - -func (k *Int32) Name() string { return k.name } -func (k *Int32) Description() string { return k.description } - -func (k *Int32) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Int32) Of(v int32) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *Int32) Get(lm label.Map) int32 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *Int32) From(t label.Label) int32 { return int32(t.Unpack64()) } - -// Int64 represents a key -type Int64 struct { - name string - description string -} - -// NewInt64 creates a new Key for int64 values. -func NewInt64(name, description string) *Int64 { - return &Int64{name: name, description: description} -} - -func (k *Int64) Name() string { return k.name } -func (k *Int64) Description() string { return k.description } - -func (k *Int64) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendInt(buf, k.From(l), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Int64) Of(v int64) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *Int64) Get(lm label.Map) int64 { +// Get returns the label for the key of a label.Map. +func (k *Int) Get(lm label.Map) int64 { if t := lm.Find(k); t.Valid() { return k.From(t) } return 0 } -// From can be used to get a value from a Label. -func (k *Int64) From(t label.Label) int64 { return int64(t.Unpack64()) } +// From returns the value of a Label. +func (k *Int) From(t label.Label) int64 { return int64(t.Unpack64()) } -// UInt represents a key -type UInt struct { +// Uint is a [label.Key] for unsigned integers. +type Uint struct { name string description string } -// NewUInt creates a new Key for uint values. -func NewUInt(name, description string) *UInt { - return &UInt{name: name, description: description} +// NewUint creates a new [label.Key] for unsigned values. +func NewUint(name, description string) *Uint { + return &Uint{name: name, description: description} } -func (k *UInt) Name() string { return k.name } -func (k *UInt) Description() string { return k.description } +func (k *Uint) Name() string { return k.name } +func (k *Uint) Description() string { return k.description } -func (k *UInt) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) +func (k *Uint) Append(buf []byte, l label.Label) []byte { + return strconv.AppendUint(buf, k.From(l), 10) } // Of creates a new Label with this key and the supplied value. -func (k *UInt) Of(v uint) label.Label { return label.Of64(k, uint64(v)) } +func (k *Uint) Of(v uint64) label.Label { return label.Of64(k, v) } -// Get can be used to get a label for the key from a label.Map. -func (k *UInt) Get(lm label.Map) uint { +// Get returns the label for the key of a label.Map. +func (k *Uint) Get(lm label.Map) uint64 { if t := lm.Find(k); t.Valid() { return k.From(t) } return 0 } -// From can be used to get a value from a Label. -func (k *UInt) From(t label.Label) uint { return uint(t.Unpack64()) } +// From returns the value of a Label. +func (k *Uint) From(t label.Label) uint64 { return t.Unpack64() } -// UInt8 represents a key -type UInt8 struct { +// Float is a label.Key for floating-point values. +type Float struct { name string description string } -// NewUInt8 creates a new Key for uint8 values. -func NewUInt8(name, description string) *UInt8 { - return &UInt8{name: name, description: description} +// NewFloat creates a new [label.Key] for floating-point values. +func NewFloat(name, description string) *Float { + return &Float{name: name, description: description} } -func (k *UInt8) Name() string { return k.name } -func (k *UInt8) Description() string { return k.description } +func (k *Float) Name() string { return k.name } +func (k *Float) Description() string { return k.description } -func (k *UInt8) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) +func (k *Float) Append(buf []byte, l label.Label) []byte { + return strconv.AppendFloat(buf, k.From(l), 'E', -1, 64) } // Of creates a new Label with this key and the supplied value. -func (k *UInt8) Of(v uint8) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *UInt8) Get(lm label.Map) uint8 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *UInt8) From(t label.Label) uint8 { return uint8(t.Unpack64()) } - -// UInt16 represents a key -type UInt16 struct { - name string - description string -} - -// NewUInt16 creates a new Key for uint16 values. -func NewUInt16(name, description string) *UInt16 { - return &UInt16{name: name, description: description} -} - -func (k *UInt16) Name() string { return k.name } -func (k *UInt16) Description() string { return k.description } - -func (k *UInt16) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *UInt16) Of(v uint16) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *UInt16) Get(lm label.Map) uint16 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *UInt16) From(t label.Label) uint16 { return uint16(t.Unpack64()) } - -// UInt32 represents a key -type UInt32 struct { - name string - description string -} - -// NewUInt32 creates a new Key for uint32 values. -func NewUInt32(name, description string) *UInt32 { - return &UInt32{name: name, description: description} -} - -func (k *UInt32) Name() string { return k.name } -func (k *UInt32) Description() string { return k.description } - -func (k *UInt32) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *UInt32) Of(v uint32) label.Label { return label.Of64(k, uint64(v)) } - -// Get can be used to get a label for the key from a label.Map. -func (k *UInt32) Get(lm label.Map) uint32 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *UInt32) From(t label.Label) uint32 { return uint32(t.Unpack64()) } - -// UInt64 represents a key -type UInt64 struct { - name string - description string -} - -// NewUInt64 creates a new Key for uint64 values. -func NewUInt64(name, description string) *UInt64 { - return &UInt64{name: name, description: description} -} - -func (k *UInt64) Name() string { return k.name } -func (k *UInt64) Description() string { return k.description } - -func (k *UInt64) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendUint(buf, k.From(l), 10)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *UInt64) Of(v uint64) label.Label { return label.Of64(k, v) } - -// Get can be used to get a label for the key from a label.Map. -func (k *UInt64) Get(lm label.Map) uint64 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *UInt64) From(t label.Label) uint64 { return t.Unpack64() } - -// Float32 represents a key -type Float32 struct { - name string - description string -} - -// NewFloat32 creates a new Key for float32 values. -func NewFloat32(name, description string) *Float32 { - return &Float32{name: name, description: description} -} - -func (k *Float32) Name() string { return k.name } -func (k *Float32) Description() string { return k.description } - -func (k *Float32) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendFloat(buf, float64(k.From(l)), 'E', -1, 32)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Float32) Of(v float32) label.Label { - return label.Of64(k, uint64(math.Float32bits(v))) -} - -// Get can be used to get a label for the key from a label.Map. -func (k *Float32) Get(lm label.Map) float32 { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return 0 -} - -// From can be used to get a value from a Label. -func (k *Float32) From(t label.Label) float32 { - return math.Float32frombits(uint32(t.Unpack64())) -} - -// Float64 represents a key -type Float64 struct { - name string - description string -} - -// NewFloat64 creates a new Key for int64 values. -func NewFloat64(name, description string) *Float64 { - return &Float64{name: name, description: description} -} - -func (k *Float64) Name() string { return k.name } -func (k *Float64) Description() string { return k.description } - -func (k *Float64) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendFloat(buf, k.From(l), 'E', -1, 64)) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Float64) Of(v float64) label.Label { +func (k *Float) Of(v float64) label.Label { return label.Of64(k, math.Float64bits(v)) } -// Get can be used to get a label for the key from a label.Map. -func (k *Float64) Get(lm label.Map) float64 { +// Get returns the label for the key of a label.Map. +func (k *Float) Get(lm label.Map) float64 { if t := lm.Find(k); t.Valid() { return k.From(t) } return 0 } -// From can be used to get a value from a Label. -func (k *Float64) From(t label.Label) float64 { +// From returns the value of a Label. +func (k *Float) From(t label.Label) float64 { return math.Float64frombits(t.Unpack64()) } @@ -473,14 +183,14 @@ func (k *String) Name() string { return k.name } func (k *String) Description() string { return k.description } -func (k *String) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendQuote(buf, k.From(l))) +func (k *String) Append(buf []byte, l label.Label) []byte { + return strconv.AppendQuote(buf, k.From(l)) } // Of creates a new Label with this key and the supplied value. func (k *String) Of(v string) label.Label { return label.OfString(k, v) } -// Get can be used to get a label for the key from a label.Map. +// Get returns the label for the key of a label.Map. func (k *String) Get(lm label.Map) string { if t := lm.Find(k); t.Valid() { return k.From(t) @@ -488,53 +198,16 @@ return "" } -// From can be used to get a value from a Label. +// From returns the value of a Label. func (k *String) From(t label.Label) string { return t.UnpackString() } -// Boolean represents a key -type Boolean struct { - name string - description string -} - -// NewBoolean creates a new Key for bool values. -func NewBoolean(name, description string) *Boolean { - return &Boolean{name: name, description: description} -} - -func (k *Boolean) Name() string { return k.name } -func (k *Boolean) Description() string { return k.description } - -func (k *Boolean) Format(w io.Writer, buf []byte, l label.Label) { - w.Write(strconv.AppendBool(buf, k.From(l))) -} - -// Of creates a new Label with this key and the supplied value. -func (k *Boolean) Of(v bool) label.Label { - if v { - return label.Of64(k, 1) - } - return label.Of64(k, 0) -} - -// Get can be used to get a label for the key from a label.Map. -func (k *Boolean) Get(lm label.Map) bool { - if t := lm.Find(k); t.Valid() { - return k.From(t) - } - return false -} - -// From can be used to get a value from a Label. -func (k *Boolean) From(t label.Label) bool { return t.Unpack64() > 0 } - // Error represents a key type Error struct { name string description string } -// NewError creates a new Key for int64 values. +// NewError returns a new [label.Key] for error values. func NewError(name, description string) *Error { return &Error{name: name, description: description} } @@ -542,14 +215,14 @@ func (k *Error) Name() string { return k.name } func (k *Error) Description() string { return k.description } -func (k *Error) Format(w io.Writer, buf []byte, l label.Label) { - io.WriteString(w, k.From(l).Error()) +func (k *Error) Append(buf []byte, l label.Label) []byte { + return append(buf, k.From(l).Error()...) } -// Of creates a new Label with this key and the supplied value. +// Of returns a new Label with this key and the supplied value. func (k *Error) Of(v error) label.Label { return label.OfValue(k, v) } -// Get can be used to get a label for the key from a label.Map. +// Get returns the label for the key of a label.Map. func (k *Error) Get(lm label.Map) error { if t := lm.Find(k); t.Valid() { return k.From(t) @@ -557,7 +230,7 @@ return nil } -// From can be used to get a value from a Label. +// From returns the value of a Label. func (k *Error) From(t label.Label) error { err, _ := t.UnpackValue().(error) return err diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/event/label/label.go new/vendor/golang.org/x/tools/internal/event/label/label.go --- old/vendor/golang.org/x/tools/internal/event/label/label.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/event/label/label.go 2026-02-22 13:42:39.000000000 +0100 @@ -19,12 +19,8 @@ Name() string // Description returns a string that can be used to describe the value. Description() string - - // Format is used in formatting to append the value of the label to the - // supplied buffer. - // The formatter may use the supplied buf as a scratch area to avoid - // allocations. - Format(w io.Writer, buf []byte, l Label) + // Append appends the formatted value of the label to the supplied buffer. + Append(buf []byte, l Label) []byte } // Label holds a key and value pair. @@ -131,8 +127,7 @@ } io.WriteString(f, t.Key().Name()) io.WriteString(f, "=") - var buf [128]byte - t.Key().Format(f, buf[:0], t) + f.Write(t.Key().Append(nil, t)) // ignore error } func (l *list) Valid(index int) bool { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/gcimporter/iexport.go new/vendor/golang.org/x/tools/internal/gcimporter/iexport.go --- old/vendor/golang.org/x/tools/internal/gcimporter/iexport.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/gcimporter/iexport.go 2026-02-22 13:42:39.000000000 +0100 @@ -242,7 +242,6 @@ "strings" "golang.org/x/tools/go/types/objectpath" - "golang.org/x/tools/internal/aliases" ) // IExportShallow encodes "shallow" export data for the specified package. @@ -767,11 +766,11 @@ } if obj.IsAlias() { - alias, materialized := t.(*types.Alias) // may fail when aliases are not enabled + alias, materialized := t.(*types.Alias) // perhaps false for certain built-ins? var tparams *types.TypeParamList if materialized { - tparams = aliases.TypeParams(alias) + tparams = alias.TypeParams() } if tparams.Len() == 0 { w.tag(aliasTag) @@ -785,7 +784,7 @@ if materialized { // Preserve materialized aliases, // even of non-exported types. - t = aliases.Rhs(alias) + t = alias.Rhs() } w.typ(t, obj.Pkg()) break @@ -1011,11 +1010,11 @@ } switch t := t.(type) { case *types.Alias: - if targs := aliases.TypeArgs(t); targs.Len() > 0 { + if targs := t.TypeArgs(); targs.Len() > 0 { w.startType(instanceType) w.pos(t.Obj().Pos()) w.typeList(targs, pkg) - w.typ(aliases.Origin(t), pkg) + w.typ(t.Origin(), pkg) return } w.startType(aliasType) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/gcimporter/iimport.go new/vendor/golang.org/x/tools/internal/gcimporter/iimport.go --- old/vendor/golang.org/x/tools/internal/gcimporter/iimport.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/gcimporter/iimport.go 2026-02-22 13:42:39.000000000 +0100 @@ -210,7 +210,6 @@ p := iimporter{ version: int(version), ipath: path, - aliases: aliases.Enabled(), shallow: shallow, reportf: reportf, @@ -370,7 +369,6 @@ version int ipath string - aliases bool shallow bool reportf ReportFunc // if non-nil, used to report bugs @@ -576,7 +574,7 @@ tparams = r.tparamList() } typ := r.typ() - obj := aliases.NewAlias(r.p.aliases, pos, pkg, name, typ, tparams) + obj := aliases.New(pos, pkg, name, typ, tparams) markBlack(obj) // workaround for golang/go#69912 r.declare(obj) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go new/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go --- old/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go 2026-02-22 13:42:39.000000000 +0100 @@ -26,7 +26,6 @@ ctxt *types.Context imports map[string]*types.Package // previously imported packages, indexed by path - aliases bool // create types.Alias nodes // lazily initialized arrays corresponding to the unified IR // PosBase, Pkg, and Type sections, respectively. @@ -98,7 +97,6 @@ ctxt: ctxt, imports: imports, - aliases: aliases.Enabled(), posBases: make([]string, input.NumElems(pkgbits.RelocPosBase)), pkgs: make([]*types.Package, input.NumElems(pkgbits.RelocPkg)), @@ -539,7 +537,7 @@ tparams = r.typeParamNames() } typ := r.typ() - declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ, tparams)) + declare(aliases.New(pos, objPkg, objName, typ, tparams)) case pkgbits.ObjConst: pos := r.pos() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/stdlib/deps.go new/vendor/golang.org/x/tools/internal/stdlib/deps.go --- old/vendor/golang.org/x/tools/internal/stdlib/deps.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/stdlib/deps.go 2026-02-22 13:42:39.000000000 +0100 @@ -307,7 +307,7 @@ {"net/textproto", "\x02\x01q\x03\x83\x01\f\n-\x01\x02\x15"}, {"net/url", "t\x03Fc\v\x10\x02\x01\x17"}, {"os", "t+\x01\x19\x03\x10\x14\x01\x03\x01\x05\x10\x018\b\x05\x01\x01\r\x06"}, - {"os/exec", "\x03\ngI'\x01\x15\x01+\x06\a\n\x01\x04\r"}, + {"os/exec", "\x03\ngI'\x01\x15\x01+\x06\a\n\x01\x03\x01\r"}, {"os/exec/internal/fdtest", "\xc2\x02"}, {"os/signal", "\r\x99\x02\x15\x05\x02"}, {"os/user", "\x02\x01q\x03\x83\x01,\r\n\x01\x02"}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/typeparams/free.go new/vendor/golang.org/x/tools/internal/typeparams/free.go --- old/vendor/golang.org/x/tools/internal/typeparams/free.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/typeparams/free.go 2026-02-22 13:42:39.000000000 +0100 @@ -6,8 +6,6 @@ import ( "go/types" - - "golang.org/x/tools/internal/aliases" ) // Free is a memoization of the set of free type parameters within a @@ -38,7 +36,7 @@ break case *types.Alias: - if aliases.TypeParams(t).Len() > aliases.TypeArgs(t).Len() { + if t.TypeParams().Len() > t.TypeArgs().Len() { return true // This is an uninstantiated Alias. } // The expansion of an alias can have free type parameters, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/golang.org/x/tools/internal/typesinternal/types.go new/vendor/golang.org/x/tools/internal/typesinternal/types.go --- old/vendor/golang.org/x/tools/internal/typesinternal/types.go 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/golang.org/x/tools/internal/typesinternal/types.go 2026-02-22 13:42:39.000000000 +0100 @@ -25,7 +25,6 @@ "reflect" "golang.org/x/tools/go/ast/inspector" - "golang.org/x/tools/internal/aliases" ) func SetUsesCgo(conf *types.Config) bool { @@ -142,7 +141,7 @@ func Origin(t NamedOrAlias) NamedOrAlias { switch t := t.(type) { case *types.Alias: - return aliases.Origin(t) + return t.Origin() case *types.Named: return t.Origin() } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt --- old/vendor/modules.txt 2026-02-09 10:52:46.000000000 +0100 +++ new/vendor/modules.txt 2026-02-22 13:42:39.000000000 +0100 @@ -127,10 +127,10 @@ # go.yaml.in/yaml/v3 v3.0.4 ## explicit; go 1.16 go.yaml.in/yaml/v3 -# golang.org/x/mod v0.32.0 +# golang.org/x/mod v0.33.0 ## explicit; go 1.24.0 golang.org/x/mod/semver -# golang.org/x/net v0.49.0 +# golang.org/x/net v0.50.0 ## explicit; go 1.24.0 golang.org/x/net/html golang.org/x/net/html/atom @@ -144,10 +144,10 @@ golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.39.0 +# golang.org/x/term v0.40.0 ## explicit; go 1.24.0 golang.org/x/term -# golang.org/x/text v0.33.0 +# golang.org/x/text v0.34.0 ## explicit; go 1.24.0 golang.org/x/text/encoding golang.org/x/text/encoding/charmap @@ -166,7 +166,7 @@ golang.org/x/text/language golang.org/x/text/runes golang.org/x/text/transform -# golang.org/x/tools v0.41.0 +# golang.org/x/tools v0.42.0 ## explicit; go 1.24.0 golang.org/x/tools/cover golang.org/x/tools/go/ast/edge
