diff --git a/go.mod b/go.mod index da23d907..eea856e2 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/nmiyake/pkg/dirs v1.1.0 github.com/nmiyake/pkg/gofiles v1.2.0 - github.com/palantir/godel/v2 v2.107.0 + github.com/palantir/godel/v2 v2.108.0 github.com/palantir/pkg/cobracli v1.2.0 github.com/palantir/pkg/matcher v1.2.0 github.com/pkg/errors v0.8.1 @@ -42,10 +42,10 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.10 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/tools v0.22.0 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index d6852727..cbe97f8f 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,8 @@ github.com/nmiyake/pkg/gofiles v1.2.0 h1:L0LWMfnHyMxiLP2Cuqno163/4zK73FscEsNd7sH github.com/nmiyake/pkg/gofiles v1.2.0/go.mod h1:aPXiVvXPwxNanRNuFIRVPYn6eTC4qxjDZni6VNNlzMY= github.com/nwaples/rardecode v1.0.0 h1:r7vGuS5akxOnR4JQSkko62RJ1ReCMXxQRPtxsiFMBOs= github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/palantir/godel/v2 v2.107.0 h1:bf3PGlIEcmQypMRCug6azbg5Uk/ksRVEzG8jlYdRT18= -github.com/palantir/godel/v2 v2.107.0/go.mod h1:gk+BU0JjjkcluT0GlvbTV+FDhMd1SBbvB2cwbWTbyX4= +github.com/palantir/godel/v2 v2.108.0 h1:rDSOl8Vn86rQkCmPjvudUEenT0i0J5IzS6iFZmZ7Xf8= +github.com/palantir/godel/v2 v2.108.0/go.mod h1:amVViT/meaI1bf0jYlzTr+1+mVbSCZsv7DB4EQYNTt4= github.com/palantir/pkg v1.1.0 h1:0EhrSUP8oeeh3MUvk7V/UU7WmsN1UiJNTvNj0sN9Cpo= github.com/palantir/pkg v1.1.0/go.mod h1:KC9srP/9ssWRxBxFCIqhUGC4Jt7OJkWRz0Iqehup1/c= github.com/palantir/pkg/cobracli v1.2.0 h1:hANp5fUB5cX90SVri97Apz4xB3BqnZw0gP2jMQ34G8Y= @@ -98,8 +98,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -117,16 +117,16 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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/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.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= 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-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/palantir/godel/v2/framework/godellauncher/defaulttasks/defaulttasks.go b/vendor/github.com/palantir/godel/v2/framework/godellauncher/defaulttasks/defaulttasks.go index f96b9cf2..ac14c1ed 100644 --- a/vendor/github.com/palantir/godel/v2/framework/godellauncher/defaulttasks/defaulttasks.go +++ b/vendor/github.com/palantir/godel/v2/framework/godellauncher/defaulttasks/defaulttasks.go @@ -33,12 +33,12 @@ var defaultPluginsConfig = config.PluginsConfig{ { LocatorWithResolverConfig: config.ToLocatorWithResolverConfig(config.LocatorWithResolverConfig{ Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.distgo:dist-plugin:1.68.0", + ID: "com.palantir.distgo:dist-plugin:1.70.0", Checksums: map[string]string{ - "darwin-amd64": "897cc279d1015ef88c95d6f2714efa6b197cf04714d6e891c4e7f8b7ec5e7bd5", - "darwin-arm64": "4f780c28f4473e2cdaabced51f8e399272e165cdac67c24b517aedc6393b39a6", - "linux-amd64": "e21ae5329407cc841a092d9182f74fabe4e7815c65ee07e7ed1cd1e72d9f393c", - "linux-arm64": "5e868840482b13ddff0c0e85d3f9afe7b84cb21dd0a751cec6d08055c6a5973d", + "darwin-amd64": "1c6a043303e36bd6c8f5d276629f7de94ded07315822f898ae496d2a742e6ab1", + "darwin-arm64": "fe4b451edb857d166113f8a235a7d4c63d986fb8b3e3f3c785837d612c367849", + "linux-amd64": "ad367c25a2c23270f7b96ff63d146336158ba4e9929003c6f0b0cb5fea4598dc", + "linux-arm64": "873f29cbbaea4349403d0ea3f3cc29a24063ff3eb0f5ee67b97ce0e34d4537aa", }, }), }), @@ -46,24 +46,24 @@ var defaultPluginsConfig = config.PluginsConfig{ { LocatorWithResolverConfig: config.ToLocatorWithResolverConfig(config.LocatorWithResolverConfig{ Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-format-plugin:format-plugin:1.40.0", + ID: "com.palantir.godel-format-plugin:format-plugin:1.42.0", Checksums: map[string]string{ - "darwin-amd64": "e17a28aa753da06e9330744d8bb897e73e2a7049ef1d07f892fce449f1aaa68f", - "darwin-arm64": "1af943226fb3745254677e321ac43aaa861cb54217fef3efb01af5a882024bf4", - "linux-amd64": "974d384374c0696df8569148647ae53fc1ad3e5ad2dd04c5a63bc798d7e8f4b2", - "linux-arm64": "69d4fc7228d36474b8f32caba8bc49e52124f658e85d4664fabfbf380bb98910", + "darwin-amd64": "8a6f5c42b0ff8db52cfbc57389a20a4c9bebbd862923d3594e6f9595236228c1", + "darwin-arm64": "1f8a3d926aea5c4f75d64cb024fb431ecfa5b14de33b0edb4dea59c31d9d82ab", + "linux-amd64": "ad02d84f4234bebe9efee5ed9f239462c9b370e11c61d887066aac16b0128fd2", + "linux-arm64": "c9ab9ce0a53432c33eb8b6ecdc8d8a84cac2b822abaf4e03991f179be4861d00", }, }), }), Assets: config.ToLocatorWithResolverConfigs([]config.LocatorWithResolverConfig{ { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-format-asset-ptimports:ptimports-asset:1.39.0", + ID: "com.palantir.godel-format-asset-ptimports:ptimports-asset:1.41.0", Checksums: map[string]string{ - "darwin-amd64": "85a48b1ab6bfb571c04fbf1f29a2b1d7fd6f8f3cc2baa1add7ab21b1e59ec0eb", - "darwin-arm64": "4dc186f776a4a1df79d1384f0610c9d3022b7f736650439926a0b468148ad756", - "linux-amd64": "f2b4eb614ced30e833164ec98b147e61872c5631d67535b3d90949b086196d1b", - "linux-arm64": "b66199b3cc7f32f96affb13681f8bbf73ad0db0b7d2eb54b4551603b039f83a7", + "darwin-amd64": "d1dfa22c3d5ecf7d256e1b4daae7efa0037d144b5d659504e8ddbe837a4f96c8", + "darwin-arm64": "4c1cb01e88c688b502c7f178f858c6517b226578d0a673ee9e28cbabbbc7afa4", + "linux-amd64": "5d5dcda7967126b22d63e0b900384532662de68655a090ee560f84b206ab073f", + "linux-arm64": "dc3352006de948694a3847cd90b6b28eabe5ba241523e832b1d2c5765dfeb8e1", }, }), }, @@ -72,12 +72,12 @@ var defaultPluginsConfig = config.PluginsConfig{ { LocatorWithResolverConfig: config.ToLocatorWithResolverConfig(config.LocatorWithResolverConfig{ Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-goland-plugin:goland-plugin:1.36.0", + ID: "com.palantir.godel-goland-plugin:goland-plugin:1.38.0", Checksums: map[string]string{ - "darwin-amd64": "d9743dfc65a3c28472147dee8c5a649741d5ad2c6be7f5601d3241826c681a33", - "darwin-arm64": "13cedad519d41196a74d37d7de73c2fbf7405a53eed6850d15ef78275ba769d4", - "linux-amd64": "322e9830887e53930b5a6faf7dca2ad5d4a4ab36c5c9de8ca1ac312eb48b08ae", - "linux-arm64": "5572e239e35e9b2a7a4a53c9e5698f39eca5ec1d004097c516e5475b1dd366e5", + "darwin-amd64": "ce13efbfce7d0ecaee673ebdb6cdb43be114cae7c7c98c45ab53f070f053bbea", + "darwin-arm64": "b7c3732c15796ca2894c7c73047fb573b5f65b4231b21d97e1654df2da33c51e", + "linux-amd64": "944ce2f4fead395ddcdc86baca986ee528097fcb3064c1210aa29297668168cf", + "linux-arm64": "4b16828ffccb796c6a597af3b902cadbf7bb13e8e011933a8e8b870356d8f47f", }, }), }), @@ -85,123 +85,123 @@ var defaultPluginsConfig = config.PluginsConfig{ { LocatorWithResolverConfig: config.ToLocatorWithResolverConfig(config.LocatorWithResolverConfig{ Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.okgo:check-plugin:1.52.0", + ID: "com.palantir.okgo:check-plugin:1.54.0", Checksums: map[string]string{ - "darwin-amd64": "68bb0ab1aaf4bbabff7c838c18a478eaa29f07acee4b83e0e5d7c67fa9fba118", - "darwin-arm64": "fe0793bcb7c40c5626e93dd9fd2cfdc29591de727923482b7c54a0ebf8c23a2c", - "linux-amd64": "b0d405694f97ad8ca2b7e953175d49005c8be7e88e41480b380837fbfeaf878d", - "linux-arm64": "d2d94c53865de85ddc32c3f81fd7bfc53bc2ca4b437939a1ce3d66e9562fcfe4", + "darwin-amd64": "0a424449cdd2a32e13eb24fd1c310da93407ae4ca112155e41fb2b163459f702", + "darwin-arm64": "dd65b59a5285b12b910e785259e9da15ff0465727f860d824b8c64c15d127f21", + "linux-amd64": "4af8b81960f3930f34a1c1dcd788e1a72084b742f4b735af9abee22bb840d384", + "linux-arm64": "84b1fa7daf892c981179ef6ffd8b71a3ab02795c4b4049805dd4fc5d81869591", }, }), }), Assets: config.ToLocatorWithResolverConfigs([]config.LocatorWithResolverConfig{ { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-compiles:compiles-asset:1.45.0", + ID: "com.palantir.godel-okgo-asset-compiles:compiles-asset:1.47.0", Checksums: map[string]string{ - "darwin-amd64": "6c214fb54c319aefb84dcfce8a2d62d65dbc2eda655ae0996851aebdc277542d", - "darwin-arm64": "f654bf5038f8c7b632d6136abbae6f1c5464b0f03fa8bbf6617e4d47fc56d5f7", - "linux-amd64": "f7abb928ff7e5cb857a6f00ef1e8fab45026dbc68fe86c434b08cc290dc8b784", - "linux-arm64": "75626060c3eeb8b96ce28b5395392e8c69d7c729b641b1d149bfc85ea45d8c25", + "darwin-amd64": "b4c431677bbee74cd5ea765010f222c0bc6be164e65131cda9e055eea2cc964d", + "darwin-arm64": "41dc227e23df9574a52547e622141142bdac450d4e330b8bb3c6e6459032bbe7", + "linux-amd64": "c0041c43fd3545cf4a8b80fd4bcf5caceea0808706a13ced639cb7427170bab3", + "linux-arm64": "7f47fb00bedb3a4609d19b28e773807d6e901ff71157d5e9438d128e371a7ba3", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-deadcode:deadcode-asset:1.41.0", + ID: "com.palantir.godel-okgo-asset-deadcode:deadcode-asset:1.43.0", Checksums: map[string]string{ - "darwin-amd64": "d23289b75cad1c4b4108602cefbe2688425d93e82a661c405b117ddc6f5bd18d", - "darwin-arm64": "59e1cfa3bbe631d0b5dcab5de54c235a4dc4574d1ced6135909e6125dcb0edc0", - "linux-amd64": "681b85257385a66d1d65466b1e70593080aeaf8e9e65a029f2b383661a6edd37", - "linux-arm64": "fe8fa859039d509d82e1cdf1b2245614a2cd01e40159344f72a295b8136ed05e", + "darwin-amd64": "b2ff706012ddc080a59ff814a470b8e68773bde3eb12b4bec5b60e6e31c49926", + "darwin-arm64": "58ce7986f9360c8c522e862f93b69440c6ee1d78843410a8733999b5d24ab981", + "linux-amd64": "cee551ce8fc314e1ac1dacef018e2e32b50d949268924429045819da161f7dd1", + "linux-arm64": "5b99a2567a83ee78bb0e909f9ebdbe39b7bde7c030edd44a7bc6573b79676030", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-errcheck:errcheck-asset:1.43.0", + ID: "com.palantir.godel-okgo-asset-errcheck:errcheck-asset:1.45.0", Checksums: map[string]string{ - "darwin-amd64": "fa3ead0d14b269414db5051fb199ebbc44cded7ce36518a4eceb0939c1308ec5", - "darwin-arm64": "948f266b226286b356792351bc592e4d406af9c6d6bff94ec3e5affcfe9308f6", - "linux-amd64": "e6a2df1665c77bbe397954bf3b579c3909abbe7439d020495d2fb8e3eab5926c", - "linux-arm64": "fe1cd6763be4d865d791718d30b19df3a51e87f037830791b37505108535f5c9", + "darwin-amd64": "a7ff94cd449c5ac733cf3cba34479c52af123f8190ec8367919c3394ffbb0b0f", + "darwin-arm64": "8a164e13260fa878f7a0dbffaf0c5de2c58ea4da8c7cedb9f57e6f12ae01288c", + "linux-amd64": "b1c9ae4a3005f4746c3b28e7dbaaded2106bb5c53e9a09708583c7fd34cdc3f2", + "linux-arm64": "f4208aa531adad2a5b035ec1c932797ae9aa8b69fbabb031cc03d42d638b1dbe", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-golint:golint-asset:1.33.0", + ID: "com.palantir.godel-okgo-asset-golint:golint-asset:1.35.0", Checksums: map[string]string{ - "darwin-amd64": "a2570ee6b446ab97bbe3e51cb54ff60432a1d93f5c608e4bd28b8902663394d1", - "darwin-arm64": "9d171731b84d6e6b7b6e4eb1ee9ad9272fa94a7334c271bef41ecc95bb083ee2", - "linux-amd64": "2f144a4ce2f1af204d071947b0662822de71d8103af0f4e231856d147d89df5a", - "linux-arm64": "53db72a692bc9cf8d501f591b329b19e187106cbdba451b5150ee535131e75bc", + "darwin-amd64": "28e9f90ed0feca152288a1ea0cde3e37abe61508f5889a2a99d48d9636ad2775", + "darwin-arm64": "c34d45c514f3817117b5b6d72a15fd722d357595aa8faa444658c7a5155c9f6d", + "linux-amd64": "106392bdf6038160a04b49027696de28f0f0705f853814a42d8897d42337ac41", + "linux-arm64": "ceefa9f71fa2d3757f6c07d33ab58b0ab102d5df8d0a6e31a757e34dba044fd3", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-govet:govet-asset:1.37.0", + ID: "com.palantir.godel-okgo-asset-govet:govet-asset:1.39.0", Checksums: map[string]string{ - "darwin-amd64": "bf736b38d8e158915edc568b49179c5b29da96c66a2cdb0549499b6ecfa57a84", - "darwin-arm64": "037fdb95f1187adb38e048868358d211283485f43c9eb9ff4f649916583118aa", - "linux-amd64": "03930f7548ad6bc4c61f22af50a3e8c1a3e895d7ae1d9b9d9d9d74617ef58ddc", - "linux-arm64": "30a5323b98b5b3b18684f769f14058554ffc8c534cc727db4ea4b14e3be4444c", + "darwin-amd64": "bbc30142e8e7f3a50c7fd9ab9fec37e1b4f0fede194780dc31e0b99f98eb0be6", + "darwin-arm64": "c30ef977acbcce03bbe28ddd65356099d8c4968acab9af43709cb08047197e77", + "linux-amd64": "105784cd6fdc1bad680c6e4573b00a2fe8baa5062301d95573d5e77ad15bc6a7", + "linux-arm64": "66a3d494e5b64865e1819b0c21c19543505012461172c7cd19344fc6ed96b7f8", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-importalias:importalias-asset:1.36.0", + ID: "com.palantir.godel-okgo-asset-importalias:importalias-asset:1.38.0", Checksums: map[string]string{ - "darwin-amd64": "792194a33f21d7b9d814297de5cbe76522ae7e2528edc653c1b977deb7cb88e6", - "darwin-arm64": "e0996c773acfaf916be1034ce83944c1dd3dafc4f6776ea62bec224d89cb10e3", - "linux-amd64": "e4d6f3f55196e40c3e572e29196846b21b5f9110ad82fc3fcf05d514060d59f0", - "linux-arm64": "85e1f748dd829e608af9b043d7bb04124313ef7cddd358aa1beafdc394f0ea8d", + "darwin-amd64": "f9dc427f211422553959ab41b5cc30118ccbc77f87763791181f1ad069dff8c1", + "darwin-arm64": "8e8031405ff1d277ad1d8173d3d2d11772944a32559c1856f136f4dab1eb76b7", + "linux-amd64": "0a72ba7f6c86b77149976bf44931c366e60daa450d76ef6ffc083a6975a3f1a1", + "linux-arm64": "f1926fb8edf6f8a91e598268b61d120aa14cb8378ba2ffecd9097553e647365c", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-ineffassign:ineffassign-asset:1.39.0", + ID: "com.palantir.godel-okgo-asset-ineffassign:ineffassign-asset:1.41.0", Checksums: map[string]string{ - "darwin-amd64": "440ab24afd1fe8e529b97bbc66b183b9230d3888909bf99794ab19bf113f3c93", - "darwin-arm64": "0cb6d801145b0c5f7c837bddf8d2609aae8d5477c99f4c4d8b51df1069e7eea0", - "linux-amd64": "049f653769fe9c51c2811b181c35e1045e00f12ab3efe3361bd26fe4845a0a2c", - "linux-arm64": "25ec7757442463579d4afdd0bee736269f63f2923649690d8a57f13c024d2515", + "darwin-amd64": "565c76eac920f4b25e5815410d537e520d929a61acf8f961419cb7f1905a00ca", + "darwin-arm64": "310407f55de28142e780bde23dec748a7ad5b225bcda20a8899f8e2fe63d084e", + "linux-amd64": "f06800336614acce306110c0caa5391e641adff43d9cb98d1da7d9d047eb9878", + "linux-arm64": "031352197220d9c8ece866499b19518868eeed20cf1ef1cf355ba0f9b6e4cbb7", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-outparamcheck:outparamcheck-asset:1.41.0", + ID: "com.palantir.godel-okgo-asset-outparamcheck:outparamcheck-asset:1.43.0", Checksums: map[string]string{ - "darwin-amd64": "10f66d080e9d63e852bb5279340ee729c9ade792d127377e71211e711ae32dcf", - "darwin-arm64": "5033a578733aa4d8b369dd50f0148fd1de6f6ef113ab7a024d977e5588ba8372", - "linux-amd64": "8b26ad008b90370fef219a1f377db55a77b9358fddacab4dcd83aed8d9176d33", - "linux-arm64": "f0a629aaeceb976d7a90ca6c7a2aa82c346e21acad38d83353cc1382ae55acad", + "darwin-amd64": "a655a3d8e24a57be77f81fe2acc15a0b4d06ea47f99f16dbd364d88b5b03dc51", + "darwin-arm64": "5ebddbf67f9766e50ef4119f0743a46f6f9a03d00608e2e20d066524b87b9aae", + "linux-amd64": "7e425c8aa7934f936efd8f7f4990f2e498bab5bd672b451b4e122e83ecb9439b", + "linux-arm64": "c48e729b31c9358e8a4741edc3f7f152841c9601424d9ebe85cd6fae24e1dd5a", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-unconvert:unconvert-asset:1.41.0", + ID: "com.palantir.godel-okgo-asset-unconvert:unconvert-asset:1.43.0", Checksums: map[string]string{ - "darwin-amd64": "f91100ed466878c2d90ac0eb9015a7118c47851bc79da22ae501741188133457", - "darwin-arm64": "5ffa8811a45c548d0dc6b2b564d03ea195af64d06320949c8fe7937a511e4cbc", - "linux-amd64": "d1bb7fa881c62c626d1c5004faf503f04af222507550251e9ac027a23683cf06", - "linux-arm64": "be61cb34fa0cb747e37432a078b20b2ad71b23c28ac82c77716016fa4cd18c9a", + "darwin-amd64": "b3c113ff080f1cfd0362f05cb1e1e8d5deab3e5927299b83f18bc24434982462", + "darwin-arm64": "9cad5c3b2b6251bc8ae072f9449860ab4379a8dec0221a873d55e0f544ca8694", + "linux-amd64": "a4e17a17b9d5d79f69a61127c4172f24fd2e94f91e77bc3501f575ee607f2aaf", + "linux-arm64": "55bd459d1a13589bf244613b9443efdface36f26d4402afb6cf58f985d1d38cc", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-varcheck:varcheck-asset:1.41.0", + ID: "com.palantir.godel-okgo-asset-varcheck:varcheck-asset:1.43.0", Checksums: map[string]string{ - "darwin-amd64": "696b297e23fda0ba14e5c17cc09e34bb43153b8e056157560e061f64617e976f", - "darwin-arm64": "20d56d9bfbf9c8a80a3dddbcbc8097916ff9d783f370b988a4ec5da9ec3e4486", - "linux-amd64": "efff7e5d89425fb437bbb1b61eb78cfeb58c6b879001249af3636165e516c6ba", - "linux-arm64": "d37ca39359908896b6e01565ccac8e4bcfdc895529d46d7b5d8a551711e6ec03", + "darwin-amd64": "14aaeb4e3c7703f069c2bd09cb688d259250c24410a2338340c09ab2556adc39", + "darwin-arm64": "895e984172fc2ec81f3bbe6972926ea9accbec259745cf82b2557297272e980a", + "linux-amd64": "375a52172f4a779f1e87a6ea658ad4a2fe169b42a3d9730c5c4cc58b02c5ae3a", + "linux-arm64": "0a1b0894e611d774fbae7af7c97324a28757982fe506b4019ca638930187632e", }, }), }, @@ -210,12 +210,12 @@ var defaultPluginsConfig = config.PluginsConfig{ { LocatorWithResolverConfig: config.ToLocatorWithResolverConfig(config.LocatorWithResolverConfig{ Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-license-plugin:license-plugin:1.39.0", + ID: "com.palantir.godel-license-plugin:license-plugin:1.41.0", Checksums: map[string]string{ - "darwin-amd64": "0bb1c73f447afcb7b20f7a1b24822816cd4dda83969d660b1d23bd6af722b247", - "darwin-arm64": "c22150d2508585bf9c2314938b454c23edeb4aa65072d6a03765ce9527ea3fc4", - "linux-amd64": "4f6b20bd8bb366ea6297dfbd900c7d62a937403a6e861434af1d90e0d64eaeee", - "linux-arm64": "72800b7fcade406869e422d7c204537b541eb73424bf1d00e42639e7963b12e4", + "darwin-amd64": "aa280a42a88b38c29ffa446fb3cb46a8b77f508b28cb533460866785d61b8023", + "darwin-arm64": "199ec09d2592a4fcedd6007dc64074fcaade91789ff1b8e6fe914a6de974395e", + "linux-amd64": "f746c89ca7a899ad7560a9cf6d42c088c2c9fcb012078c5c5e38af6fc019d12a", + "linux-arm64": "034f4e4e018960fbeaf58e69398cdf4069b8e2a4f191b74c1eb4bb6dac8a1502", }, }), }), @@ -223,12 +223,12 @@ var defaultPluginsConfig = config.PluginsConfig{ { LocatorWithResolverConfig: config.ToLocatorWithResolverConfig(config.LocatorWithResolverConfig{ Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-test-plugin:test-plugin:1.38.0", + ID: "com.palantir.godel-test-plugin:test-plugin:1.40.0", Checksums: map[string]string{ - "darwin-amd64": "eb124ce49e48db5d53ed11cfb47e8a9e450f9dfe485368b222c2b94a6dec390b", - "darwin-arm64": "275b9f409ead2bd1857602a975a5980fd125dcf33d6fb055ae1eb052433255f5", - "linux-amd64": "719fdbb28b2771c49658ee00dc17d339f998fad8415fdc430b72be371de02e7a", - "linux-arm64": "ae14f8616e10c1bf73a8a2cd6ae4993b6f00a7a70775cd43072b9a110343d081", + "darwin-amd64": "a6651b144c7bf3d342566b223005224b3b16931596ebed233785a23b5ae6b88e", + "darwin-arm64": "3a6b453a9b3aa46d20d619fc5b8591c718fb203c0d6c4128b88940f083bfef07", + "linux-amd64": "47321c14a7a8283d429072b8dc6798ba0e8d3549574baee56a7a27b177692783", + "linux-arm64": "a2f4d958066875b67f2d2ed505f410e883046795cf9359a91c01bc316acd2de5", }, }), }), diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index fdcaa974..4ed2e488 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -263,6 +263,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -549,6 +550,7 @@ ccflags="$@" $2 !~ "NLA_TYPE_MASK" && $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || + $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 93a38a97..877a62b4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -502,6 +502,7 @@ const ( BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 + BPF_JCOND = 0xe0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 @@ -657,6 +658,9 @@ const ( CAN_NPROTO = 0x8 CAN_RAW = 0x1 CAN_RAW_FILTER_MAX = 0x200 + CAN_RAW_XL_VCID_RX_FILTER = 0x4 + CAN_RAW_XL_VCID_TX_PASS = 0x2 + CAN_RAW_XL_VCID_TX_SET = 0x1 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -1339,6 +1343,7 @@ const ( F_OFD_SETLK = 0x25 F_OFD_SETLKW = 0x26 F_OK = 0x0 + F_SEAL_EXEC = 0x20 F_SEAL_FUTURE_WRITE = 0x10 F_SEAL_GROW = 0x4 F_SEAL_SEAL = 0x1 @@ -1627,6 +1632,7 @@ const ( IP_FREEBIND = 0xf IP_HDRINCL = 0x3 IP_IPSEC_POLICY = 0x10 + IP_LOCAL_PORT_RANGE = 0x33 IP_MAXPACKET = 0xffff IP_MAX_MEMBERSHIPS = 0x14 IP_MF = 0x2000 @@ -1653,6 +1659,7 @@ const ( IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 + IP_PROTOCOL = 0x34 IP_RECVERR = 0xb IP_RECVERR_RFC4884 = 0x1a IP_RECVFRAGSIZE = 0x19 @@ -2169,7 +2176,7 @@ const ( NFT_SECMARK_CTX_MAXLEN = 0x100 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 - NFT_TABLE_F_MASK = 0x3 + NFT_TABLE_F_MASK = 0x7 NFT_TABLE_MAXNAMELEN = 0x100 NFT_TRACETYPE_MAX = 0x3 NFT_TUNNEL_F_MASK = 0x7 @@ -2403,6 +2410,7 @@ const ( PERF_RECORD_MISC_USER = 0x2 PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 + PID_FS_MAGIC = 0x50494446 PIPEFS_MAGIC = 0x50495045 PPPIOCGNPMODE = 0xc008744c PPPIOCNEWUNIT = 0xc004743e @@ -2896,8 +2904,9 @@ const ( RWF_APPEND = 0x10 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 + RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0x1f + RWF_SUPPORTED = 0x3f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 @@ -2918,7 +2927,9 @@ const ( SCHED_RESET_ON_FORK = 0x40000000 SCHED_RR = 0x2 SCM_CREDENTIALS = 0x2 + SCM_PIDFD = 0x4 SCM_RIGHTS = 0x1 + SCM_SECURITY = 0x3 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 SECCOMP_ADDFD_FLAG_SEND = 0x2 @@ -3051,6 +3062,8 @@ const ( SIOCSMIIREG = 0x8949 SIOCSRARP = 0x8962 SIOCWANDEV = 0x894a + SK_DIAG_BPF_STORAGE_MAX = 0x3 + SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1 SMACK_MAGIC = 0x43415d53 SMART_AUTOSAVE = 0xd2 SMART_AUTO_OFFLINE = 0xdb @@ -3071,6 +3084,8 @@ const ( SOCKFS_MAGIC = 0x534f434b SOCK_BUF_LOCK_MASK = 0x3 SOCK_DCCP = 0x6 + SOCK_DESTROY = 0x15 + SOCK_DIAG_BY_FAMILY = 0x14 SOCK_IOC_TYPE = 0x89 SOCK_PACKET = 0xa SOCK_RAW = 0x3 @@ -3260,6 +3275,7 @@ const ( TCP_MAX_WINSHIFT = 0xe TCP_MD5SIG = 0xe TCP_MD5SIG_EXT = 0x20 + TCP_MD5SIG_FLAG_IFINDEX = 0x2 TCP_MD5SIG_FLAG_PREFIX = 0x1 TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 42ff8c3c..e4bc0bd5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 + MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index dca43600..689317af 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 + MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index d8cae6d1..14270508 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -87,6 +87,7 @@ const ( FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 + FPMR_MAGIC = 0x46504d52 FPSIMD_MAGIC = 0x46508001 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 0036746e..4740b834 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -4605,7 +4605,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x149 + NL80211_ATTR_MAX = 0x14a NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -5209,7 +5209,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x1f + NL80211_FREQUENCY_ATTR_MAX = 0x20 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5703,7 +5703,7 @@ const ( NL80211_STA_FLAG_ASSOCIATED = 0x7 NL80211_STA_FLAG_AUTHENTICATED = 0x5 NL80211_STA_FLAG_AUTHORIZED = 0x1 - NL80211_STA_FLAG_MAX = 0x7 + NL80211_STA_FLAG_MAX = 0x8 NL80211_STA_FLAG_MAX_OLD_API = 0x6 NL80211_STA_FLAG_MFP = 0x4 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2 @@ -6001,3 +6001,34 @@ type CachestatRange struct { Off uint64 Len uint64 } + +const ( + SK_MEMINFO_RMEM_ALLOC = 0x0 + SK_MEMINFO_RCVBUF = 0x1 + SK_MEMINFO_WMEM_ALLOC = 0x2 + SK_MEMINFO_SNDBUF = 0x3 + SK_MEMINFO_FWD_ALLOC = 0x4 + SK_MEMINFO_WMEM_QUEUED = 0x5 + SK_MEMINFO_OPTMEM = 0x6 + SK_MEMINFO_BACKLOG = 0x7 + SK_MEMINFO_DROPS = 0x8 + SK_MEMINFO_VARS = 0x9 + SKNLGRP_NONE = 0x0 + SKNLGRP_INET_TCP_DESTROY = 0x1 + SKNLGRP_INET_UDP_DESTROY = 0x2 + SKNLGRP_INET6_TCP_DESTROY = 0x3 + SKNLGRP_INET6_UDP_DESTROY = 0x4 + SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0 + SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1 + SK_DIAG_BPF_STORAGE_REP_NONE = 0x0 + SK_DIAG_BPF_STORAGE = 0x1 + SK_DIAG_BPF_STORAGE_NONE = 0x0 + SK_DIAG_BPF_STORAGE_PAD = 0x1 + SK_DIAG_BPF_STORAGE_MAP_ID = 0x2 + SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3 +) + +type SockDiagReq struct { + Family uint8 + Protocol uint8 +} diff --git a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go index 333676b7..c6e7c0d4 100644 --- a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go +++ b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go @@ -13,6 +13,7 @@ import ( "golang.org/x/tools/internal/gocommand" ) +// TODO(adonovan): move back into go/packages. func GetSizesForArgsGolist(ctx context.Context, inv gocommand.Invocation, gocmdRunner *gocommand.Runner) (string, string, error) { inv.Verb = "list" inv.Args = []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"} diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go index a8d7b06a..3531ac8f 100644 --- a/vendor/golang.org/x/tools/go/packages/doc.go +++ b/vendor/golang.org/x/tools/go/packages/doc.go @@ -198,14 +198,6 @@ Instead, ssadump no longer requests the runtime package, but seeks it among the dependencies of the user-specified packages, and emits an error if it is not found. -Overlays: The Overlay field in the Config allows providing alternate contents -for Go source files, by providing a mapping from file path to contents. -go/packages will pull in new imports added in overlay files when go/packages -is run in LoadImports mode or greater. -Overlay support for the go list driver isn't complete yet: if the file doesn't -exist on disk, it will only be recognized in an overlay if it is a non-test file -and the package would be reported even without the overlay. - Questions & Tasks - Add GOARCH/GOOS? diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go index 4335c1eb..c2b4b711 100644 --- a/vendor/golang.org/x/tools/go/packages/external.go +++ b/vendor/golang.org/x/tools/go/packages/external.go @@ -34,8 +34,8 @@ type DriverRequest struct { // Tests specifies whether the patterns should also return test packages. Tests bool `json:"tests"` - // Overlay maps file paths (relative to the driver's working directory) to the byte contents - // of overlay files. + // Overlay maps file paths (relative to the driver's working directory) + // to the contents of overlay files (see Config.Overlay). Overlay map[string][]byte `json:"overlay"` } @@ -119,7 +119,19 @@ func findExternalDriver(cfg *Config) driver { stderr := new(bytes.Buffer) cmd := exec.CommandContext(cfg.Context, tool, words...) cmd.Dir = cfg.Dir - cmd.Env = cfg.Env + // The cwd gets resolved to the real path. On Darwin, where + // /tmp is a symlink, this breaks anything that expects the + // working directory to keep the original path, including the + // go command when dealing with modules. + // + // os.Getwd stdlib has a special feature where if the + // cwd and the PWD are the same node then it trusts + // the PWD, so by setting it in the env for the child + // process we fix up all the paths returned by the go + // command. + // + // (See similar trick in Invocation.run in ../../internal/gocommand/invoke.go) + cmd.Env = append(slicesClip(cfg.Env), "PWD="+cfg.Dir) cmd.Stdin = bytes.NewReader(req) cmd.Stdout = buf cmd.Stderr = stderr @@ -138,3 +150,7 @@ func findExternalDriver(cfg *Config) driver { return &response, nil } } + +// slicesClip removes unused capacity from the slice, returning s[:len(s):len(s)]. +// TODO(adonovan): use go1.21 slices.Clip. +func slicesClip[S ~[]E, E any](s S) S { return s[:len(s):len(s)] } diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go index 22305d9c..d9be410a 100644 --- a/vendor/golang.org/x/tools/go/packages/golist.go +++ b/vendor/golang.org/x/tools/go/packages/golist.go @@ -841,6 +841,7 @@ func (state *golistState) cfgInvocation() gocommand.Invocation { Env: cfg.Env, Logf: cfg.Logf, WorkingDir: cfg.Dir, + Overlay: cfg.goListOverlayFile, } } @@ -849,26 +850,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, cfg := state.cfg inv := state.cfgInvocation() - - // For Go versions 1.16 and above, `go list` accepts overlays directly via - // the -overlay flag. Set it, if it's available. - // - // The check for "list" is not necessarily required, but we should avoid - // getting the go version if possible. - if verb == "list" { - goVersion, err := state.getGoVersion() - if err != nil { - return nil, err - } - if goVersion >= 16 { - filename, cleanup, err := state.writeOverlays() - if err != nil { - return nil, err - } - defer cleanup() - inv.Overlay = filename - } - } inv.Verb = verb inv.Args = args gocmdRunner := cfg.gocmdRunner @@ -1015,67 +996,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, return stdout, nil } -// OverlayJSON is the format overlay files are expected to be in. -// The Replace map maps from overlaid paths to replacement paths: -// the Go command will forward all reads trying to open -// each overlaid path to its replacement path, or consider the overlaid -// path not to exist if the replacement path is empty. -// -// From golang/go#39958. -type OverlayJSON struct { - Replace map[string]string `json:"replace,omitempty"` -} - -// writeOverlays writes out files for go list's -overlay flag, as described -// above. -func (state *golistState) writeOverlays() (filename string, cleanup func(), err error) { - // Do nothing if there are no overlays in the config. - if len(state.cfg.Overlay) == 0 { - return "", func() {}, nil - } - dir, err := os.MkdirTemp("", "gopackages-*") - if err != nil { - return "", nil, err - } - // The caller must clean up this directory, unless this function returns an - // error. - cleanup = func() { - os.RemoveAll(dir) - } - defer func() { - if err != nil { - cleanup() - } - }() - overlays := map[string]string{} - for k, v := range state.cfg.Overlay { - // Create a unique filename for the overlaid files, to avoid - // creating nested directories. - noSeparator := strings.Join(strings.Split(filepath.ToSlash(k), "/"), "") - f, err := os.CreateTemp(dir, fmt.Sprintf("*-%s", noSeparator)) - if err != nil { - return "", func() {}, err - } - if _, err := f.Write(v); err != nil { - return "", func() {}, err - } - if err := f.Close(); err != nil { - return "", func() {}, err - } - overlays[k] = f.Name() - } - b, err := json.Marshal(OverlayJSON{Replace: overlays}) - if err != nil { - return "", func() {}, err - } - // Write out the overlay file that contains the filepath mappings. - filename = filepath.Join(dir, "overlay.json") - if err := os.WriteFile(filename, b, 0665); err != nil { - return "", func() {}, err - } - return filename, cleanup, nil -} - func containsGoFile(s []string) bool { for _, f := range s { if strings.HasSuffix(f, ".go") { diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go index 3ea1b3fa..34306ddd 100644 --- a/vendor/golang.org/x/tools/go/packages/packages.go +++ b/vendor/golang.org/x/tools/go/packages/packages.go @@ -37,10 +37,20 @@ import ( // A LoadMode controls the amount of detail to return when loading. // The bits below can be combined to specify which fields should be // filled in the result packages. +// // The zero value is a special case, equivalent to combining // the NeedName, NeedFiles, and NeedCompiledGoFiles bits. +// // ID and Errors (if present) will always be filled. -// Load may return more information than requested. +// [Load] may return more information than requested. +// +// Unfortunately there are a number of open bugs related to +// interactions among the LoadMode bits: +// - https://github.com/golang/go/issues/48226 +// - https://github.com/golang/go/issues/56633 +// - https://github.com/golang/go/issues/56677 +// - https://github.com/golang/go/issues/58726 +// - https://github.com/golang/go/issues/63517 type LoadMode int const ( @@ -123,7 +133,14 @@ const ( // A Config specifies details about how packages should be loaded. // The zero value is a valid configuration. +// // Calls to Load do not modify this struct. +// +// TODO(adonovan): #67702: this is currently false: in fact, +// calls to [Load] do not modify the public fields of this struct, but +// may modify hidden fields, so concurrent calls to [Load] must not +// use the same Config. But perhaps we should reestablish the +// documented invariant. type Config struct { // Mode controls the level of information returned for each package. Mode LoadMode @@ -199,13 +216,23 @@ type Config struct { // setting Tests may have no effect. Tests bool - // Overlay provides a mapping of absolute file paths to file contents. - // If the file with the given path already exists, the parser will use the - // alternative file contents provided by the map. + // Overlay is a mapping from absolute file paths to file contents. + // + // For each map entry, [Load] uses the alternative file + // contents provided by the overlay mapping instead of reading + // from the file system. This mechanism can be used to enable + // editor-integrated tools to correctly analyze the contents + // of modified but unsaved buffers, for example. // - // Overlays provide incomplete support for when a given file doesn't - // already exist on disk. See the package doc above for more details. + // The overlay mapping is passed to the build system's driver + // (see "The driver protocol") so that it too can report + // consistent package metadata about unsaved files. However, + // drivers may vary in their level of support for overlays. Overlay map[string][]byte + + // goListOverlayFile is the JSON file that encodes the Overlay + // mapping, used by 'go list -overlay=...' + goListOverlayFile string } // Load loads and returns the Go packages named by the given patterns. @@ -213,6 +240,20 @@ type Config struct { // Config specifies loading options; // nil behaves the same as an empty Config. // +// The [Config.Mode] field is a set of bits that determine what kinds +// of information should be computed and returned. Modes that require +// more information tend to be slower. See [LoadMode] for details +// and important caveats. Its zero value is equivalent to +// NeedName | NeedFiles | NeedCompiledGoFiles. +// +// Each call to Load returns a new set of [Package] instances. +// The Packages and their Imports form a directed acyclic graph. +// +// If the [NeedTypes] mode flag was set, each call to Load uses a new +// [types.Importer], so [types.Object] and [types.Type] values from +// different calls to Load must not be mixed as they will have +// inconsistent notions of type identity. +// // If any of the patterns was invalid as defined by the // underlying build system, Load returns an error. // It may return an empty list of packages without an error, @@ -286,6 +327,17 @@ func defaultDriver(cfg *Config, patterns ...string) (*DriverResponse, bool, erro // (fall through) } + // go list fallback + // + // Write overlays once, as there are many calls + // to 'go list' (one per chunk plus others too). + overlay, cleanupOverlay, err := gocommand.WriteOverlays(cfg.Overlay) + if err != nil { + return nil, false, err + } + defer cleanupOverlay() + cfg.goListOverlayFile = overlay + response, err := callDriverOnChunks(goListDriver, cfg, chunks) if err != nil { return nil, false, err @@ -365,6 +417,9 @@ func mergeResponses(responses ...*DriverResponse) *DriverResponse { } // A Package describes a loaded Go package. +// +// It also defines part of the JSON schema of [DriverResponse]. +// See the package documentation for an overview. type Package struct { // ID is a unique identifier for a package, // in a syntax provided by the underlying build system. @@ -423,6 +478,13 @@ type Package struct { // to corresponding loaded Packages. Imports map[string]*Package + // Module is the module information for the package if it exists. + // + // Note: it may be missing for std and cmd; see Go issue #65816. + Module *Module + + // -- The following fields are not part of the driver JSON schema. -- + // Types provides type information for the package. // The NeedTypes LoadMode bit sets this field for packages matching the // patterns; type information for dependencies may be missing or incomplete, @@ -431,15 +493,15 @@ type Package struct { // Each call to [Load] returns a consistent set of type // symbols, as defined by the comment at [types.Identical]. // Avoid mixing type information from two or more calls to [Load]. - Types *types.Package + Types *types.Package `json:"-"` // Fset provides position information for Types, TypesInfo, and Syntax. // It is set only when Types is set. - Fset *token.FileSet + Fset *token.FileSet `json:"-"` // IllTyped indicates whether the package or any dependency contains errors. // It is set only when Types is set. - IllTyped bool + IllTyped bool `json:"-"` // Syntax is the package's syntax trees, for the files listed in CompiledGoFiles. // @@ -449,26 +511,28 @@ type Package struct { // // Syntax is kept in the same order as CompiledGoFiles, with the caveat that nils are // removed. If parsing returned nil, Syntax may be shorter than CompiledGoFiles. - Syntax []*ast.File + Syntax []*ast.File `json:"-"` // TypesInfo provides type information about the package's syntax trees. // It is set only when Syntax is set. - TypesInfo *types.Info + TypesInfo *types.Info `json:"-"` // TypesSizes provides the effective size function for types in TypesInfo. - TypesSizes types.Sizes + TypesSizes types.Sizes `json:"-"` + + // -- internal -- // forTest is the package under test, if any. forTest string // depsErrors is the DepsErrors field from the go list response, if any. depsErrors []*packagesinternal.PackageError - - // module is the module information for the package if it exists. - Module *Module } // Module provides module information for a package. +// +// It also defines part of the JSON schema of [DriverResponse]. +// See the package documentation for an overview. type Module struct { Path string // module path Version string // module version @@ -601,6 +665,7 @@ func (p *Package) UnmarshalJSON(b []byte) error { OtherFiles: flat.OtherFiles, EmbedFiles: flat.EmbedFiles, EmbedPatterns: flat.EmbedPatterns, + IgnoredFiles: flat.IgnoredFiles, ExportFile: flat.ExportFile, } if len(flat.Imports) > 0 { diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go index eb7a8282..af0ee6c6 100644 --- a/vendor/golang.org/x/tools/internal/gocommand/invoke.go +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go @@ -8,12 +8,14 @@ package gocommand import ( "bytes" "context" + "encoding/json" "errors" "fmt" "io" "log" "os" "os/exec" + "path/filepath" "reflect" "regexp" "runtime" @@ -167,7 +169,9 @@ type Invocation struct { // TODO(rfindley): remove, in favor of Args. ModFile string - // If Overlay is set, the go command is invoked with -overlay=Overlay. + // Overlay is the name of the JSON overlay file that describes + // unsaved editor buffers; see [WriteOverlays]. + // If set, the go command is invoked with -overlay=Overlay. // TODO(rfindley): remove, in favor of Args. Overlay string @@ -255,12 +259,15 @@ func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { waitDelay.Set(reflect.ValueOf(30 * time.Second)) } - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the + // The cwd gets resolved to the real path. On Darwin, where + // /tmp is a symlink, this breaks anything that expects the + // working directory to keep the original path, including the // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. + // + // os.Getwd has a special feature where if the cwd and the PWD + // are the same node then it trusts the PWD, so by setting it + // in the env for the child process we fix up all the paths + // returned by the go command. if !i.CleanEnv { cmd.Env = os.Environ() } @@ -351,6 +358,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { } } + startTime := time.Now() err = cmd.Start() if stdoutW != nil { // The child process has inherited the pipe file, @@ -377,7 +385,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { case err := <-resChan: return err case <-timer.C: - HandleHangingGoCommand(cmd.Process) + HandleHangingGoCommand(startTime, cmd) case <-ctx.Done(): } } else { @@ -411,7 +419,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { return <-resChan } -func HandleHangingGoCommand(proc *os.Process) { +func HandleHangingGoCommand(start time.Time, cmd *exec.Cmd) { switch runtime.GOOS { case "linux", "darwin", "freebsd", "netbsd": fmt.Fprintln(os.Stderr, `DETECTED A HANGING GO COMMAND @@ -444,7 +452,7 @@ See golang/go#54461 for more details.`) panic(fmt.Sprintf("running %s: %v", listFiles, err)) } } - panic(fmt.Sprintf("detected hanging go command (pid %d): see golang/go#54461 for more details", proc.Pid)) + panic(fmt.Sprintf("detected hanging go command (golang/go#54461); waited %s\n\tcommand:%s\n\tpid:%d", time.Since(start), cmd, cmd.Process.Pid)) } func cmdDebugStr(cmd *exec.Cmd) string { @@ -468,3 +476,73 @@ func cmdDebugStr(cmd *exec.Cmd) string { } return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], strings.Join(args, " ")) } + +// WriteOverlays writes each value in the overlay (see the Overlay +// field of go/packages.Config) to a temporary file and returns the name +// of a JSON file describing the mapping that is suitable for the "go +// list -overlay" flag. +// +// On success, the caller must call the cleanup function exactly once +// when the files are no longer needed. +func WriteOverlays(overlay map[string][]byte) (filename string, cleanup func(), err error) { + // Do nothing if there are no overlays in the config. + if len(overlay) == 0 { + return "", func() {}, nil + } + + dir, err := os.MkdirTemp("", "gocommand-*") + if err != nil { + return "", nil, err + } + + // The caller must clean up this directory, + // unless this function returns an error. + // (The cleanup operand of each return + // statement below is ignored.) + defer func() { + cleanup = func() { + os.RemoveAll(dir) + } + if err != nil { + cleanup() + cleanup = nil + } + }() + + // Write each map entry to a temporary file. + overlays := make(map[string]string) + for k, v := range overlay { + // Use a unique basename for each file (001-foo.go), + // to avoid creating nested directories. + base := fmt.Sprintf("%d-%s.go", 1+len(overlays), filepath.Base(k)) + filename := filepath.Join(dir, base) + err := os.WriteFile(filename, v, 0666) + if err != nil { + return "", nil, err + } + overlays[k] = filename + } + + // Write the JSON overlay file that maps logical file names to temp files. + // + // OverlayJSON is the format overlay files are expected to be in. + // The Replace map maps from overlaid paths to replacement paths: + // the Go command will forward all reads trying to open + // each overlaid path to its replacement path, or consider the overlaid + // path not to exist if the replacement path is empty. + // + // From golang/go#39958. + type OverlayJSON struct { + Replace map[string]string `json:"replace,omitempty"` + } + b, err := json.Marshal(OverlayJSON{Replace: overlays}) + if err != nil { + return "", nil, err + } + filename = filepath.Join(dir, "overlay.json") + if err := os.WriteFile(filename, b, 0666); err != nil { + return "", nil, err + } + + return filename, nil, nil +} diff --git a/vendor/golang.org/x/tools/internal/versions/types_go122.go b/vendor/golang.org/x/tools/internal/versions/types_go122.go index e8180632..aac5db62 100644 --- a/vendor/golang.org/x/tools/internal/versions/types_go122.go +++ b/vendor/golang.org/x/tools/internal/versions/types_go122.go @@ -12,7 +12,7 @@ import ( "go/types" ) -// FileVersions returns a file's Go version. +// FileVersion returns a file's Go version. // The reported version is an unknown Future version if a // version cannot be determined. func FileVersion(info *types.Info, file *ast.File) string { diff --git a/vendor/modules.txt b/vendor/modules.txt index 91bffb01..51d69d74 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -69,7 +69,7 @@ github.com/nmiyake/pkg/gofiles # github.com/nwaples/rardecode v1.0.0 ## explicit github.com/nwaples/rardecode -# github.com/palantir/godel/v2 v2.107.0 +# github.com/palantir/godel/v2 v2.108.0 ## explicit; go 1.21 github.com/palantir/godel/v2/framework/artifactresolver github.com/palantir/godel/v2/framework/builtintasks @@ -145,16 +145,16 @@ github.com/ulikunitz/xz/lzma # github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 ## explicit github.com/xi2/xz -# golang.org/x/mod v0.17.0 +# golang.org/x/mod v0.18.0 ## explicit; go 1.18 golang.org/x/mod/semver # golang.org/x/sync v0.7.0 ## explicit; go 1.18 golang.org/x/sync/errgroup -# golang.org/x/sys v0.20.0 +# golang.org/x/sys v0.21.0 ## explicit; go 1.18 golang.org/x/sys/unix -# golang.org/x/tools v0.21.0 +# golang.org/x/tools v0.22.0 ## explicit; go 1.19 golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/internal/packagesdriver