Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gopls for openSUSE:Factory checked 
in at 2025-02-25 16:58:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gopls (Old)
 and      /work/SRC/openSUSE:Factory/.gopls.new.1873 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gopls"

Tue Feb 25 16:58:11 2025 rev:19 rq:1248243 version:0.18.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/gopls/gopls.changes      2025-02-21 
21:37:04.998026408 +0100
+++ /work/SRC/openSUSE:Factory/.gopls.new.1873/gopls.changes    2025-02-25 
16:58:14.893680624 +0100
@@ -1,0 +2,12 @@
+Mon Feb 24 20:05:48 UTC 2025 - Jeff Kowalczyk <jkowalc...@suse.com>
+
+- Update to version 0.18.1:
+  * gopls: update go.mod for v0.18.1-pre.2
+  * gopls/internal/settings: fix misleading error messages
+  * gopls/internal/golang: add missing json tags for hoverResult
+  * gopls: update go.mod for v0.18.1-pre.1
+  * gopls: temporarily reinstate the "Structured" hover kind
+  * gopls/internal/analysis/modernize: fix minmax bug
+  * gopls/internal/analysis/modernize: fix bug in minmax
+
+-------------------------------------------------------------------

Old:
----
  gopls-0.18.0.tar.gz

New:
----
  gopls-0.18.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gopls.spec ++++++
--- /var/tmp/diff_new_pack.tIdVNC/_old  2025-02-25 16:58:17.273780350 +0100
+++ /var/tmp/diff_new_pack.tIdVNC/_new  2025-02-25 16:58:17.289781021 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           gopls
-Version:        0.18.0
+Version:        0.18.1
 Release:        0
 Summary:        Go LSP protocol language server
 License:        Apache-2.0 AND MIT AND BSD-3-Clause

++++++ _service ++++++
--- /var/tmp/diff_new_pack.tIdVNC/_old  2025-02-25 16:58:17.581793256 +0100
+++ /var/tmp/diff_new_pack.tIdVNC/_new  2025-02-25 16:58:17.625795100 +0100
@@ -4,7 +4,7 @@
     <param name="scm">git</param>
     <param name="include">gopls</param>
     <param name="include">LICENSE</param>
-    <param name="revision">gopls/v0.18.0</param>
+    <param name="revision">gopls/v0.18.1</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">enable</param>
     <param name="versionrewrite-pattern">gopls/v(.*)</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.tIdVNC/_old  2025-02-25 16:58:17.805802642 +0100
+++ /var/tmp/diff_new_pack.tIdVNC/_new  2025-02-25 16:58:17.853804653 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/golang/tools.git</param>
-              <param 
name="changesrevision">e59d1ba337ca0b5ed7becdb4386eecc0d9c605a9</param></service></servicedata>
+              <param 
name="changesrevision">0b62b3fcb903046d1ed6e0c50a94871e9fdcae2a</param></service></servicedata>
 (No newline at EOF)
 

++++++ gopls-0.18.0.tar.gz -> gopls-0.18.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gopls-0.18.0/gopls/doc/settings.md 
new/gopls-0.18.1/gopls/doc/settings.md
--- old/gopls-0.18.0/gopls/doc/settings.md      2025-02-20 19:08:32.000000000 
+0100
+++ new/gopls-0.18.1/gopls/doc/settings.md      2025-02-24 18:39:34.000000000 
+0100
@@ -428,6 +428,9 @@
 * `"FullDocumentation"`
 * `"NoDocumentation"`
 * `"SingleLine"`
+* `"Structured"` is a misguided experimental setting that returns a JSON
+hover format. This setting should not be used, as it will be removed in a
+future release of gopls.
 * `"SynopsisDocumentation"`
 
 Default: `"FullDocumentation"`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gopls-0.18.0/gopls/go.mod 
new/gopls-0.18.1/gopls/go.mod
--- old/gopls-0.18.0/gopls/go.mod       2025-02-20 19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/go.mod       2025-02-24 18:39:34.000000000 +0100
@@ -12,7 +12,7 @@
        golang.org/x/sys v0.30.0
        golang.org/x/telemetry v0.0.0-20241220003058-cc96b6e0d3d9
        golang.org/x/text v0.22.0
-       golang.org/x/tools v0.30.1-0.20250220174815-31e3bb2b8fd1
+       golang.org/x/tools v0.30.1-0.20250221230316-5055f70f240c
        golang.org/x/vuln v1.1.3
        gopkg.in/yaml.v3 v3.0.1
        honnef.co/go/tools v0.5.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gopls-0.18.0/gopls/go.sum 
new/gopls-0.18.1/gopls/go.sum
--- old/gopls-0.18.0/gopls/go.sum       2025-02-20 19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/go.sum       2025-02-24 18:39:34.000000000 +0100
@@ -28,8 +28,8 @@
 golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
 golang.org/x/text v0.22.0/go.mod 
h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod 
h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.30.1-0.20250220174815-31e3bb2b8fd1 
h1:4+it9JYqVd2wIAapscAb5mUAI1yHY0u4B4idYPigWeE=
-golang.org/x/tools v0.30.1-0.20250220174815-31e3bb2b8fd1/go.mod 
h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
+golang.org/x/tools v0.30.1-0.20250221230316-5055f70f240c 
h1:Ja/5gV5a9Vvho3p2NC/T2TtxhHjrWS/2DvCKMvA0a+Y=
+golang.org/x/tools v0.30.1-0.20250221230316-5055f70f240c/go.mod 
h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
 golang.org/x/vuln v1.1.3 h1:NPGnvPOTgnjBc9HTaUx+nj+EaUYxl5SJOWqaDYGaFYw=
 golang.org/x/vuln v1.1.3/go.mod h1:7Le6Fadm5FOqE9C926BCD0g12NWyhg7cxV4BwcPFuNY=
 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/gopls-0.18.0/gopls/internal/analysis/modernize/minmax.go 
new/gopls-0.18.1/gopls/internal/analysis/modernize/minmax.go
--- old/gopls-0.18.0/gopls/internal/analysis/modernize/minmax.go        
2025-02-20 19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/internal/analysis/modernize/minmax.go        
2025-02-24 18:39:34.000000000 +0100
@@ -57,7 +57,7 @@
                        if equalSyntax(lhs, lhs2) {
                                if equalSyntax(rhs, a) && equalSyntax(rhs2, b) {
                                        sign = +sign
-                               } else if equalSyntax(rhs2, a) || 
equalSyntax(rhs, b) {
+                               } else if equalSyntax(rhs2, a) && 
equalSyntax(rhs, b) {
                                        sign = -sign
                                } else {
                                        return
@@ -95,7 +95,7 @@
                                })
                        }
 
-               } else if prev, ok := curIfStmt.PrevSibling(); ok && 
isSimpleAssign(prev.Node()) {
+               } else if prev, ok := curIfStmt.PrevSibling(); ok && 
isSimpleAssign(prev.Node()) && ifStmt.Else == nil {
                        fassign := prev.Node().(*ast.AssignStmt)
 
                        // Have: lhs0 = rhs0; if a < b { lhs = rhs }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gopls-0.18.0/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go
 
new/gopls-0.18.1/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go
--- 
old/gopls-0.18.0/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go
    2025-02-20 19:08:32.000000000 +0100
+++ 
new/gopls-0.18.1/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go
    2025-02-24 18:39:34.000000000 +0100
@@ -92,3 +92,26 @@
        }
        print(y)
 }
+
+// Regression test for https://github.com/golang/go/issues/71721.
+func nopeNotAMinimum(x, y int) int {
+       // A value of -1 or 0 will use a default value (30).
+       if x <= 0 {
+               y = 30
+       } else {
+               y = x
+       }
+       return y
+}
+
+// Regression test for 
https://github.com/golang/go/issues/71847#issuecomment-2673491596
+func nopeHasElseBlock(x int) int {
+       y := x
+       // Before, this was erroneously reduced to y = max(x, 0)
+       if y < 0 {
+               y = 0
+       } else {
+               y += 2
+       }
+       return y
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gopls-0.18.0/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go.golden
 
new/gopls-0.18.1/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go.golden
--- 
old/gopls-0.18.0/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go.golden
     2025-02-20 19:08:32.000000000 +0100
+++ 
new/gopls-0.18.1/gopls/internal/analysis/modernize/testdata/src/minmax/minmax.go.golden
     2025-02-24 18:39:34.000000000 +0100
@@ -69,3 +69,26 @@
        }
        print(y)
 }
+
+// Regression test for https://github.com/golang/go/issues/71721.
+func nopeNotAMinimum(x, y int) int {
+       // A value of -1 or 0 will use a default value (30).
+       if x <= 0 {
+               y = 30
+       } else {
+               y = x
+       }
+       return y
+}
+
+// Regression test for 
https://github.com/golang/go/issues/71847#issuecomment-2673491596
+func nopeHasElseBlock(x int) int {
+       y := x
+       // Before, this was erroneously reduced to y = max(x, 0)
+       if y < 0 {
+               y = 0
+       } else {
+               y += 2
+       }
+       return y
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gopls-0.18.0/gopls/internal/doc/api.json 
new/gopls-0.18.1/gopls/internal/doc/api.json
--- old/gopls-0.18.0/gopls/internal/doc/api.json        2025-02-20 
19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/internal/doc/api.json        2025-02-24 
18:39:34.000000000 +0100
@@ -135,6 +135,10 @@
                                                "Doc": ""
                                        },
                                        {
+                                               "Value": "\"Structured\"",
+                                               "Doc": "`\"Structured\"` is a 
misguided experimental setting that returns a JSON\nhover format. This setting 
should not be used, as it will be removed in a\nfuture release of gopls.\n"
+                                       },
+                                       {
                                                "Value": 
"\"SynopsisDocumentation\"",
                                                "Doc": ""
                                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gopls-0.18.0/gopls/internal/golang/hover.go 
new/gopls-0.18.1/gopls/internal/golang/hover.go
--- old/gopls-0.18.0/gopls/internal/golang/hover.go     2025-02-20 
19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/internal/golang/hover.go     2025-02-24 
18:39:34.000000000 +0100
@@ -7,6 +7,7 @@
 import (
        "bytes"
        "context"
+       "encoding/json"
        "fmt"
        "go/ast"
        "go/constant"
@@ -48,37 +49,47 @@
 // It is formatted in one of several formats as determined by the
 // HoverKind setting.
 type hoverResult struct {
-       // synopsis is a single sentence synopsis of the symbol's documentation.
+       // The fields below are exported to define the JSON hover format.
+       // TODO(golang/go#70233): (re)remove support for JSON hover.
+
+       // Synopsis is a single sentence Synopsis of the symbol's documentation.
        //
-       // TODO(adonovan): in what syntax? It (usually) comes from doc.synopsis,
+       // TODO(adonovan): in what syntax? It (usually) comes from doc.Synopsis,
        // which produces "Text" form, but it may be fed to
        // DocCommentToMarkdown, which expects doc comment syntax.
-       synopsis string
+       Synopsis string `json:"synopsis"`
 
-       // fullDocumentation is the symbol's full documentation.
-       fullDocumentation string
+       // FullDocumentation is the symbol's full documentation.
+       FullDocumentation string `json:"fullDocumentation"`
 
-       // signature is the symbol's signature.
-       signature string
+       // Signature is the symbol's Signature.
+       Signature string `json:"signature"`
 
-       // singleLine is a single line describing the symbol.
+       // SingleLine is a single line describing the symbol.
        // This is recommended only for use in clients that show a single line 
for hover.
-       singleLine string
+       SingleLine string `json:"singleLine"`
 
-       // symbolName is the human-readable name to use for the symbol in links.
-       symbolName string
+       // SymbolName is the human-readable name to use for the symbol in links.
+       SymbolName string `json:"symbolName"`
 
-       // linkPath is the path of the package enclosing the given symbol,
+       // LinkPath is the path of the package enclosing the given symbol,
        // with the module portion (if any) replaced by "module@version".
        //
        // For example: "github.com/google/go-github/v48@v48.1.0/github".
        //
-       // Use LinkTarget + "/" + linkPath + "#" + LinkAnchor to form a pkgsite 
URL.
-       linkPath string
+       // Use LinkTarget + "/" + LinkPath + "#" + LinkAnchor to form a pkgsite 
URL.
+       LinkPath string `json:"linkPath"`
 
-       // linkAnchor is the pkg.go.dev link anchor for the given symbol.
+       // LinkAnchor is the pkg.go.dev link anchor for the given symbol.
        // For example, the "Node" part of "pkg.go.dev/go/ast#Node".
-       linkAnchor string
+       LinkAnchor string `json:"linkAnchor"`
+
+       // New fields go below, and are unexported. The existing
+       // exported fields are underspecified and have already
+       // constrained our movements too much. A detailed JSON
+       // interface might be nice, but it needs a design and a
+       // precise specification.
+       // TODO(golang/go#70233): (re)deprecate the JSON hover output.
 
        // typeDecl is the declaration syntax for a type,
        // or "" for a non-type.
@@ -284,9 +295,9 @@
                typesinternal.SetVarKind(v, typesinternal.LocalVar)
                signature := types.ObjectString(v, qual)
                return *hoverRange, &hoverResult{
-                       signature:  signature,
-                       singleLine: signature,
-                       symbolName: v.Name(),
+                       Signature:  signature,
+                       SingleLine: signature,
+                       SymbolName: v.Name(),
                }, nil
        }
 
@@ -615,13 +626,13 @@
        }
 
        return *hoverRange, &hoverResult{
-               synopsis:          doc.Synopsis(docText),
-               fullDocumentation: docText,
-               singleLine:        singleLineSignature,
-               symbolName:        linkName,
-               signature:         signature,
-               linkPath:          linkPath,
-               linkAnchor:        anchor,
+               Synopsis:          doc.Synopsis(docText),
+               FullDocumentation: docText,
+               SingleLine:        singleLineSignature,
+               SymbolName:        linkName,
+               Signature:         signature,
+               LinkPath:          linkPath,
+               LinkAnchor:        anchor,
                typeDecl:          typeDecl,
                methods:           methods,
                promotedFields:    fields,
@@ -638,8 +649,8 @@
        if obj.Name() == "Error" {
                signature := obj.String()
                return &hoverResult{
-                       signature:  signature,
-                       singleLine: signature,
+                       Signature:  signature,
+                       SingleLine: signature,
                        // TODO(rfindley): these are better than the current 
behavior.
                        // SymbolName: "(error).Error",
                        // LinkPath:   "builtin",
@@ -682,13 +693,13 @@
 
        docText := comment.Text()
        return &hoverResult{
-               synopsis:          doc.Synopsis(docText),
-               fullDocumentation: docText,
-               signature:         signature,
-               singleLine:        obj.String(),
-               symbolName:        obj.Name(),
-               linkPath:          "builtin",
-               linkAnchor:        obj.Name(),
+               Synopsis:          doc.Synopsis(docText),
+               FullDocumentation: docText,
+               Signature:         signature,
+               SingleLine:        obj.String(),
+               SymbolName:        obj.Name(),
+               LinkPath:          "builtin",
+               LinkAnchor:        obj.Name(),
        }, nil
 }
 
@@ -740,9 +751,9 @@
 
        docText := comment.Text()
        return rng, &hoverResult{
-               signature:         "package " + string(impMetadata.Name),
-               synopsis:          doc.Synopsis(docText),
-               fullDocumentation: docText,
+               Signature:         "package " + string(impMetadata.Name),
+               Synopsis:          doc.Synopsis(docText),
+               FullDocumentation: docText,
        }, nil
 }
 
@@ -798,9 +809,9 @@
        }
 
        return rng, &hoverResult{
-               signature:         "package " + string(pkg.Metadata().Name),
-               synopsis:          doc.Synopsis(docText),
-               fullDocumentation: docText,
+               Signature:         "package " + string(pkg.Metadata().Name),
+               Synopsis:          doc.Synopsis(docText),
+               FullDocumentation: docText,
                footer:            footer,
        }, nil
 }
@@ -926,8 +937,8 @@
        }
        hover := b.String()
        return rng, &hoverResult{
-               synopsis:          hover,
-               fullDocumentation: hover,
+               Synopsis:          hover,
+               FullDocumentation: hover,
        }, nil
 }
 
@@ -966,7 +977,7 @@
        }
        buf.WriteByte(')')
        return rng, &hoverResult{
-               signature: buf.String(),
+               Signature: buf.String(),
        }, nil
 }
 
@@ -1005,9 +1016,9 @@
        }
 
        res := &hoverResult{
-               signature:         fmt.Sprintf("Embedding %q", pattern),
-               synopsis:          s.String(),
-               fullDocumentation: s.String(),
+               Signature:         fmt.Sprintf("Embedding %q", pattern),
+               Synopsis:          s.String(),
+               FullDocumentation: s.String(),
        }
        return rng, res, nil
 }
@@ -1242,10 +1253,17 @@
 
        switch options.HoverKind {
        case settings.SingleLine:
-               return h.singleLine, nil
+               return h.SingleLine, nil
 
        case settings.NoDocumentation:
-               return maybeFenced(h.signature), nil
+               return maybeFenced(h.Signature), nil
+
+       case settings.Structured:
+               b, err := json.Marshal(h)
+               if err != nil {
+                       return "", err
+               }
+               return string(b), nil
 
        case settings.SynopsisDocumentation, settings.FullDocumentation:
                var sections [][]string // assembled below
@@ -1256,20 +1274,20 @@
                // but not Signature, which is redundant (= TypeDecl + "\n" + 
Methods).
                // For all other symbols, we display Signature;
                // TypeDecl and Methods are empty.
-               // (Now that JSON is no more, we could rationalize this.)
+               // TODO(golang/go#70233): When JSON is no more, we could 
rationalize this.
                if h.typeDecl != "" {
                        sections = append(sections, 
[]string{maybeFenced(h.typeDecl)})
                } else {
-                       sections = append(sections, 
[]string{maybeFenced(h.signature)})
+                       sections = append(sections, 
[]string{maybeFenced(h.Signature)})
                }
 
                // Doc section.
                var doc string
                switch options.HoverKind {
                case settings.SynopsisDocumentation:
-                       doc = h.synopsis
+                       doc = h.Synopsis
                case settings.FullDocumentation:
-                       doc = h.fullDocumentation
+                       doc = h.FullDocumentation
                }
                if options.PreferredContentFormat == protocol.Markdown {
                        doc = DocCommentToMarkdown(doc, options)
@@ -1392,7 +1410,7 @@
 
 // If pkgURL is non-nil, it should be used to generate doc links.
 func formatLink(h *hoverResult, options *settings.Options, pkgURL func(path 
PackagePath, fragment string) protocol.URI) string {
-       if options.LinksInHover == settings.LinksInHover_None || h.linkPath == 
"" {
+       if options.LinksInHover == settings.LinksInHover_None || h.LinkPath == 
"" {
                return ""
        }
        var url protocol.URI
@@ -1400,26 +1418,26 @@
        if pkgURL != nil { // LinksInHover == "gopls"
                // Discard optional module version portion.
                // (Ideally the hoverResult would retain the structure...)
-               path := h.linkPath
-               if module, versionDir, ok := strings.Cut(h.linkPath, "@"); ok {
+               path := h.LinkPath
+               if module, versionDir, ok := strings.Cut(h.LinkPath, "@"); ok {
                        // "module@version/dir"
                        path = module
                        if _, dir, ok := strings.Cut(versionDir, "/"); ok {
                                path += "/" + dir
                        }
                }
-               url = pkgURL(PackagePath(path), h.linkAnchor)
+               url = pkgURL(PackagePath(path), h.LinkAnchor)
                caption = "in gopls doc viewer"
        } else {
                if options.LinkTarget == "" {
                        return ""
                }
-               url = cache.BuildLink(options.LinkTarget, h.linkPath, 
h.linkAnchor)
+               url = cache.BuildLink(options.LinkTarget, h.LinkPath, 
h.LinkAnchor)
                caption = "on " + options.LinkTarget
        }
        switch options.PreferredContentFormat {
        case protocol.Markdown:
-               return fmt.Sprintf("[`%s` %s](%s)", h.symbolName, caption, url)
+               return fmt.Sprintf("[`%s` %s](%s)", h.SymbolName, caption, url)
        case protocol.PlainText:
                return ""
        default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gopls-0.18.0/gopls/internal/settings/settings.go 
new/gopls-0.18.1/gopls/internal/settings/settings.go
--- old/gopls-0.18.0/gopls/internal/settings/settings.go        2025-02-20 
19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/internal/settings/settings.go        2025-02-24 
18:39:34.000000000 +0100
@@ -798,6 +798,11 @@
        NoDocumentation       HoverKind = "NoDocumentation"
        SynopsisDocumentation HoverKind = "SynopsisDocumentation"
        FullDocumentation     HoverKind = "FullDocumentation"
+
+       // Structured is a misguided experimental setting that returns a JSON
+       // hover format. This setting should not be used, as it will be removed 
in a
+       // future release of gopls.
+       Structured HoverKind = "Structured"
 )
 
 type VulncheckMode string
@@ -1073,14 +1078,15 @@
                        AllSymbolScope)
 
        case "hoverKind":
-               if s, ok := value.(string); ok && strings.EqualFold(s, 
"structured") {
-                       return nil, deprecatedError("the experimental 
hoverKind='structured' setting was removed in gopls/v0.18.0 
(https://go.dev/issue/70233)")
-               }
+               // TODO(rfindley): reinstate the deprecation of Structured 
hover by making
+               // it a warning in gopls v0.N+1, and removing it in gopls 
v0.N+2.
                return setEnum(&o.HoverKind, value,
                        NoDocumentation,
                        SingleLine,
                        SynopsisDocumentation,
-                       FullDocumentation)
+                       FullDocumentation,
+                       Structured,
+               )
 
        case "linkTarget":
                return nil, setString(&o.LinkTarget, value)
@@ -1110,7 +1116,7 @@
                        return nil, err
                }
                if o.Analyses["fieldalignment"] {
-                       return counts, deprecatedError("the 'fieldalignment' 
analyzer was removed in gopls/v0.17.0; instead, hover over struct fields to see 
size/offset information (https://go.dev/issue/66861)")
+                       return counts, &SoftError{"the 'fieldalignment' 
analyzer was removed in gopls/v0.17.0; instead, hover over struct fields to see 
size/offset information (https://go.dev/issue/66861)"}
                }
                return counts, nil
 
@@ -1118,7 +1124,7 @@
                return setBoolMap(&o.Hints, value)
 
        case "annotations":
-               return nil, deprecatedError("the 'annotations' setting was 
removed in gopls/v0.18.0; all compiler optimization details are now shown")
+               return nil, &SoftError{"the 'annotations' setting was removed 
in gopls/v0.18.0; all compiler optimization details are now shown"}
 
        case "vulncheck":
                return setEnum(&o.Vulncheck, value,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gopls-0.18.0/gopls/internal/settings/settings_test.go 
new/gopls-0.18.1/gopls/internal/settings/settings_test.go
--- old/gopls-0.18.0/gopls/internal/settings/settings_test.go   2025-02-20 
19:08:32.000000000 +0100
+++ new/gopls-0.18.1/gopls/internal/settings/settings_test.go   2025-02-24 
18:39:34.000000000 +0100
@@ -91,19 +91,19 @@
                        },
                },
                {
-                       name:      "hoverKind",
-                       value:     "Structured",
-                       wantError: true,
+                       name:  "hoverKind",
+                       value: "Structured",
+                       // wantError: true, // TODO(rfindley): reinstate this 
error
                        check: func(o Options) bool {
-                               return o.HoverKind == FullDocumentation
+                               return o.HoverKind == Structured
                        },
                },
                {
-                       name:      "ui.documentation.hoverKind",
-                       value:     "Structured",
-                       wantError: true,
+                       name:  "ui.documentation.hoverKind",
+                       value: "Structured",
+                       // wantError: true, // TODO(rfindley): reinstate this 
error
                        check: func(o Options) bool {
-                               return o.HoverKind == FullDocumentation
+                               return o.HoverKind == Structured
                        },
                },
                {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gopls-0.18.0/gopls/internal/test/marker/testdata/hover/json.txt 
new/gopls-0.18.1/gopls/internal/test/marker/testdata/hover/json.txt
--- old/gopls-0.18.0/gopls/internal/test/marker/testdata/hover/json.txt 
1970-01-01 01:00:00.000000000 +0100
+++ new/gopls-0.18.1/gopls/internal/test/marker/testdata/hover/json.txt 
2025-02-24 18:39:34.000000000 +0100
@@ -0,0 +1,33 @@
+This test demonstrates support for "hoverKind": "Structured".
+
+Its size expectations assume a 64-bit machine.
+
+-- flags --
+-skip_goarch=386,arm
+
+-- go.mod --
+module example.com/p
+
+go 1.18
+
+-- settings.json --
+{
+       "hoverKind": "Structured"
+}
+-- p.go --
+package p
+
+// MyType is a type.
+type MyType struct { //@ hover("MyType", "MyType", MyType)
+       F int // a field
+       S string // a string field
+}
+
+// MyFunc is a function.
+func MyFunc(i int) string { //@ hover("MyFunc", "MyFunc", MyFunc)
+       return ""
+}
+-- @MyFunc --
+{"synopsis":"MyFunc is a function.","fullDocumentation":"MyFunc is a 
function.\n","signature":"func MyFunc(i int) string","singleLine":"func 
MyFunc(i int) 
string","symbolName":"p.MyFunc","linkPath":"example.com/p","linkAnchor":"MyFunc"}
+-- @MyType --
+{"synopsis":"MyType is a type.","fullDocumentation":"MyType is a 
type.\n","signature":"type MyType struct { // size=24 (0x18)\n\tF int    // a 
field\n\tS string // a string field\n}\n","singleLine":"type MyType struct{F 
int; S 
string}","symbolName":"p.MyType","linkPath":"example.com/p","linkAnchor":"MyType"}

++++++ vendor.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt
--- old/vendor/modules.txt      2025-02-21 00:48:16.000000000 +0100
+++ new/vendor/modules.txt      2025-02-24 21:05:51.000000000 +0100
@@ -54,7 +54,7 @@
 ## explicit; go 1.18
 golang.org/x/text/unicode/rangetable
 golang.org/x/text/unicode/runenames
-# golang.org/x/tools v0.30.1-0.20250220174815-31e3bb2b8fd1
+# golang.org/x/tools v0.30.1-0.20250221230316-5055f70f240c
 ## explicit; go 1.22.0
 golang.org/x/tools/go/analysis
 golang.org/x/tools/go/analysis/analysistest

Reply via email to