mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#950)
bumping golang.org/x/text 8072180...b6d2645: > b6d2645 go.mod: update golang.org/x dependencies bumping golang.org/x/net 6e41cae...76358aa: > 76358aa go.mod: update golang.org/x dependencies bumping knative.dev/pkg 4c6fea7...2a0abb7: > 2a0abb7 Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.0 (# 3225) > 5bfaba0 Bump the golang-x group with 3 updates (# 3217) > 032a2ec Bump sigs.k8s.io/yaml from 1.5.0 to 1.6.0 (# 3221) bumping golang.org/x/tools 578c121...50ec2f1: > 50ec2f1 go.mod: update golang.org/x dependencies > 197c6c1 gopls/internal/mcp: more tuning of tools and prompts > 9563af6 gopls/internal/mcp: include module paths in workspace summaries > 88a4eb3 gopls/internal/cmd: wait for startup log in TestMCPCommandHTTP > 4738c7c gopls/internal/cmd: avoid the use of channels in the sessions API > ae18417 gopls/internal/filewatcher: skip test for unsupported OS > 8391b17 gopls/doc: document Zed editor > 778fe21 gopls/internal/util/tokeninternal: move from internal/tokeninternal > 0343b70 internal/jsonrpc2/stack: move from internal/stack > 8c9f4cc gopls/internal/filewatcher: refactor filewatcher to pass in handler func > 63f81c9 gopls/internal/cache/metadata: use pointers for Graph indexes > b2cd89d gopls/internal/filewatcher: skip file removal event when removing dir > 85a4574 gopls/internal/util/memoize: move from internal/memoize > 978cb2f gopls/internal/util/fakenet: move from internal/fakenet > db322bb gopls/internal/mcp: add -logfile and -rpc.trace to the headless server > 7cbfe75 gopls/internal/mcp: tune tools for editing > 4724ef9 gopls/doc: more doc tweaks > fa09424 gopls/internal/server: omit CompletionItem.documentation when empty > d400935 gopls/internal/settings: use gopls import source > bc228aa gopls: update to x/sync@master > 4f6016b gopls/internal/test/marker: temporarily revert marker test shutdown > d1921d1 gopls/internal/cmd: fix flaky mcp http test > 7b8dc5d gopls/doc: add default.tmpl for x/website > 986a3c0 gopls/internal/mcp: add a symbol search tool > c609f78 gopls/internal/mcp: add a tool for workspace diagnostics > 17ce783 gopls/internal/golang: allow rename of embedded fields at declaration > b2f9218 gopls/internal/filewatcher: introduce filewatcher using fsnotify > 2d4b6bf gopls/internal/mcp: skip standard lib package summary in context tool > 1a2d84c gopls/internal/mcp: use fenced code blocks for context > e90a906 gopls/internal/mcp: add a variant of the references tool > 46b77f4 gopls/doc: use YAML title blocks in .md files > e01e525 gopls: fix SignatureHelp activeParameter not being passed > 1a9eb83 gopls/doc: fix broken links > 02a89fc gopls/internal/mcp: add several tools and organize them by file > b2f3de7 gopls/internal/test/marker: close the JSON-RPC connection when tests exit > 66a63a6 gopls/doc: rationalize > e8a91ce gopls/internal/golang: Definition: fix crash wrt unsafe.Pointer > 5700558 gopls/internal/debug: display metadata graph > b5e741b gopls/internal/cmd: rename conn to cli > 8b11e06 gopls/internal/cmd: cleanup: unify connection, cmdClient > d1c2fd2 gopls/internal/golang: cleanups while investigating golang/go# 74434 > 7f29a7e gopls/internal/analysis/modernize: fix a typo in doc.go > 53826a8 internal/test/integration/workspace: fix TestUseGoWork > 3b3100c gopls/internal/golang: recover failed inlineAllCalls > d75a88d internal/refactor/inline: falcon: only map keys can be variable > 9b2e031 internal/mcp: disable schema validation > 134edd9 internal/mcp/jsonschema: fix panic during schema validation > d58c5eb gopls/internal/util/immutable: Map.Range -> Map.All, with iter.Seq2 > 99387c8 gopls/internal/mcp: add references mcp tool > bf1b00e gopls/internal/golang: reproduce various edge cases of issue 69616 > ce10b6b gopls/internal/mcp: attach text edits to diagnostics if exist > 762e4dd gopls/internal/golang: add web-based "split package" tool > d788a6f gopls/internal/protocol: Mapper: reject start > end > 406c179 gopls/internal/cmd: implement counters for mcp server > 55b751a gopls/internal/golang: InlayHint: reveal ignored errors > a0ae5fa gopls/internal/server: remove tempDir field > 3b3fffa gopls/internal/cmd: fix directory cleanup issue in flaky test > f28cf99 gopls/internal/golang: Hover: fix crash on alias to built-in Named > a0eca0c gopls/internal/golang: fix crash in refactor.inline.variable > 4c0fd1d gopls/internal/golang: implementation: fix nil panic > 19adb40 internal/mcp: make parseEventID robust, and add a test > b6ff505 internal/mcp: remove stale TODOs in mcp.go > f2685fc internal/mcp: add a script to create the mcp SDK repo > 231c38c internal/mcp: rename StdIO->Stdio > fcfa492 internal/mcp: update CONTRIBUTING.md and README.md for the official SDK > 15c16a5 internal/mcp: simplify prompt API > 84508c7 internal/mcp: provide a customizable http.Client to client transports > e5d7ba0 internal/mcp: use JSONRPC aliases consistently > 7db3d3f internal/jsonrpc2_v2,mcp: remove unneeded dependencies > 3590a17 internal/mcp: fix prompt example > a71de77 gopls/internal/mcp: unbreak build > b2bc8a1 gopls/internal/mcp: add diagnostics tool > b021ce4 gopls/internal/settings: revert to old goimports index > 0b325c8 internal/mcp: avoid JSON nulls on the wire > a84f5c0 internal/mcp: update protocol versions > 20e3ee5 gopls/internal/analysis/unusedfunc: support var, type, func > 6df6b60 internal/mcp: rename Stream->Connection > d892050 internal/mcp: rename NewXXX->NewServerXXX > fecb411 internal/mcp: implement streamable HTTP transport > 0304251 gopls/internal/cmd: fix mcp http test > 97e28a6 gopls/internal/cmd: fix mcp stdio test > 49368ab go/analysis/passes/assign: correctly handle parallel assignments > 06818cb gopls/go.mod: update dependencies following the v0.19.0 release > 01d126b gopls/doc/release: add contributor shout-out > e40bd19 go/packages: use cfg.abs(dir) in determineRootDirsModules > f17f523 go/packages: remove filepath.Abs call in getPkgPath > f0ace13 go/packages: take into account cfg.Dir while querying relative files > 5099dda go/{expect,packages/packagestest}: delete > 9b68bc9 go/packages/packagestest: remove replace directive > a798c0e gopls/internal/cmd: headless mcp server command > 3f93fec go/ast/inspector: remove obsolete linkname directive > 03b26e7 gopls/internal: eliminate two unused declarations > d9ea527 go/types/internal/play: show Object pointers > cc2d954 internal/typesinternal/typeindex: Uses: report instantiations > 3012059 gopls/internal/golang: add counters for refactoring ops > 16b680a internal/mcp: add NotifyProgress > a5f2a18 go/{expect,packages/packagestest}: carve out submodules > 439ea2f gopls/internal/test/integration: fix race > 21c9b36 go/analysis/internal/checker: import internal 'expect' package > 5af564a gopls/internal/cache: add missing error check > 80d3570 gopls/doc: add two missing items to doc index > 0d64d53 Revert "gopls/internal/util/moreslices: add Reversed iterator" > 5efcbbf internal/mcp: apply JSON schema defaults > b4768b8 gopls/internal/util/moreslices: add Reversed iterator > 8befc65 internal/jsonrpc2_v2: refactor Reader/Writer and remove event dependency > 5e00265 internal/mcp: consolidate list tests > 2cae60e internal/mcp: iterators return pointers > 687b754 internal/mcp: reorganize the tool API, keeping generics > c7d803c gopls/internal/golang: add missing ,ok check > 7c45fee gopls/internal/golang: add missing err check > 78473fc gopls/internal/golang/completion: return error if file is not new > 499bea9 gopls/internal/mcp: remove cache.Cache from the mcp server > ede391f internal/mcp: resource template iterator > 8a9bccd internal/mcp: implement resource templates > c53c576 internal/mcp/internal/util: add Wrapf > 0d2de46 gopls/internal/debug: extend timeout when running under CI builders bumping golang.org/x/term 2ec7864...30da5dd: > 30da5dd go.mod: update golang.org/x dependencies bumping sigs.k8s.io/yaml 0f318dc...048d724: > 048d724 Merge pull request # 132 from thockin/master > 23c836c Bolster tests, mostly in error-handling > 2e3340b Add compact output tests > 4a4f539 Add test case for tabs in multi-line strings > 13509ad Change which methods get a newline and fix tests > 59c2c43 Add compact mode so KYAML can be used in more places > abc1add kyaml: Implement escaping closer to YAML spec > 7749171 Add a yamlfmt cmd > a932007 Add KYAML support bumping golang.org/x/sync 8a14946...7fad2c9: > 7fad2c9 errgroup: revert propagation of panics bumping golang.org/x/mod 9d33331...ea04085: > ea04085 go.mod: update golang.org/x dependencies Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
cdcce5b2f5
commit
15982a1b62
17
go.mod
17
go.mod
|
@ -11,7 +11,7 @@ require (
|
|||
k8s.io/code-generator v0.33.1
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
|
||||
knative.dev/hack v0.0.0-20250708013849-70d4b00da6ba
|
||||
knative.dev/pkg v0.0.0-20250804123844-4c6fea7360fc
|
||||
knative.dev/pkg v0.0.0-20250804212045-2a0abb7b5eb3
|
||||
)
|
||||
|
||||
require (
|
||||
|
@ -45,15 +45,16 @@ require (
|
|||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||
golang.org/x/mod v0.25.0 // indirect
|
||||
golang.org/x/net v0.41.0 // indirect
|
||||
golang.org/x/mod v0.26.0 // indirect
|
||||
golang.org/x/net v0.42.0 // indirect
|
||||
golang.org/x/oauth2 v0.30.0 // indirect
|
||||
golang.org/x/sync v0.15.0 // indirect
|
||||
golang.org/x/sync v0.16.0 // indirect
|
||||
golang.org/x/sys v0.34.0 // indirect
|
||||
golang.org/x/term v0.32.0 // indirect
|
||||
golang.org/x/text v0.26.0 // indirect
|
||||
golang.org/x/term v0.33.0 // indirect
|
||||
golang.org/x/text v0.27.0 // indirect
|
||||
golang.org/x/time v0.10.0 // indirect
|
||||
golang.org/x/tools v0.34.0 // indirect
|
||||
golang.org/x/tools v0.35.0 // indirect
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
google.golang.org/protobuf v1.36.6 // indirect
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||
|
@ -65,5 +66,5 @@ require (
|
|||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
|
||||
sigs.k8s.io/yaml v1.5.0 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
)
|
||||
|
|
36
go.sum
36
go.sum
|
@ -113,40 +113,44 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
|
||||
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
||||
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
|
||||
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
|
||||
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
|
||||
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
|
||||
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||
golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
|
||||
golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
|
||||
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
|
||||
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
|
||||
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM=
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY=
|
||||
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM=
|
||||
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@ -182,8 +186,8 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
|
|||
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
knative.dev/hack v0.0.0-20250708013849-70d4b00da6ba h1:PkOTBI8DRfvUKD8HTvYYT94NJ49J++llrDo3y0/ZAwc=
|
||||
knative.dev/hack v0.0.0-20250708013849-70d4b00da6ba/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
|
||||
knative.dev/pkg v0.0.0-20250804123844-4c6fea7360fc h1:bnSYN/pqsh3nPOABTJ8kTb5f5iphn82UpDdArDVAy90=
|
||||
knative.dev/pkg v0.0.0-20250804123844-4c6fea7360fc/go.mod h1:3XFi8vRmgyZuzA7AeSW/Yvu4Zdi+ATWwJJyV6/d6ACs=
|
||||
knative.dev/pkg v0.0.0-20250804212045-2a0abb7b5eb3 h1:5IWHlFvSTR/gZY+bShXCAHFFZ6rQqhYvx1KxVwlsnKw=
|
||||
knative.dev/pkg v0.0.0-20250804212045-2a0abb7b5eb3/go.mod h1:qpyBu3z/r1fRfyLo/Zdpis1mmtixdXmsCPmJMz/BsLc=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
|
||||
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
|
||||
|
@ -192,5 +196,5 @@ sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxO
|
|||
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ=
|
||||
sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4=
|
||||
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
|
||||
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
|
||||
|
|
|
@ -12,8 +12,6 @@ package errgroup
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
@ -33,10 +31,6 @@ type Group struct {
|
|||
|
||||
errOnce sync.Once
|
||||
err error
|
||||
|
||||
mu sync.Mutex
|
||||
panicValue any // = PanicError | PanicValue; non-nil if some Group.Go goroutine panicked.
|
||||
abnormal bool // some Group.Go goroutine terminated abnormally (panic or goexit).
|
||||
}
|
||||
|
||||
func (g *Group) done() {
|
||||
|
@ -56,22 +50,13 @@ func WithContext(ctx context.Context) (*Group, context.Context) {
|
|||
return &Group{cancel: cancel}, ctx
|
||||
}
|
||||
|
||||
// Wait blocks until all function calls from the Go method have returned
|
||||
// normally, then returns the first non-nil error (if any) from them.
|
||||
//
|
||||
// If any of the calls panics, Wait panics with a [PanicValue];
|
||||
// and if any of them calls [runtime.Goexit], Wait calls runtime.Goexit.
|
||||
// Wait blocks until all function calls from the Go method have returned, then
|
||||
// returns the first non-nil error (if any) from them.
|
||||
func (g *Group) Wait() error {
|
||||
g.wg.Wait()
|
||||
if g.cancel != nil {
|
||||
g.cancel(g.err)
|
||||
}
|
||||
if g.panicValue != nil {
|
||||
panic(g.panicValue)
|
||||
}
|
||||
if g.abnormal {
|
||||
runtime.Goexit()
|
||||
}
|
||||
return g.err
|
||||
}
|
||||
|
||||
|
@ -81,53 +66,31 @@ func (g *Group) Wait() error {
|
|||
// It blocks until the new goroutine can be added without the number of
|
||||
// goroutines in the group exceeding the configured limit.
|
||||
//
|
||||
// The first goroutine in the group that returns a non-nil error, panics, or
|
||||
// invokes [runtime.Goexit] will cancel the associated Context, if any.
|
||||
// The first goroutine in the group that returns a non-nil error will
|
||||
// cancel the associated Context, if any. The error will be returned
|
||||
// by Wait.
|
||||
func (g *Group) Go(f func() error) {
|
||||
if g.sem != nil {
|
||||
g.sem <- token{}
|
||||
}
|
||||
|
||||
g.add(f)
|
||||
}
|
||||
|
||||
func (g *Group) add(f func() error) {
|
||||
g.wg.Add(1)
|
||||
go func() {
|
||||
defer g.done()
|
||||
normalReturn := false
|
||||
defer func() {
|
||||
if normalReturn {
|
||||
return
|
||||
}
|
||||
v := recover()
|
||||
g.mu.Lock()
|
||||
defer g.mu.Unlock()
|
||||
if !g.abnormal {
|
||||
if g.cancel != nil {
|
||||
g.cancel(g.err)
|
||||
}
|
||||
g.abnormal = true
|
||||
}
|
||||
if v != nil && g.panicValue == nil {
|
||||
switch v := v.(type) {
|
||||
case error:
|
||||
g.panicValue = PanicError{
|
||||
Recovered: v,
|
||||
Stack: debug.Stack(),
|
||||
}
|
||||
default:
|
||||
g.panicValue = PanicValue{
|
||||
Recovered: v,
|
||||
Stack: debug.Stack(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
err := f()
|
||||
normalReturn = true
|
||||
if err != nil {
|
||||
// It is tempting to propagate panics from f()
|
||||
// up to the goroutine that calls Wait, but
|
||||
// it creates more problems than it solves:
|
||||
// - it delays panics arbitrarily,
|
||||
// making bugs harder to detect;
|
||||
// - it turns f's panic stack into a mere value,
|
||||
// hiding it from crash-monitoring tools;
|
||||
// - it risks deadlocks that hide the panic entirely,
|
||||
// if f's panic leaves the program in a state
|
||||
// that prevents the Wait call from being reached.
|
||||
// See #53757, #74275, #74304, #74306.
|
||||
|
||||
if err := f(); err != nil {
|
||||
g.errOnce.Do(func() {
|
||||
g.err = err
|
||||
if g.cancel != nil {
|
||||
|
@ -152,7 +115,19 @@ func (g *Group) TryGo(f func() error) bool {
|
|||
}
|
||||
}
|
||||
|
||||
g.add(f)
|
||||
g.wg.Add(1)
|
||||
go func() {
|
||||
defer g.done()
|
||||
|
||||
if err := f(); err != nil {
|
||||
g.errOnce.Do(func() {
|
||||
g.err = err
|
||||
if g.cancel != nil {
|
||||
g.cancel(g.err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}()
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -174,34 +149,3 @@ func (g *Group) SetLimit(n int) {
|
|||
}
|
||||
g.sem = make(chan token, n)
|
||||
}
|
||||
|
||||
// PanicError wraps an error recovered from an unhandled panic
|
||||
// when calling a function passed to Go or TryGo.
|
||||
type PanicError struct {
|
||||
Recovered error
|
||||
Stack []byte // result of call to [debug.Stack]
|
||||
}
|
||||
|
||||
func (p PanicError) Error() string {
|
||||
if len(p.Stack) > 0 {
|
||||
return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack)
|
||||
}
|
||||
return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered)
|
||||
}
|
||||
|
||||
func (p PanicError) Unwrap() error { return p.Recovered }
|
||||
|
||||
// PanicValue wraps a value that does not implement the error interface,
|
||||
// recovered from an unhandled panic when calling a function passed to Go or
|
||||
// TryGo.
|
||||
type PanicValue struct {
|
||||
Recovered any
|
||||
Stack []byte // result of call to [debug.Stack]
|
||||
}
|
||||
|
||||
func (p PanicValue) String() string {
|
||||
if len(p.Stack) > 0 {
|
||||
return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack)
|
||||
}
|
||||
return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered)
|
||||
}
|
||||
|
|
|
@ -224,13 +224,22 @@ extractQueries:
|
|||
return response.dr, nil
|
||||
}
|
||||
|
||||
// abs returns an absolute representation of path, based on cfg.Dir.
|
||||
func (cfg *Config) abs(path string) (string, error) {
|
||||
if filepath.IsAbs(path) {
|
||||
return path, nil
|
||||
}
|
||||
// In case cfg.Dir is relative, pass it to filepath.Abs.
|
||||
return filepath.Abs(filepath.Join(cfg.Dir, path))
|
||||
}
|
||||
|
||||
func (state *golistState) runContainsQueries(response *responseDeduper, queries []string) error {
|
||||
for _, query := range queries {
|
||||
// TODO(matloob): Do only one query per directory.
|
||||
fdir := filepath.Dir(query)
|
||||
// Pass absolute path of directory to go list so that it knows to treat it as a directory,
|
||||
// not a package path.
|
||||
pattern, err := filepath.Abs(fdir)
|
||||
pattern, err := state.cfg.abs(fdir)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not determine absolute path of file= query path %q: %v", query, err)
|
||||
}
|
||||
|
@ -703,9 +712,8 @@ func (state *golistState) getGoVersion() (int, error) {
|
|||
// getPkgPath finds the package path of a directory if it's relative to a root
|
||||
// directory.
|
||||
func (state *golistState) getPkgPath(dir string) (string, bool, error) {
|
||||
absDir, err := filepath.Abs(dir)
|
||||
if err != nil {
|
||||
return "", false, err
|
||||
if !filepath.IsAbs(dir) {
|
||||
panic("non-absolute dir passed to getPkgPath")
|
||||
}
|
||||
roots, err := state.determineRootDirs()
|
||||
if err != nil {
|
||||
|
@ -715,7 +723,7 @@ func (state *golistState) getPkgPath(dir string) (string, bool, error) {
|
|||
for rdir, rpath := range roots {
|
||||
// Make sure that the directory is in the module,
|
||||
// to avoid creating a path relative to another module.
|
||||
if !strings.HasPrefix(absDir, rdir) {
|
||||
if !strings.HasPrefix(dir, rdir) {
|
||||
continue
|
||||
}
|
||||
// TODO(matloob): This doesn't properly handle symlinks.
|
||||
|
|
|
@ -55,7 +55,7 @@ func (state *golistState) determineRootDirsModules() (map[string]string, error)
|
|||
}
|
||||
if mod.Dir != "" && mod.Path != "" {
|
||||
// This is a valid module; add it to the map.
|
||||
absDir, err := filepath.Abs(mod.Dir)
|
||||
absDir, err := state.cfg.abs(mod.Dir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -36,13 +36,13 @@ const (
|
|||
)
|
||||
|
||||
// LookupAll only returns those Candidates whose import path
|
||||
// finds all the nms.
|
||||
func (ix *Index) LookupAll(pkg string, names ...string) map[string][]Candidate {
|
||||
// finds all the names.
|
||||
func (ix *Index) LookupAll(pkgName string, names ...string) map[string][]Candidate {
|
||||
// this can be made faster when benchmarks show that it needs to be
|
||||
names = uniquify(names)
|
||||
byImpPath := make(map[string][]Candidate)
|
||||
for _, nm := range names {
|
||||
cands := ix.Lookup(pkg, nm, false)
|
||||
cands := ix.Lookup(pkgName, nm, false)
|
||||
for _, c := range cands {
|
||||
byImpPath[c.ImportPath] = append(byImpPath[c.ImportPath], c)
|
||||
}
|
||||
|
@ -67,9 +67,9 @@ func uniquify(in []string) []string {
|
|||
|
||||
// Lookup finds all the symbols in the index with the given PkgName and name.
|
||||
// If prefix is true, it finds all of these with name as a prefix.
|
||||
func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
|
||||
loc, ok := slices.BinarySearchFunc(ix.Entries, pkg, func(e Entry, pkg string) int {
|
||||
return strings.Compare(e.PkgName, pkg)
|
||||
func (ix *Index) Lookup(pkgName, name string, prefix bool) []Candidate {
|
||||
loc, ok := slices.BinarySearchFunc(ix.Entries, pkgName, func(e Entry, pkg string) int {
|
||||
return strings.Compare(e.PkgName, pkgName)
|
||||
})
|
||||
if !ok {
|
||||
return nil // didn't find the package
|
||||
|
@ -78,7 +78,7 @@ func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
|
|||
// loc is the first entry for this package name, but there may be several
|
||||
for i := loc; i < len(ix.Entries); i++ {
|
||||
e := ix.Entries[i]
|
||||
if e.PkgName != pkg {
|
||||
if e.PkgName != pkgName {
|
||||
break // end of sorted package names
|
||||
}
|
||||
nloc, ok := slices.BinarySearchFunc(e.Names, name, func(s string, name string) int {
|
||||
|
@ -105,7 +105,7 @@ func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
|
|||
continue // should never happen
|
||||
}
|
||||
px := Candidate{
|
||||
PkgName: pkg,
|
||||
PkgName: pkgName,
|
||||
Name: flds[0],
|
||||
Dir: string(e.Dir),
|
||||
ImportPath: e.ImportPath,
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
// Package packagesinternal exposes internal-only fields from go/packages.
|
||||
package packagesinternal
|
||||
|
||||
import "fmt"
|
||||
|
||||
var GetDepsErrors = func(p any) []*PackageError { return nil }
|
||||
|
||||
type PackageError struct {
|
||||
|
@ -13,5 +15,9 @@ type PackageError struct {
|
|||
Err string // the error itself
|
||||
}
|
||||
|
||||
func (err PackageError) String() string {
|
||||
return fmt.Sprintf("%s: %s (import stack: %s)", err.Pos, err.Err, err.ImportStack)
|
||||
}
|
||||
|
||||
var TypecheckCgo int
|
||||
var DepsErrors int // must be set as a LoadMode to call GetDepsErrors
|
||||
|
|
|
@ -134,12 +134,12 @@ go.uber.org/zap/zapcore
|
|||
# go.yaml.in/yaml/v2 v2.4.2
|
||||
## explicit; go 1.15
|
||||
go.yaml.in/yaml/v2
|
||||
# golang.org/x/mod v0.25.0
|
||||
# golang.org/x/mod v0.26.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/mod/internal/lazyregexp
|
||||
golang.org/x/mod/module
|
||||
golang.org/x/mod/semver
|
||||
# golang.org/x/net v0.41.0
|
||||
# golang.org/x/net v0.42.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/net/http/httpguts
|
||||
golang.org/x/net/http2
|
||||
|
@ -151,7 +151,7 @@ golang.org/x/net/internal/httpcommon
|
|||
## explicit; go 1.23.0
|
||||
golang.org/x/oauth2
|
||||
golang.org/x/oauth2/internal
|
||||
# golang.org/x/sync v0.15.0
|
||||
# golang.org/x/sync v0.16.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/sync/errgroup
|
||||
# golang.org/x/sys v0.34.0
|
||||
|
@ -159,10 +159,10 @@ golang.org/x/sync/errgroup
|
|||
golang.org/x/sys/plan9
|
||||
golang.org/x/sys/unix
|
||||
golang.org/x/sys/windows
|
||||
# golang.org/x/term v0.32.0
|
||||
# golang.org/x/term v0.33.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/term
|
||||
# golang.org/x/text v0.26.0
|
||||
# golang.org/x/text v0.27.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/text/cases
|
||||
golang.org/x/text/internal
|
||||
|
@ -177,7 +177,7 @@ golang.org/x/text/unicode/norm
|
|||
# golang.org/x/time v0.10.0
|
||||
## explicit; go 1.18
|
||||
golang.org/x/time/rate
|
||||
# golang.org/x/tools v0.34.0
|
||||
# golang.org/x/tools v0.35.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/tools/go/ast/astutil
|
||||
golang.org/x/tools/go/gcexportdata
|
||||
|
@ -201,6 +201,8 @@ golang.org/x/tools/internal/stdlib
|
|||
golang.org/x/tools/internal/typeparams
|
||||
golang.org/x/tools/internal/typesinternal
|
||||
golang.org/x/tools/internal/versions
|
||||
# golang.org/x/tools/go/expect v0.1.1-deprecated
|
||||
## explicit; go 1.23.0
|
||||
# gomodules.xyz/jsonpatch/v2 v2.5.0
|
||||
## explicit; go 1.20
|
||||
gomodules.xyz/jsonpatch/v2
|
||||
|
@ -719,7 +721,7 @@ k8s.io/utils/trace
|
|||
# knative.dev/hack v0.0.0-20250708013849-70d4b00da6ba
|
||||
## explicit; go 1.21
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20250804123844-4c6fea7360fc
|
||||
# knative.dev/pkg v0.0.0-20250804212045-2a0abb7b5eb3
|
||||
## explicit; go 1.24.0
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
@ -774,7 +776,7 @@ sigs.k8s.io/structured-merge-diff/v4/merge
|
|||
sigs.k8s.io/structured-merge-diff/v4/schema
|
||||
sigs.k8s.io/structured-merge-diff/v4/typed
|
||||
sigs.k8s.io/structured-merge-diff/v4/value
|
||||
# sigs.k8s.io/yaml v1.5.0
|
||||
# sigs.k8s.io/yaml v1.6.0
|
||||
## explicit; go 1.22
|
||||
sigs.k8s.io/yaml
|
||||
sigs.k8s.io/yaml/goyaml.v2
|
||||
|
|
Loading…
Reference in New Issue