diff --git a/go.mod b/go.mod index 2c5ca6ee..580d2005 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/nmiyake/pkg/gofiles v1.2.0 - github.com/palantir/godel/v2 v2.95.0 + github.com/palantir/godel/v2 v2.96.0 github.com/palantir/okgo v1.42.0 github.com/palantir/pkg/cobracli v1.2.0 github.com/pkg/errors v0.9.1 @@ -45,6 +45,6 @@ require ( github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.14.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.16.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index d561b65a..40818c46 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/nwaples/rardecode v1.0.0 h1:r7vGuS5akxOnR4JQSkko62RJ1ReCMXxQRPtxsiFMB github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/palantir/amalgomate v1.35.0 h1:cPkHFcQHXcj6r92v3cOGV3/3L3+Ci3iHh99MRZG0L7Q= github.com/palantir/amalgomate v1.35.0/go.mod h1:nIJ2u611kps25zPhdcLC4QM4Cs3We8pdG+hF7/hdp+k= -github.com/palantir/godel/v2 v2.95.0 h1:hIw12XbAo33SyFaFhjlJAHKQP8VLWtLjnI3OlFfXFu0= -github.com/palantir/godel/v2 v2.95.0/go.mod h1:t0gYySCtv9GePmFr0rt8SR3uuI681xzl1DUsr+h/gRQ= +github.com/palantir/godel/v2 v2.96.0 h1:HIuQSKnqFurVYqF/VSP8J/uEjxYKy45Bvrb5Vrq4W14= +github.com/palantir/godel/v2 v2.96.0/go.mod h1:yAJ30vkjIQILr49QjZBEAW98GF0KnW0ioS9FIBYUlMA= github.com/palantir/okgo v1.42.0 h1:93O6KbbQMhyMwDgeDCWHuLBWE0ZUu5xD6mh5QTJdr/s= github.com/palantir/okgo v1.42.0/go.mod h1:5GBwRvE8OUIVUxrVtjuPCRbBseWADWukkz1adIJ7Koc= github.com/palantir/pkg v1.1.0 h1:0EhrSUP8oeeh3MUvk7V/UU7WmsN1UiJNTvNj0sN9Cpo= @@ -130,8 +130,8 @@ 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.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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 fe6d529e..10c46c16 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.62.0", + ID: "com.palantir.distgo:dist-plugin:1.63.0", Checksums: map[string]string{ - "darwin-amd64": "d54d3bf32941dddf5150e8a86e52bbcc84e3254633d8736c62336189f5ed74a7", - "darwin-arm64": "835c2dc36cc364c323c3df10ef1cea545b2e4248721302afda927fdea1eef260", - "linux-amd64": "cffbd63d4ce66f15a40220f58b85c0acf0aceca91d8c2a93088fc1b9611c447f", - "linux-arm64": "dcabb1eed25438a730c2ba2a0585b4bd248b8c97c9a3b535f48a43b28388fc61", + "darwin-amd64": "10f0802ab2cfe7d2a44895bc1ae75a8b215fd7e7bbff8795dd4ddec408c5e11f", + "darwin-arm64": "ea6b15994e2d26d988eda7ad270e677e34b4fe3b04e49138d9f7d77068387121", + "linux-amd64": "c43d28370ba090283adc3bba62acffb96b17232dc3aea970ea74a22b7b509bb3", + "linux-arm64": "07168d6cad6bdd19a64f28a521effe48488d2a70adb11a72a1cdbe11734fe87a", }, }), }), @@ -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.36.0", + ID: "com.palantir.godel-format-plugin:format-plugin:1.37.0", Checksums: map[string]string{ - "darwin-amd64": "6c6166daeafa129f75cb96150c7b91f652439b01d2fe94409c68cd0cc8abd15c", - "darwin-arm64": "57e7c2b0c63434894d3da7b7a626508cc91b1f52db89bd36ba74f29a96865be5", - "linux-amd64": "ebff909f9e2cf450337487f6101945fd331569d86968eb139c42c1f479408815", - "linux-arm64": "5e9673a0117b80de37d09c653071d1436e545354a10a7456d7537c4205873eb2", + "darwin-amd64": "204408d8f28157c4f8c93b13d231c49bf4bf47104b09cb982042c0301be3e21a", + "darwin-arm64": "a3c4305dc39a7435155bf64367499c31fd6e0a8deea418f7c6a2d1ed5ff3841c", + "linux-amd64": "7d58463864ad55e9bac03dacb4789170923d659ba1b1106dbf1bcc7773121c56", + "linux-arm64": "a77041223851e454738664e91c81ff74ee217bd3de8991f30bfe7c6961ab112c", }, }), }), Assets: config.ToLocatorWithResolverConfigs([]config.LocatorWithResolverConfig{ { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-format-asset-ptimports:ptimports-asset:1.35.0", + ID: "com.palantir.godel-format-asset-ptimports:ptimports-asset:1.36.0", Checksums: map[string]string{ - "darwin-amd64": "02b4df7534cc3b7357705cc62551fa11762e0ae2f3a0dc3bc3becca71180d898", - "darwin-arm64": "329d968018a302f7b25ecedae51ecfe5f116990fae7c9b329c32bf6d17ffec9d", - "linux-amd64": "cfe76d907dbdd067820d00dc95d3336b2e22446f1bfaf817919c5342a84197a8", - "linux-arm64": "39cd502f0282bd5e1bafef79704bfbbf79e798f8a20988226a955298f2872bd1", + "darwin-amd64": "41188aa8a53397e0f967ca756aa44d657bc061056575dfc6d70aa0ea12953b14", + "darwin-arm64": "7dc6e6567f2719b75a463568509c5cf2cbabc0c778a5235a0769375270329df7", + "linux-amd64": "367451ea2dbb0640b32ab7f1607d9fd10d191b2115a44d880bddfb9c2d2f36f9", + "linux-arm64": "f01b4d91018b68d778216b0c93197f229bc0ed2e7af179e0a3fd8b67426156c2", }, }), }, @@ -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.32.0", + ID: "com.palantir.godel-goland-plugin:goland-plugin:1.33.0", Checksums: map[string]string{ - "darwin-amd64": "cb591dcfa23198c8c3ea0660ecbedd8cc09fb0c43e73c5940b8a73fc4228cce4", - "darwin-arm64": "269b069cc00e446e84f92c8dcae7e25734baf78c981ad4e636eb7135cf4c9e3d", - "linux-amd64": "8ab9a21b1e209ffec930641f2e3f931d5143cc4bcd3735ab643859d9bcc93920", - "linux-arm64": "9c895312a61ba937c58b0fae94bf31453e712393989e721593d01437c5555c52", + "darwin-amd64": "ac141b8f463f1b505f82e1f3b1e4937205861829a778be9362eb972556e2601d", + "darwin-arm64": "62f60bb74ddf1c8b49fd31165bd385ac0eb158e4b090860e4b90a6dfc69dfc1d", + "linux-amd64": "41380a5fd6ba6eedbdea36b898eab413afc5b65fdd17abf546f57e8ede4fa5fe", + "linux-arm64": "0b372f4da07ba257c7ed05d0993e9867212e06d58e3bdcfbce61088fbf79b2bd", }, }), }), @@ -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.41.0", + ID: "com.palantir.okgo:check-plugin:1.42.0", Checksums: map[string]string{ - "darwin-amd64": "f5fe94fd1ae450fb1db81f7849eb2a310c9f078ab8b0a00cbaab5fd76c4e3ce9", - "darwin-arm64": "2afad9e31824620fe6951b50681065584aeff571cbc093d8fe8ddbf237fe70c9", - "linux-amd64": "182377cad7b730f4ffdc3a34d32eea72cbc4cae7209149314ccc19f27d401606", - "linux-arm64": "96c84efddb2af682f69715362e5df3d413792a1b222d6e03acbfbf7311c25a23", + "darwin-amd64": "0f4c6f34f8ec9082ee654535aa47cbdc4e65c0536303c74cb0dbfb187131126a", + "darwin-arm64": "557b873d672be367611e8ee025a982e479db530b3834524f5aba475db7f34821", + "linux-amd64": "776fc2f004c6952cc1c446aac5ac7909f25d59405a3c008b9e7d47f507f68c63", + "linux-arm64": "2127d6ae5460ed526431a7b7a4dcdcb22323e6aa832ee1903a3bf56a96fe8f60", }, }), }), Assets: config.ToLocatorWithResolverConfigs([]config.LocatorWithResolverConfig{ { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-compiles:compiles-asset:1.40.0", + ID: "com.palantir.godel-okgo-asset-compiles:compiles-asset:1.41.0", Checksums: map[string]string{ - "darwin-amd64": "26d3e84750cf4888712f94085294d39eb2ff4ba26eb9ae196f2966611b064175", - "darwin-arm64": "140e42ecdce73b0ee34da126d8aea49c58086ba0441b1c4704266cbf89c4cf71", - "linux-amd64": "627c5b8c51020094df9b8912212564788fabb466567aa5cfbd0892fe42a832b5", - "linux-arm64": "d2a01ad09e53bab6c69a253fec91f6ecdd9a895df6273883379f4ab69939b9ed", + "darwin-amd64": "07974a5ea35aeb1b29a3fd410bad6b93abff47357253d58c257182d5ccd40a87", + "darwin-arm64": "564ff1eca8e9d162d3d6b57463970579d630d3f04345d377180b91cf4af49671", + "linux-amd64": "7c9fa4863eb24d58e1c0d70be85b4894669444ff2d7a224ab5b315e5c6a1d85f", + "linux-arm64": "e117e27c7ca64d0c855b2fa8e6748c5cab3f9ee7bfe480370f5e857e343e89c4", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-deadcode:deadcode-asset:1.37.0", + ID: "com.palantir.godel-okgo-asset-deadcode:deadcode-asset:1.38.0", Checksums: map[string]string{ - "darwin-amd64": "8db3e1350025e3ffd6a5bee21219cc88e512b3cd9acb25d68db301b398afb036", - "darwin-arm64": "c4931fd33ef48bb7b85ee64a65a0dc3444955b790a653970b0c3fbfdb9d7da10", - "linux-amd64": "aff4a16e7a3fa1c84c051f248f20be7ae59917298c13b1755763407d05cab9e0", - "linux-arm64": "88ee6fd9ddf678616ec1fa3bc9c7ed328cfe1bbd99b028436e48b9381905969f", + "darwin-amd64": "3ad65c67135435b2a89fb126a93c7be540e7b1e062c701864a9f62476a5b939f", + "darwin-arm64": "0be33adf893a3c67ff01e417103be0b942e75603e1c28090e437e17ee9b629fc", + "linux-amd64": "7bd4ad957359ea964e5731e1f90ee81b5fa51a74ed31cc215d813304618acdea", + "linux-arm64": "3a0c6bdd7b444ed2b5b868fb842c7580f8b46e0f1d1d163cb718520dc26ba394", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-errcheck:errcheck-asset:1.38.0", + ID: "com.palantir.godel-okgo-asset-errcheck:errcheck-asset:1.39.0", Checksums: map[string]string{ - "darwin-amd64": "04600bce714e59ebbb68db4885654f37f4bb17f4ae2721d58a27173ba31d244f", - "darwin-arm64": "0f4c7756ea60912da7f824e1561e10c8cb8ad169bbc8ebb67db9f7b35e6fa4c1", - "linux-amd64": "c47fbe54825e9616c44a71b59b20922cf0c64655c1c6735c50dd0955549b927a", - "linux-arm64": "81aa2280321085665b62d1b68720f6d651bedcea4d046cc7e81b6509b1d0af05", + "darwin-amd64": "7de3245c9020e499a796170bcc4449c66b350b5d7ba0d3ac7c39ec2b96ab69da", + "darwin-arm64": "7b29f051ac0a0c9f902cf43ffeba9199a47291e1dbae7805b3d2b4f92f0ffc8e", + "linux-amd64": "605f0ba695f5b75b260ec384da47ebaf866587754d12332276bc71d78f789b4c", + "linux-arm64": "53e999b8aaa594c3528044e0a7936427d3ea144f310261a853ca5cc1e9ba187a", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-golint:golint-asset:1.29.0", + ID: "com.palantir.godel-okgo-asset-golint:golint-asset:1.30.0", Checksums: map[string]string{ - "darwin-amd64": "9de0f221f92290735822c0ed7d8cd83f0fab1e7fd713cdb4c9f394d6ecfc7385", - "darwin-arm64": "0967dc54a3cc4ac57e4fcd958b562cca4dcae89bc74674761af86e05e7424093", - "linux-amd64": "7987637f724be4384e18b1a923d2378df8ce8299b5739a0cf6fdc21f87472b5e", - "linux-arm64": "12f421427aa92a1812b1341d7bc6757b526ba117410fcbba6ba872e67ee05ded", + "darwin-amd64": "b107e5e519c71631fa065aa18925dba88066b07551dd116a603a82f93549fbbd", + "darwin-arm64": "6f0501247f14d6f482c1f37431c503615adf832528cfe9e34d7d80e4d7b122aa", + "linux-amd64": "332c16ca538e309e54a236b69dfe51ca1c98ac949507ee1051c69412a4ee18a7", + "linux-arm64": "97288b6b74048c77091ddfcfc37d94e10b7cd4e0493d715e2c9279aacb5b2480", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-govet:govet-asset:1.33.0", + ID: "com.palantir.godel-okgo-asset-govet:govet-asset:1.34.0", Checksums: map[string]string{ - "darwin-amd64": "8c51ce914ec335c9da31a7694eedb51d5dc43ef7920539068572c32b368a78e8", - "darwin-arm64": "c10521ba9393ddecddbf4368383af859a7af1e28d57a6fb34410fecd112c0d98", - "linux-amd64": "37f82ba2beb4ac09bf89788d16ffec809e715c3e4d71819e17bc61f7480b80bf", - "linux-arm64": "8ddd0c9044a2c7cc09c4bb53a908c36c063c52a42867612342c253d47c826806", + "darwin-amd64": "2ff7a64feaf34376b9a6a58c4a310627d3f064989458dfbdae7e1bfa399d8016", + "darwin-arm64": "53999c3617aa03eb1a7dd39b038d7f0f67dae0f23c85f595c57d0ec4e97a2fdc", + "linux-amd64": "43f8dd0e2e12ad624e9fe756495c4a35d555b253fc68dc55705bbce64a64a5cf", + "linux-arm64": "9ac50baf8b07182ca670a76e363fb26be23ffb5c24b3e18ac408c33ca8f53ecf", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-importalias:importalias-asset:1.32.0", + ID: "com.palantir.godel-okgo-asset-importalias:importalias-asset:1.33.0", Checksums: map[string]string{ - "darwin-amd64": "a53f2ccc12f842d1e47d03470429b091005069c56c13683a9e29570bb290afac", - "darwin-arm64": "aa9520b42262763a8996d2eac0908eb684e3c3d73b7ec881484e7f4691d0885b", - "linux-amd64": "27a6bdcd4fda1b9ef6cb318d6f8d1f3491ff5dd129e97e2f2fec85a0d61bdb84", - "linux-arm64": "80d1f2767a3ed53cbd1826ef1b51448aadf050eb4d3e6231615fc618114950b3", + "darwin-amd64": "dd69d1af4dcdf7f66cde993160c14d9cf7dc3ad5b0133d67a9d21606a51f39ac", + "darwin-arm64": "6994f072962e532147427f687098f1ed35c5ead1f921653665162fe24353f855", + "linux-amd64": "d2fe02c1ece9f683a3fc0cade5f5642a222525eab81261e378f20ed12176ed42", + "linux-arm64": "08af97f20fcfa7bb3116b07c2d818efabe7720bb94a8c4b1d2dc9e8522dfd02e", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-ineffassign:ineffassign-asset:1.35.0", + ID: "com.palantir.godel-okgo-asset-ineffassign:ineffassign-asset:1.36.0", Checksums: map[string]string{ - "darwin-amd64": "663598457d89adea9955f670cd9c392cc90035567d8aa438c6c3ac92d40e3880", - "darwin-arm64": "648a9f3ea8e4b294cb5d8a390f76378dcc9b7ad918e56a3ef365fa96a5c88593", - "linux-amd64": "ab32449200fae64833a7114bbac40eb474bd8837b130aa3d44510b56322f7bc4", - "linux-arm64": "da121ee39befe7abd7be18213d1fe63b737f4747db7dca1c608e9a4636fd6674", + "darwin-amd64": "e269e73016972c1f844f28d01ce67400b4391f3865592ae63960c7b8651d3d2c", + "darwin-arm64": "a8ff4a59e481688bacc1ad2604258b1ccc0cfdce12ecf863c0d08db9f27a9337", + "linux-amd64": "64ac95a9a0bc3be31b8bf2068881fd5574228c16904d2c24af4cdc1b45b8be46", + "linux-arm64": "2aaa6652417b765b16b2678db2e607960e919d25e03485ba884439f377ae9399", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-outparamcheck:outparamcheck-asset:1.37.0", + ID: "com.palantir.godel-okgo-asset-outparamcheck:outparamcheck-asset:1.38.0", Checksums: map[string]string{ - "darwin-amd64": "795a9fc0ccdc3284409c08a891d114409df84a8e4b4ac128297b5a35e5b07dd4", - "darwin-arm64": "349bc910d69d289d7e47f57e6b0ab9ed393304731eb9e944d23039a973d752e1", - "linux-amd64": "ffbdef3f8f07537261d628ede229a4616dc859e55f3dcd19de5320f120506ec2", - "linux-arm64": "c39501b9032dc92d860f466f7969e9187297be915eddc5eca164db80c23ec17a", + "darwin-amd64": "876d24ee0952f4d16cf8d3b92234c3984c98d973dd78fcca3ff27769d54e6d47", + "darwin-arm64": "456aaa0e5199d3a6bc668c1a9c77666c440b1cce04d10fc476d892e3def53403", + "linux-amd64": "60415a0bb9ce6acc94b70b9d879d0c527c7ac9a2227e75ad3ba82f9c803b1cf2", + "linux-arm64": "6f2d1842758b4c3935510a12330125833aa2ea3a6b8ce0a75e9a6b42af286fa0", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-unconvert:unconvert-asset:1.37.0", + ID: "com.palantir.godel-okgo-asset-unconvert:unconvert-asset:1.38.0", Checksums: map[string]string{ - "darwin-amd64": "36e3b278d5ac6ae7f3ff13b4440cda911df1be4fe173d6570eadd6cf65bba066", - "darwin-arm64": "9110166e07cee143df0bcf2d9208fbfcaf4565539d765f18bfde2d3cd6cfe0cb", - "linux-amd64": "42219354a3a25bcfdb7ab607e16a0a01bfbe92822bec9c4327d7b7557e42622e", - "linux-arm64": "0ec080d2940d4cc14313d51775551f72f7eb7521ed06d24bb374733e7674609b", + "darwin-amd64": "c4eb4f2786261f1005e6466ff8bc6948d4700d1ec1dadd7e458cb17de93a9c18", + "darwin-arm64": "448553548ae4f2a5280c60a676362fa14dda48d9be1ad6883e011fa3ec2ff2ec", + "linux-amd64": "62a9ed7ed179d972c125b74ed819535a0f3e83ab439439c6bef945e1b58c9810", + "linux-arm64": "eb8bc381f38b230fd89907176bd7b7b918eb6fdbf582b1201162c0a95005fe09", }, }), }, { Locator: config.ToLocatorConfig(config.LocatorConfig{ - ID: "com.palantir.godel-okgo-asset-varcheck:varcheck-asset:1.37.0", + ID: "com.palantir.godel-okgo-asset-varcheck:varcheck-asset:1.38.0", Checksums: map[string]string{ - "darwin-amd64": "0ea858951e4feda105075e9d47f74461e5d6acc34e1b968c2e50d70b2d0643c4", - "darwin-arm64": "a0e31886537735bb0abf85249a719ebcadaf64fe66f69dac1993c860cfdd0d3c", - "linux-amd64": "aae8cdb9212f035a6d040f92ce25e0d9e0215ab6918c696e965539c5a2f09039", - "linux-arm64": "03b4b68ec5c2906cef2e3770a0edafe29efe409e1630f6c83175365944d59a16", + "darwin-amd64": "afb138dc4f8454aa1e482c70861817af3fe47a4f6de55870130d52f5ce6a13c7", + "darwin-arm64": "f8bcac5517ec8f6776c810065c11a6903aecd87175f14944a7f14b2c7d7afce4", + "linux-amd64": "601cd2c8f06770a66474c137c971cb23e83778f719d5c8591051d7df209d6acc", + "linux-arm64": "dd6ffdbfbda245a001d4295f1b50e4dcd416a7d46a58bdb4690b9c99b2dfc406", }, }), }, @@ -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.35.0", + ID: "com.palantir.godel-license-plugin:license-plugin:1.36.0", Checksums: map[string]string{ - "darwin-amd64": "ca86c8def75d2363d1d40e889595ed8ee1d42125be5b62446faca87e5ba81cdf", - "darwin-arm64": "d143f11871ee27f9fae24b594761d0598ca03ebbe12710effb6f84563499055f", - "linux-amd64": "ae0b90f74ca5bae8f0bbbe785979beaf439ad92d543bf33816abea646264fa58", - "linux-arm64": "67ad6794be9eed70fb75e6bf4f5041f46ccfde0c4973cf4b5fbbb1a8abd213f4", + "darwin-amd64": "478bbdb55f295c8473b019e9a61c5adeedc82fe2a7eac5292ee9a3af6742a321", + "darwin-arm64": "951a9dfe5afbc4e59b4f08598e80f9b3633ff74b7d2087afe2425815b1aafeda", + "linux-amd64": "7b94d677aaf53412d08c677c06878cc70083f69a6f9cfab3aa5e2caf010e40b3", + "linux-arm64": "5365076b81823818bab1f9605b7f5f1b9c20b74852285e3f2202a46cb94b60fb", }, }), }), @@ -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.34.0", + ID: "com.palantir.godel-test-plugin:test-plugin:1.35.0", Checksums: map[string]string{ - "darwin-amd64": "baa0d5527eef7a0b0a0c3b2ad35defbf67fdeb78ae1a98ae027643825fc208b9", - "darwin-arm64": "8a3adcdca760747ce939ce39af72675873fdc79130182206ffc02bfaf92fdf98", - "linux-amd64": "730216b6fb50f53f06bac963cb96c6f8413f28a48b00905c42629e0d2a61c4ed", - "linux-arm64": "b7dba9e03b38dd1c6ff49b527e754c4bf1eae46e461d6b62aec7bf8ee78fd173", + "darwin-amd64": "82a1bd7dd4226fa856f960a699bc226b2b49b734b2d5bf27a0fcce002df9e5f7", + "darwin-arm64": "f7169fc9fda2118486cbff07e816ae7a9399a93ca8d496811d492e79917cbcbb", + "linux-amd64": "5b211f6af7de6cc986e657c8273fa1c8bb614121f311de70b1b61ffb5ab35cc0", + "linux-arm64": "6fc773e9b1e21550736c06ad580e0cc1055a6c73737cb28b81ac48e1d36a1957", }, }), }), diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go index a7a8f73e..b2a0b7c6 100644 --- a/vendor/golang.org/x/tools/go/packages/doc.go +++ b/vendor/golang.org/x/tools/go/packages/doc.go @@ -5,12 +5,32 @@ /* Package packages loads Go packages for inspection and analysis. -The Load function takes as input a list of patterns and return a list of Package -structs describing individual packages matched by those patterns. -The LoadMode controls the amount of detail in the loaded packages. - -Load passes most patterns directly to the underlying build tool, -but all patterns with the prefix "query=", where query is a +The [Load] function takes as input a list of patterns and returns a +list of [Package] values describing individual packages matched by those +patterns. +A [Config] specifies configuration options, the most important of which is +the [LoadMode], which controls the amount of detail in the loaded packages. + +Load passes most patterns directly to the underlying build tool. +The default build tool is the go command. +Its supported patterns are described at +https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns. + +Load may be used in Go projects that use alternative build systems, by +installing an appropriate "driver" program for the build system and +specifying its location in the GOPACKAGESDRIVER environment variable. +For example, +https://github.com/bazelbuild/rules_go/wiki/Editor-and-tool-integration +explains how to use the driver for Bazel. +The driver program is responsible for interpreting patterns in its +preferred notation and reporting information about the packages that +they identify. +(See driverRequest and driverResponse types for the JSON +schema used by the protocol. +Though the protocol is supported, these types are currently unexported; +see #64608 for a proposal to publish them.) + +Regardless of driver, all patterns with the prefix "query=", where query is a non-empty string of letters from [a-z], are reserved and may be interpreted as query operators. @@ -64,7 +84,7 @@ reported about the loaded packages. See the documentation for type LoadMode for details. Most tools should pass their command-line arguments (after any flags) -uninterpreted to the loader, so that the loader can interpret them +uninterpreted to [Load], so that it can interpret them according to the conventions of the underlying build system. See the Example function for typical usage. */ diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go index bd79efc1..81e9e6a7 100644 --- a/vendor/golang.org/x/tools/go/packages/packages.go +++ b/vendor/golang.org/x/tools/go/packages/packages.go @@ -27,7 +27,6 @@ import ( "golang.org/x/tools/go/gcexportdata" "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/packagesinternal" - "golang.org/x/tools/internal/typeparams" "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/versions" ) @@ -1015,10 +1014,10 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { Defs: make(map[*ast.Ident]types.Object), Uses: make(map[*ast.Ident]types.Object), Implicits: make(map[ast.Node]types.Object), + Instances: make(map[*ast.Ident]types.Instance), Scopes: make(map[ast.Node]*types.Scope), Selections: make(map[*ast.SelectorExpr]*types.Selection), } - typeparams.InitInstanceInfo(lpkg.TypesInfo) versions.InitFileVersions(lpkg.TypesInfo) lpkg.TypesSizes = ld.sizes diff --git a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go index e742ecc4..11d5c8c3 100644 --- a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go +++ b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go @@ -223,7 +223,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { // Reject obviously non-viable cases. switch obj := obj.(type) { case *types.TypeName: - if _, ok := obj.Type().(*typeparams.TypeParam); !ok { + if _, ok := obj.Type().(*types.TypeParam); !ok { // With the exception of type parameters, only package-level type names // have a path. return "", fmt.Errorf("no path for %v", obj) @@ -283,7 +283,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { } } else { if named, _ := T.(*types.Named); named != nil { - if r := findTypeParam(obj, typeparams.ForNamed(named), path, nil); r != nil { + if r := findTypeParam(obj, named.TypeParams(), path, nil); r != nil { // generic named type return Path(r), nil } @@ -462,7 +462,7 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName] } return find(obj, T.Elem(), append(path, opElem), seen) case *types.Signature: - if r := findTypeParam(obj, typeparams.ForSignature(T), path, seen); r != nil { + if r := findTypeParam(obj, T.TypeParams(), path, seen); r != nil { return r } if r := find(obj, T.Params(), append(path, opParams), seen); r != nil { @@ -505,7 +505,7 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName] } } return nil - case *typeparams.TypeParam: + case *types.TypeParam: name := T.Obj() if name == obj { return append(path, opObj) @@ -525,7 +525,7 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName] panic(T) } -func findTypeParam(obj types.Object, list *typeparams.TypeParamList, path []byte, seen map[*types.TypeName]bool) []byte { +func findTypeParam(obj types.Object, list *types.TypeParamList, path []byte, seen map[*types.TypeName]bool) []byte { for i := 0; i < list.Len(); i++ { tparam := list.At(i) path2 := appendOpArg(path, opTypeParam, i) @@ -562,7 +562,7 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { } // abstraction of *types.{Named,Signature} type hasTypeParams interface { - TypeParams() *typeparams.TypeParamList + TypeParams() *types.TypeParamList } // abstraction of *types.{Named,TypeParam} type hasObj interface { @@ -664,7 +664,7 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { t = tparams.At(index) case opConstraint: - tparam, ok := t.(*typeparams.TypeParam) + tparam, ok := t.(*types.TypeParam) if !ok { return nil, fmt.Errorf("cannot apply %q to %s (got %T, want type parameter)", code, t, t) } diff --git a/vendor/golang.org/x/tools/internal/event/keys/util.go b/vendor/golang.org/x/tools/internal/event/keys/util.go new file mode 100644 index 00000000..c0e8e731 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/keys/util.go @@ -0,0 +1,21 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package keys + +import ( + "sort" + "strings" +) + +// Join returns a canonical join of the keys in S: +// a sorted comma-separated string list. +func Join[S ~[]T, T ~string](s S) string { + strs := make([]string, 0, len(s)) + for _, v := range s { + strs = append(strs, string(v)) + } + sort.Strings(strs) + return strings.Join(strs, ",") +} diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index 6103dd71..2ee8c701 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -24,7 +24,6 @@ import ( "golang.org/x/tools/go/types/objectpath" "golang.org/x/tools/internal/tokeninternal" - "golang.org/x/tools/internal/typeparams" ) // IExportShallow encodes "shallow" export data for the specified package. @@ -481,7 +480,7 @@ func (p *iexporter) doDecl(obj types.Object) { } // Function. - if typeparams.ForSignature(sig).Len() == 0 { + if sig.TypeParams().Len() == 0 { w.tag('F') } else { w.tag('G') @@ -494,7 +493,7 @@ func (p *iexporter) doDecl(obj types.Object) { // // While importing the type parameters, tparamList computes and records // their export name, so that it can be later used when writing the index. - if tparams := typeparams.ForSignature(sig); tparams.Len() > 0 { + if tparams := sig.TypeParams(); tparams.Len() > 0 { w.tparamList(obj.Name(), tparams, obj.Pkg()) } w.signature(sig) @@ -507,14 +506,14 @@ func (p *iexporter) doDecl(obj types.Object) { case *types.TypeName: t := obj.Type() - if tparam, ok := t.(*typeparams.TypeParam); ok { + if tparam, ok := t.(*types.TypeParam); ok { w.tag('P') w.pos(obj.Pos()) constraint := tparam.Constraint() if p.version >= iexportVersionGo1_18 { implicit := false if iface, _ := constraint.(*types.Interface); iface != nil { - implicit = typeparams.IsImplicit(iface) + implicit = iface.IsImplicit() } w.bool(implicit) } @@ -535,17 +534,17 @@ func (p *iexporter) doDecl(obj types.Object) { panic(internalErrorf("%s is not a defined type", t)) } - if typeparams.ForNamed(named).Len() == 0 { + if named.TypeParams().Len() == 0 { w.tag('T') } else { w.tag('U') } w.pos(obj.Pos()) - if typeparams.ForNamed(named).Len() > 0 { + if named.TypeParams().Len() > 0 { // While importing the type parameters, tparamList computes and records // their export name, so that it can be later used when writing the index. - w.tparamList(obj.Name(), typeparams.ForNamed(named), obj.Pkg()) + w.tparamList(obj.Name(), named.TypeParams(), obj.Pkg()) } underlying := obj.Type().Underlying() @@ -565,7 +564,7 @@ func (p *iexporter) doDecl(obj types.Object) { // Receiver type parameters are type arguments of the receiver type, so // their name must be qualified before exporting recv. - if rparams := typeparams.RecvTypeParams(sig); rparams.Len() > 0 { + if rparams := sig.RecvTypeParams(); rparams.Len() > 0 { prefix := obj.Name() + "." + m.Name() for i := 0; i < rparams.Len(); i++ { rparam := rparams.At(i) @@ -740,19 +739,19 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { } switch t := t.(type) { case *types.Named: - if targs := typeparams.NamedTypeArgs(t); targs.Len() > 0 { + if targs := t.TypeArgs(); targs.Len() > 0 { w.startType(instanceType) // TODO(rfindley): investigate if this position is correct, and if it // matters. w.pos(t.Obj().Pos()) w.typeList(targs, pkg) - w.typ(typeparams.NamedTypeOrigin(t), pkg) + w.typ(t.Origin(), pkg) return } w.startType(definedType) w.qualifiedType(t.Obj()) - case *typeparams.TypeParam: + case *types.TypeParam: w.startType(typeParamType) w.qualifiedType(t.Obj()) @@ -868,7 +867,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { w.signature(sig) } - case *typeparams.Union: + case *types.Union: w.startType(unionType) nt := t.Len() w.uint64(uint64(nt)) @@ -948,14 +947,14 @@ func (w *exportWriter) signature(sig *types.Signature) { } } -func (w *exportWriter) typeList(ts *typeparams.TypeList, pkg *types.Package) { +func (w *exportWriter) typeList(ts *types.TypeList, pkg *types.Package) { w.uint64(uint64(ts.Len())) for i := 0; i < ts.Len(); i++ { w.typ(ts.At(i), pkg) } } -func (w *exportWriter) tparamList(prefix string, list *typeparams.TypeParamList, pkg *types.Package) { +func (w *exportWriter) tparamList(prefix string, list *types.TypeParamList, pkg *types.Package) { ll := uint64(list.Len()) w.uint64(ll) for i := 0; i < list.Len(); i++ { @@ -973,7 +972,7 @@ const blankMarker = "$" // differs from its actual object name: it is prefixed with a qualifier, and // blank type parameter names are disambiguated by their index in the type // parameter list. -func tparamExportName(prefix string, tparam *typeparams.TypeParam) string { +func tparamExportName(prefix string, tparam *types.TypeParam) string { assert(prefix != "") name := tparam.Obj().Name() if name == "_" { diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index 8e64cf64..9bde15e3 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -22,7 +22,6 @@ import ( "strings" "golang.org/x/tools/go/types/objectpath" - "golang.org/x/tools/internal/typeparams" ) type intReader struct { @@ -321,7 +320,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte // Therefore, we defer calling SetConstraint there, and call it here instead // after all types are complete. for _, d := range p.later { - typeparams.SetTypeParamConstraint(d.t, d.constraint) + d.t.SetConstraint(d.constraint) } for _, typ := range p.interfaceList { @@ -339,7 +338,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte } type setConstraintArgs struct { - t *typeparams.TypeParam + t *types.TypeParam constraint types.Type } @@ -549,7 +548,7 @@ func (r *importReader) obj(name string) { r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) case 'F', 'G': - var tparams []*typeparams.TypeParam + var tparams []*types.TypeParam if tag == 'G' { tparams = r.tparamList() } @@ -566,7 +565,7 @@ func (r *importReader) obj(name string) { r.declare(obj) if tag == 'U' { tparams := r.tparamList() - typeparams.SetForNamed(named, tparams) + named.SetTypeParams(tparams) } underlying := r.p.typAt(r.uint64(), named).Underlying() @@ -583,12 +582,12 @@ func (r *importReader) obj(name string) { // typeparams being used in the method sig/body). base := baseType(recv.Type()) assert(base != nil) - targs := typeparams.NamedTypeArgs(base) - var rparams []*typeparams.TypeParam + targs := base.TypeArgs() + var rparams []*types.TypeParam if targs.Len() > 0 { - rparams = make([]*typeparams.TypeParam, targs.Len()) + rparams = make([]*types.TypeParam, targs.Len()) for i := range rparams { - rparams[i] = targs.At(i).(*typeparams.TypeParam) + rparams[i] = targs.At(i).(*types.TypeParam) } } msig := r.signature(recv, rparams, nil) @@ -606,7 +605,7 @@ func (r *importReader) obj(name string) { } name0 := tparamName(name) tn := types.NewTypeName(pos, r.currPkg, name0, nil) - t := typeparams.NewTypeParam(tn, nil) + t := types.NewTypeParam(tn, nil) // To handle recursive references to the typeparam within its // bound, save the partial type in tparamIndex before reading the bounds. @@ -622,7 +621,7 @@ func (r *importReader) obj(name string) { if iface == nil { errorf("non-interface constraint marked implicit") } - typeparams.MarkImplicit(iface) + iface.MarkImplicit() } // The constraint type may not be complete, if we // are in the middle of a type recursion involving type @@ -966,7 +965,7 @@ func (r *importReader) doType(base *types.Named) (res types.Type) { // The imported instantiated type doesn't include any methods, so // we must always use the methods of the base (orig) type. // TODO provide a non-nil *Environment - t, _ := typeparams.Instantiate(nil, baseType, targs, false) + t, _ := types.Instantiate(nil, baseType, targs, false) // Workaround for golang/go#61561. See the doc for instanceList for details. r.p.instanceList = append(r.p.instanceList, t) @@ -976,11 +975,11 @@ func (r *importReader) doType(base *types.Named) (res types.Type) { if r.p.version < iexportVersionGenerics { errorf("unexpected instantiation type") } - terms := make([]*typeparams.Term, r.uint64()) + terms := make([]*types.Term, r.uint64()) for i := range terms { - terms[i] = typeparams.NewTerm(r.bool(), r.typ()) + terms[i] = types.NewTerm(r.bool(), r.typ()) } - return typeparams.NewUnion(terms) + return types.NewUnion(terms) } } @@ -1008,23 +1007,23 @@ func (r *importReader) objectPathObject() types.Object { return obj } -func (r *importReader) signature(recv *types.Var, rparams []*typeparams.TypeParam, tparams []*typeparams.TypeParam) *types.Signature { +func (r *importReader) signature(recv *types.Var, rparams []*types.TypeParam, tparams []*types.TypeParam) *types.Signature { params := r.paramList() results := r.paramList() variadic := params.Len() > 0 && r.bool() - return typeparams.NewSignatureType(recv, rparams, tparams, params, results, variadic) + return types.NewSignatureType(recv, rparams, tparams, params, results, variadic) } -func (r *importReader) tparamList() []*typeparams.TypeParam { +func (r *importReader) tparamList() []*types.TypeParam { n := r.uint64() if n == 0 { return nil } - xs := make([]*typeparams.TypeParam, n) + xs := make([]*types.TypeParam, n) for i := range xs { // Note: the standard library importer is tolerant of nil types here, // though would panic in SetTypeParams. - xs[i] = r.typ().(*typeparams.TypeParam) + xs[i] = r.typ().(*types.TypeParam) } return xs } diff --git a/vendor/golang.org/x/tools/internal/typeparams/common.go b/vendor/golang.org/x/tools/internal/typeparams/common.go index d0d0649f..cdab9885 100644 --- a/vendor/golang.org/x/tools/internal/typeparams/common.go +++ b/vendor/golang.org/x/tools/internal/typeparams/common.go @@ -42,7 +42,7 @@ func UnpackIndexExpr(n ast.Node) (x ast.Expr, lbrack token.Pos, indices []ast.Ex switch e := n.(type) { case *ast.IndexExpr: return e.X, e.Lbrack, []ast.Expr{e.Index}, e.Rbrack - case *IndexListExpr: + case *ast.IndexListExpr: return e.X, e.Lbrack, e.Indices, e.Rbrack } return nil, token.NoPos, nil, token.NoPos @@ -63,7 +63,7 @@ func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack toke Rbrack: rbrack, } default: - return &IndexListExpr{ + return &ast.IndexListExpr{ X: x, Lbrack: lbrack, Indices: indices, @@ -74,7 +74,7 @@ func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack toke // IsTypeParam reports whether t is a type parameter. func IsTypeParam(t types.Type) bool { - _, ok := t.(*TypeParam) + _, ok := t.(*types.TypeParam) return ok } @@ -100,11 +100,11 @@ func OriginMethod(fn *types.Func) *types.Func { // Receiver is a *types.Interface. return fn } - if ForNamed(named).Len() == 0 { + if named.TypeParams().Len() == 0 { // Receiver base has no type parameters, so we can avoid the lookup below. return fn } - orig := NamedTypeOrigin(named) + orig := named.Origin() gfn, _, _ := types.LookupFieldOrMethod(orig, true, fn.Pkg(), fn.Name()) // This is a fix for a gopls crash (#60628) due to a go/types bug (#60634). In: @@ -157,7 +157,7 @@ func OriginMethod(fn *types.Func) *types.Func { // // In this case, GenericAssignableTo reports that instantiations of Container // are assignable to the corresponding instantiation of Interface. -func GenericAssignableTo(ctxt *Context, V, T types.Type) bool { +func GenericAssignableTo(ctxt *types.Context, V, T types.Type) bool { // If V and T are not both named, or do not have matching non-empty type // parameter lists, fall back on types.AssignableTo. @@ -167,9 +167,9 @@ func GenericAssignableTo(ctxt *Context, V, T types.Type) bool { return types.AssignableTo(V, T) } - vtparams := ForNamed(VN) - ttparams := ForNamed(TN) - if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || NamedTypeArgs(VN).Len() != 0 || NamedTypeArgs(TN).Len() != 0 { + vtparams := VN.TypeParams() + ttparams := TN.TypeParams() + if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || VN.TypeArgs().Len() != 0 || TN.TypeArgs().Len() != 0 { return types.AssignableTo(V, T) } @@ -182,7 +182,7 @@ func GenericAssignableTo(ctxt *Context, V, T types.Type) bool { // Minor optimization: ensure we share a context across the two // instantiations below. if ctxt == nil { - ctxt = NewContext() + ctxt = types.NewContext() } var targs []types.Type @@ -190,12 +190,12 @@ func GenericAssignableTo(ctxt *Context, V, T types.Type) bool { targs = append(targs, vtparams.At(i)) } - vinst, err := Instantiate(ctxt, V, targs, true) + vinst, err := types.Instantiate(ctxt, V, targs, true) if err != nil { panic("type parameters should satisfy their own constraints") } - tinst, err := Instantiate(ctxt, T, targs, true) + tinst, err := types.Instantiate(ctxt, T, targs, true) if err != nil { return false } diff --git a/vendor/golang.org/x/tools/internal/typeparams/coretype.go b/vendor/golang.org/x/tools/internal/typeparams/coretype.go index 71248209..7ea8840e 100644 --- a/vendor/golang.org/x/tools/internal/typeparams/coretype.go +++ b/vendor/golang.org/x/tools/internal/typeparams/coretype.go @@ -108,15 +108,15 @@ func CoreType(T types.Type) types.Type { // // _NormalTerms makes no guarantees about the order of terms, except that it // is deterministic. -func _NormalTerms(typ types.Type) ([]*Term, error) { +func _NormalTerms(typ types.Type) ([]*types.Term, error) { switch typ := typ.(type) { - case *TypeParam: + case *types.TypeParam: return StructuralTerms(typ) - case *Union: + case *types.Union: return UnionTermSet(typ) case *types.Interface: return InterfaceTermSet(typ) default: - return []*Term{NewTerm(false, typ)}, nil + return []*types.Term{types.NewTerm(false, typ)}, nil } } diff --git a/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go b/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go deleted file mode 100644 index 18212390..00000000 --- a/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.18 -// +build !go1.18 - -package typeparams - -// Enabled reports whether type parameters are enabled in the current build -// environment. -const Enabled = false diff --git a/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go b/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go deleted file mode 100644 index d6714882..00000000 --- a/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.18 -// +build go1.18 - -package typeparams - -// Note: this constant is in a separate file as this is the only acceptable -// diff between the <1.18 API of this package and the 1.18 API. - -// Enabled reports whether type parameters are enabled in the current build -// environment. -const Enabled = true diff --git a/vendor/golang.org/x/tools/internal/typeparams/normalize.go b/vendor/golang.org/x/tools/internal/typeparams/normalize.go index 9c631b65..93c80fdc 100644 --- a/vendor/golang.org/x/tools/internal/typeparams/normalize.go +++ b/vendor/golang.org/x/tools/internal/typeparams/normalize.go @@ -60,7 +60,7 @@ var ErrEmptyTypeSet = errors.New("empty type set") // // StructuralTerms makes no guarantees about the order of terms, except that it // is deterministic. -func StructuralTerms(tparam *TypeParam) ([]*Term, error) { +func StructuralTerms(tparam *types.TypeParam) ([]*types.Term, error) { constraint := tparam.Constraint() if constraint == nil { return nil, fmt.Errorf("%s has nil constraint", tparam) @@ -78,7 +78,7 @@ func StructuralTerms(tparam *TypeParam) ([]*Term, error) { // // See the documentation of StructuralTerms for more information on // normalization. -func InterfaceTermSet(iface *types.Interface) ([]*Term, error) { +func InterfaceTermSet(iface *types.Interface) ([]*types.Term, error) { return computeTermSet(iface) } @@ -88,11 +88,11 @@ func InterfaceTermSet(iface *types.Interface) ([]*Term, error) { // // See the documentation of StructuralTerms for more information on // normalization. -func UnionTermSet(union *Union) ([]*Term, error) { +func UnionTermSet(union *types.Union) ([]*types.Term, error) { return computeTermSet(union) } -func computeTermSet(typ types.Type) ([]*Term, error) { +func computeTermSet(typ types.Type) ([]*types.Term, error) { tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0) if err != nil { return nil, err @@ -103,9 +103,9 @@ func computeTermSet(typ types.Type) ([]*Term, error) { if tset.terms.isAll() { return nil, nil } - var terms []*Term + var terms []*types.Term for _, term := range tset.terms { - terms = append(terms, NewTerm(term.tilde, term.typ)) + terms = append(terms, types.NewTerm(term.tilde, term.typ)) } return terms, nil } @@ -162,7 +162,7 @@ func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth in tset.terms = allTermlist for i := 0; i < u.NumEmbeddeds(); i++ { embedded := u.EmbeddedType(i) - if _, ok := embedded.Underlying().(*TypeParam); ok { + if _, ok := embedded.Underlying().(*types.TypeParam); ok { return nil, fmt.Errorf("invalid embedded type %T", embedded) } tset2, err := computeTermSetInternal(embedded, seen, depth+1) @@ -171,7 +171,7 @@ func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth in } tset.terms = tset.terms.intersect(tset2.terms) } - case *Union: + case *types.Union: // The term set of a union is the union of term sets of its terms. tset.terms = nil for i := 0; i < u.Len(); i++ { @@ -184,7 +184,7 @@ func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth in return nil, err } terms = tset2.terms - case *TypeParam, *Union: + case *types.TypeParam, *types.Union: // A stand-alone type parameter or union is not permitted as union // term. return nil, fmt.Errorf("invalid union term %T", t) @@ -199,7 +199,7 @@ func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth in return nil, fmt.Errorf("exceeded max term count %d", maxTermCount) } } - case *TypeParam: + case *types.TypeParam: panic("unreachable") default: // For all other types, the term set is just a single non-tilde term diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go deleted file mode 100644 index 7ed86e17..00000000 --- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.18 -// +build !go1.18 - -package typeparams - -import ( - "go/ast" - "go/token" - "go/types" -) - -func unsupported() { - panic("type parameters are unsupported at this go version") -} - -// IndexListExpr is a placeholder type, as type parameters are not supported at -// this Go version. Its methods panic on use. -type IndexListExpr struct { - ast.Expr - X ast.Expr // expression - Lbrack token.Pos // position of "[" - Indices []ast.Expr // index expressions - Rbrack token.Pos // position of "]" -} - -// ForTypeSpec returns an empty field list, as type parameters on not supported -// at this Go version. -func ForTypeSpec(*ast.TypeSpec) *ast.FieldList { - return nil -} - -// ForFuncType returns an empty field list, as type parameters are not -// supported at this Go version. -func ForFuncType(*ast.FuncType) *ast.FieldList { - return nil -} - -// TypeParam is a placeholder type, as type parameters are not supported at -// this Go version. Its methods panic on use. -type TypeParam struct{ types.Type } - -func (*TypeParam) Index() int { unsupported(); return 0 } -func (*TypeParam) Constraint() types.Type { unsupported(); return nil } -func (*TypeParam) Obj() *types.TypeName { unsupported(); return nil } - -// TypeParamList is a placeholder for an empty type parameter list. -type TypeParamList struct{} - -func (*TypeParamList) Len() int { return 0 } -func (*TypeParamList) At(int) *TypeParam { unsupported(); return nil } - -// TypeList is a placeholder for an empty type list. -type TypeList struct{} - -func (*TypeList) Len() int { return 0 } -func (*TypeList) At(int) types.Type { unsupported(); return nil } - -// NewTypeParam is unsupported at this Go version, and panics. -func NewTypeParam(name *types.TypeName, constraint types.Type) *TypeParam { - unsupported() - return nil -} - -// SetTypeParamConstraint is unsupported at this Go version, and panics. -func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) { - unsupported() -} - -// NewSignatureType calls types.NewSignature, panicking if recvTypeParams or -// typeParams is non-empty. -func NewSignatureType(recv *types.Var, recvTypeParams, typeParams []*TypeParam, params, results *types.Tuple, variadic bool) *types.Signature { - if len(recvTypeParams) != 0 || len(typeParams) != 0 { - panic("signatures cannot have type parameters at this Go version") - } - return types.NewSignature(recv, params, results, variadic) -} - -// ForSignature returns an empty slice. -func ForSignature(*types.Signature) *TypeParamList { - return nil -} - -// RecvTypeParams returns a nil slice. -func RecvTypeParams(sig *types.Signature) *TypeParamList { - return nil -} - -// IsComparable returns false, as no interfaces are type-restricted at this Go -// version. -func IsComparable(*types.Interface) bool { - return false -} - -// IsMethodSet returns true, as no interfaces are type-restricted at this Go -// version. -func IsMethodSet(*types.Interface) bool { - return true -} - -// IsImplicit returns false, as no interfaces are implicit at this Go version. -func IsImplicit(*types.Interface) bool { - return false -} - -// MarkImplicit does nothing, because this Go version does not have implicit -// interfaces. -func MarkImplicit(*types.Interface) {} - -// ForNamed returns an empty type parameter list, as type parameters are not -// supported at this Go version. -func ForNamed(*types.Named) *TypeParamList { - return nil -} - -// SetForNamed panics if tparams is non-empty. -func SetForNamed(_ *types.Named, tparams []*TypeParam) { - if len(tparams) > 0 { - unsupported() - } -} - -// NamedTypeArgs returns nil. -func NamedTypeArgs(*types.Named) *TypeList { - return nil -} - -// NamedTypeOrigin is the identity method at this Go version. -func NamedTypeOrigin(named *types.Named) *types.Named { - return named -} - -// Term holds information about a structural type restriction. -type Term struct { - tilde bool - typ types.Type -} - -func (m *Term) Tilde() bool { return m.tilde } -func (m *Term) Type() types.Type { return m.typ } -func (m *Term) String() string { - pre := "" - if m.tilde { - pre = "~" - } - return pre + m.typ.String() -} - -// NewTerm is unsupported at this Go version, and panics. -func NewTerm(tilde bool, typ types.Type) *Term { - return &Term{tilde, typ} -} - -// Union is a placeholder type, as type parameters are not supported at this Go -// version. Its methods panic on use. -type Union struct{ types.Type } - -func (*Union) Len() int { return 0 } -func (*Union) Term(i int) *Term { unsupported(); return nil } - -// NewUnion is unsupported at this Go version, and panics. -func NewUnion(terms []*Term) *Union { - unsupported() - return nil -} - -// InitInstanceInfo is a noop at this Go version. -func InitInstanceInfo(*types.Info) {} - -// Instance is a placeholder type, as type parameters are not supported at this -// Go version. -type Instance struct { - TypeArgs *TypeList - Type types.Type -} - -// GetInstances returns a nil map, as type parameters are not supported at this -// Go version. -func GetInstances(info *types.Info) map[*ast.Ident]Instance { return nil } - -// Context is a placeholder type, as type parameters are not supported at -// this Go version. -type Context struct{} - -// NewContext returns a placeholder Context instance. -func NewContext() *Context { - return &Context{} -} - -// Instantiate is unsupported on this Go version, and panics. -func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) { - unsupported() - return nil, nil -} diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go deleted file mode 100644 index cf301af1..00000000 --- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.18 -// +build go1.18 - -package typeparams - -import ( - "go/ast" - "go/types" -) - -// IndexListExpr is an alias for ast.IndexListExpr. -type IndexListExpr = ast.IndexListExpr - -// ForTypeSpec returns n.TypeParams. -func ForTypeSpec(n *ast.TypeSpec) *ast.FieldList { - if n == nil { - return nil - } - return n.TypeParams -} - -// ForFuncType returns n.TypeParams. -func ForFuncType(n *ast.FuncType) *ast.FieldList { - if n == nil { - return nil - } - return n.TypeParams -} - -// TypeParam is an alias for types.TypeParam -type TypeParam = types.TypeParam - -// TypeParamList is an alias for types.TypeParamList -type TypeParamList = types.TypeParamList - -// TypeList is an alias for types.TypeList -type TypeList = types.TypeList - -// NewTypeParam calls types.NewTypeParam. -func NewTypeParam(name *types.TypeName, constraint types.Type) *TypeParam { - return types.NewTypeParam(name, constraint) -} - -// SetTypeParamConstraint calls tparam.SetConstraint(constraint). -func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) { - tparam.SetConstraint(constraint) -} - -// NewSignatureType calls types.NewSignatureType. -func NewSignatureType(recv *types.Var, recvTypeParams, typeParams []*TypeParam, params, results *types.Tuple, variadic bool) *types.Signature { - return types.NewSignatureType(recv, recvTypeParams, typeParams, params, results, variadic) -} - -// ForSignature returns sig.TypeParams() -func ForSignature(sig *types.Signature) *TypeParamList { - return sig.TypeParams() -} - -// RecvTypeParams returns sig.RecvTypeParams(). -func RecvTypeParams(sig *types.Signature) *TypeParamList { - return sig.RecvTypeParams() -} - -// IsComparable calls iface.IsComparable(). -func IsComparable(iface *types.Interface) bool { - return iface.IsComparable() -} - -// IsMethodSet calls iface.IsMethodSet(). -func IsMethodSet(iface *types.Interface) bool { - return iface.IsMethodSet() -} - -// IsImplicit calls iface.IsImplicit(). -func IsImplicit(iface *types.Interface) bool { - return iface.IsImplicit() -} - -// MarkImplicit calls iface.MarkImplicit(). -func MarkImplicit(iface *types.Interface) { - iface.MarkImplicit() -} - -// ForNamed extracts the (possibly empty) type parameter object list from -// named. -func ForNamed(named *types.Named) *TypeParamList { - return named.TypeParams() -} - -// SetForNamed sets the type params tparams on n. Each tparam must be of -// dynamic type *types.TypeParam. -func SetForNamed(n *types.Named, tparams []*TypeParam) { - n.SetTypeParams(tparams) -} - -// NamedTypeArgs returns named.TypeArgs(). -func NamedTypeArgs(named *types.Named) *TypeList { - return named.TypeArgs() -} - -// NamedTypeOrigin returns named.Orig(). -func NamedTypeOrigin(named *types.Named) *types.Named { - return named.Origin() -} - -// Term is an alias for types.Term. -type Term = types.Term - -// NewTerm calls types.NewTerm. -func NewTerm(tilde bool, typ types.Type) *Term { - return types.NewTerm(tilde, typ) -} - -// Union is an alias for types.Union -type Union = types.Union - -// NewUnion calls types.NewUnion. -func NewUnion(terms []*Term) *Union { - return types.NewUnion(terms) -} - -// InitInstanceInfo initializes info to record information about type and -// function instances. -func InitInstanceInfo(info *types.Info) { - info.Instances = make(map[*ast.Ident]types.Instance) -} - -// Instance is an alias for types.Instance. -type Instance = types.Instance - -// GetInstances returns info.Instances. -func GetInstances(info *types.Info) map[*ast.Ident]Instance { - return info.Instances -} - -// Context is an alias for types.Context. -type Context = types.Context - -// NewContext calls types.NewContext. -func NewContext() *Context { - return types.NewContext() -} - -// Instantiate calls types.Instantiate. -func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) { - return types.Instantiate(ctxt, typ, targs, validate) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index f730a07f..0562f326 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -70,7 +70,7 @@ github.com/nwaples/rardecode # github.com/palantir/amalgomate v1.35.0 ## explicit; go 1.21 github.com/palantir/amalgomate/amalgomated -# github.com/palantir/godel/v2 v2.95.0 +# github.com/palantir/godel/v2 v2.96.0 ## explicit; go 1.21 github.com/palantir/godel/v2/framework/artifactresolver github.com/palantir/godel/v2/framework/builtintasks @@ -157,7 +157,7 @@ golang.org/x/mod/semver # golang.org/x/sys v0.14.0 ## explicit; go 1.18 golang.org/x/sys/unix -# golang.org/x/tools v0.16.0 +# golang.org/x/tools v0.16.1 ## explicit; go 1.18 golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/internal/packagesdriver