From 54e3b773ffdb9e0c2216a654d5c19a81c82bfeca Mon Sep 17 00:00:00 2001 From: Jack Chistyakov Date: Thu, 30 Jan 2025 05:14:25 -0800 Subject: [PATCH] Remove deprecated ContextClientInterface Summary: Interface serves no useful purpose. #build_rule_type[go_library,go_binary,go_unittest,go_test] Reviewed By: leoleovich Differential Revision: D68877382 fbshipit-source-id: 8f8eeca2565c95ebca55518a796c425c3890cce5 --- .../generate/templates/go/svc/client.mustache | 1 - .../templates/go/svc/interface.mustache | 24 ----------- .../adapter/out/go/gen-go/module/svcs.go | 13 ------ .../out/go/gen-go/module/svcs.go | 42 ------------------- .../basic/out/go/gen-go/module/svcs.go | 34 --------------- .../doctext/out/go/gen-go/module/svcs.go | 7 ---- .../exceptions/out/go/gen-go/module/svcs.go | 9 ---- .../go-service/out/go/gen-go/module/svcs.go | 27 ------------ .../out/go_module1/gen-go/module1/svcs.go | 8 ---- .../out/go_service/gen-go/service/svcs.go | 7 ---- .../inheritance/out/go/gen-go/module/svcs.go | 24 ----------- .../interactions/out/go/gen-go/module/svcs.go | 29 ------------- .../interactions/out/go/gen-go/shared/svcs.go | 5 --- .../gen-go/my/namespacing/test/module/svcs.go | 6 --- .../out/go_emptyns/gen-go/emptyns/svcs.go | 6 --- .../gen-go/my/namespacing/extend/test/svcs.go | 9 ---- .../gen-go/my/namespacing/test/svcs.go | 6 --- .../gen-go/my/namespacing/test/svcs.go | 6 --- .../gen-go/my/namespacing/test/module/svcs.go | 6 --- .../namespace_from_package/module/svcs.go | 6 --- .../module/svcs.go | 6 --- .../params/out/go/gen-go/module/svcs.go | 10 ----- .../types/out/go/gen-go/module/svcs.go | 7 ---- 23 files changed, 298 deletions(-) diff --git a/thrift/compiler/generate/templates/go/svc/client.mustache b/thrift/compiler/generate/templates/go/svc/client.mustache index 629e74a08ed..fe30ba79400 100644 --- a/thrift/compiler/generate/templates/go/svc/client.mustache +++ b/thrift/compiler/generate/templates/go/svc/client.mustache @@ -57,7 +57,6 @@ type {{service:go_name}}Client struct { } // Compile time interface enforcer var _ {{service:go_name}}ClientInterface = (*{{service:go_name}}Client)(nil) -var _ {{service:go_name}}ContextClientInterface = (*{{service:go_name}}Client)(nil) func New{{service:go_name}}Client(prot thrift.Protocol) *{{service:go_name}}Client { return &{{service:go_name}}Client{ diff --git a/thrift/compiler/generate/templates/go/svc/interface.mustache b/thrift/compiler/generate/templates/go/svc/interface.mustache index 3f73f49081b..07c2d902db2 100644 --- a/thrift/compiler/generate/templates/go/svc/interface.mustache +++ b/thrift/compiler/generate/templates/go/svc/interface.mustache @@ -51,28 +51,4 @@ type {{service:go_name}}ClientInterface interface { {{/function:go_supported?}} {{/service:functions}} } - -{{!COMPAT: backwards compatibility -Currently there are a bunch of use cases that implement ClientInterface without Context functions. -1. We need to manually move them over to ContextClientInterface -2. Add func_signature_with_ctx to ClientInterface -3. Move them back to ClientInterface -4. Delete ContextClientInterface -}}{{! -}}type {{service:go_name}}ContextClientInterface interface { - {{service:go_name}}ClientInterface - {{#service:extends?}} - {{#service:extends}} - // Inherited/extended service - {{service:go_qualified_name}}ContextClientInterface - - {{/service:extends}} - {{/service:extends?}} - {{#service:functions}} - {{#function:go_supported?}} - {{> svc/func_signature_with_ctx}} - - {{/function:go_supported?}} - {{/service:functions}} -} {{! new line }} diff --git a/thrift/compiler/test/fixtures/adapter/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/adapter/out/go/gen-go/module/svcs.go index e079292c498..99950522b99 100644 --- a/thrift/compiler/test/fixtures/adapter/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/adapter/out/go/gen-go/module/svcs.go @@ -36,11 +36,6 @@ type ServiceClientInterface interface { Func(arg1 StringWithAdapter_7208, arg2 string, arg3 *Foo) (MyI32_4873, error) } -type ServiceContextClientInterface interface { - ServiceClientInterface - FuncContext(ctx context.Context, arg1 StringWithAdapter_7208, arg2 string, arg3 *Foo) (MyI32_4873, error) -} - type ServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type ServiceClient struct { } // Compile time interface enforcer var _ ServiceClientInterface = (*ServiceClient)(nil) -var _ ServiceContextClientInterface = (*ServiceClient)(nil) func NewServiceClient(prot thrift.Protocol) *ServiceClient { return &ServiceClient{ @@ -214,12 +208,6 @@ type AdapterServiceClientInterface interface { AdaptedTypes(arg *HeapAllocated) (*HeapAllocated, error) } -type AdapterServiceContextClientInterface interface { - AdapterServiceClientInterface - CountContext(ctx context.Context) (*CountingStruct, error) - AdaptedTypesContext(ctx context.Context, arg *HeapAllocated) (*HeapAllocated, error) -} - type AdapterServiceChannelClient struct { ch thrift.RequestChannel } @@ -241,7 +229,6 @@ type AdapterServiceClient struct { } // Compile time interface enforcer var _ AdapterServiceClientInterface = (*AdapterServiceClient)(nil) -var _ AdapterServiceContextClientInterface = (*AdapterServiceClient)(nil) func NewAdapterServiceClient(prot thrift.Protocol) *AdapterServiceClient { return &AdapterServiceClient{ diff --git a/thrift/compiler/test/fixtures/basic-annotations/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/basic-annotations/out/go/gen-go/module/svcs.go index e548efa81ea..3b40997eb11 100644 --- a/thrift/compiler/test/fixtures/basic-annotations/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/basic-annotations/out/go/gen-go/module/svcs.go @@ -48,17 +48,6 @@ type MyServiceClientInterface interface { GoDoNothing() (error) } -type MyServiceContextClientInterface interface { - MyServiceClientInterface - PingContext(ctx context.Context) (error) - GetRandomDataContext(ctx context.Context) (string, error) - HasDataByIdContext(ctx context.Context, id int64) (bool, error) - GoGetDataByIdContext(ctx context.Context, id int64) (string, error) - PutDataByIdContext(ctx context.Context, id int64, data string) (error) - LobDataByIdContext(ctx context.Context, id int64, data string) (error) - GoDoNothingContext(ctx context.Context) (error) -} - type MyServiceChannelClient struct { ch thrift.RequestChannel } @@ -80,7 +69,6 @@ type MyServiceClient struct { } // Compile time interface enforcer var _ MyServiceClientInterface = (*MyServiceClient)(nil) -var _ MyServiceContextClientInterface = (*MyServiceClient)(nil) func NewMyServiceClient(prot thrift.Protocol) *MyServiceClient { return &MyServiceClient{ @@ -672,12 +660,6 @@ type MyServicePrioParentClientInterface interface { Pong() (error) } -type MyServicePrioParentContextClientInterface interface { - MyServicePrioParentClientInterface - PingContext(ctx context.Context) (error) - PongContext(ctx context.Context) (error) -} - type MyServicePrioParentChannelClient struct { ch thrift.RequestChannel } @@ -699,7 +681,6 @@ type MyServicePrioParentClient struct { } // Compile time interface enforcer var _ MyServicePrioParentClientInterface = (*MyServicePrioParentClient)(nil) -var _ MyServicePrioParentContextClientInterface = (*MyServicePrioParentClient)(nil) func NewMyServicePrioParentClient(prot thrift.Protocol) *MyServicePrioParentClient { return &MyServicePrioParentClient{ @@ -921,14 +902,6 @@ type MyServicePrioChildClientInterface interface { Pang() (error) } -type MyServicePrioChildContextClientInterface interface { - MyServicePrioChildClientInterface - // Inherited/extended service - MyServicePrioParentContextClientInterface - - PangContext(ctx context.Context) (error) -} - type MyServicePrioChildChannelClient struct { // Inherited/extended service *MyServicePrioParentChannelClient @@ -955,7 +928,6 @@ type MyServicePrioChildClient struct { } // Compile time interface enforcer var _ MyServicePrioChildClientInterface = (*MyServicePrioChildClient)(nil) -var _ MyServicePrioChildContextClientInterface = (*MyServicePrioChildClient)(nil) func NewMyServicePrioChildClient(prot thrift.Protocol) *MyServicePrioChildClient { return &MyServicePrioChildClient{ @@ -1074,11 +1046,6 @@ type BadServiceClientInterface interface { Bar() (int32, error) } -type BadServiceContextClientInterface interface { - BadServiceClientInterface - BarContext(ctx context.Context) (int32, error) -} - type BadServiceChannelClient struct { ch thrift.RequestChannel } @@ -1100,7 +1067,6 @@ type BadServiceClient struct { } // Compile time interface enforcer var _ BadServiceClientInterface = (*BadServiceClient)(nil) -var _ BadServiceContextClientInterface = (*BadServiceClient)(nil) func NewBadServiceClient(prot thrift.Protocol) *BadServiceClient { return &BadServiceClient{ @@ -1250,13 +1216,6 @@ type FooBarBazServiceClientInterface interface { Baz() (error) } -type FooBarBazServiceContextClientInterface interface { - FooBarBazServiceClientInterface - FooStructuredContext(ctx context.Context) (error) - BarNonStructuredContext(ctx context.Context) (error) - BazContext(ctx context.Context) (error) -} - type FooBarBazServiceChannelClient struct { ch thrift.RequestChannel } @@ -1278,7 +1237,6 @@ type FooBarBazServiceClient struct { } // Compile time interface enforcer var _ FooBarBazServiceClientInterface = (*FooBarBazServiceClient)(nil) -var _ FooBarBazServiceContextClientInterface = (*FooBarBazServiceClient)(nil) func NewFooBarBazServiceClient(prot thrift.Protocol) *FooBarBazServiceClient { return &FooBarBazServiceClient{ diff --git a/thrift/compiler/test/fixtures/basic/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/basic/out/go/gen-go/module/svcs.go index 7b817d23638..a9077fc043b 100644 --- a/thrift/compiler/test/fixtures/basic/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/basic/out/go/gen-go/module/svcs.go @@ -36,11 +36,6 @@ type FooServiceClientInterface interface { SimpleRPC() (error) } -type FooServiceContextClientInterface interface { - FooServiceClientInterface - SimpleRPCContext(ctx context.Context) (error) -} - type FooServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type FooServiceClient struct { } // Compile time interface enforcer var _ FooServiceClientInterface = (*FooServiceClient)(nil) -var _ FooServiceContextClientInterface = (*FooServiceClient)(nil) func NewFooServiceClient(prot thrift.Protocol) *FooServiceClient { return &FooServiceClient{ @@ -207,11 +201,6 @@ type FB303ServiceClientInterface interface { SimpleRPC(intParameter int32) (*ReservedKeyword, error) } -type FB303ServiceContextClientInterface interface { - FB303ServiceClientInterface - SimpleRPCContext(ctx context.Context, intParameter int32) (*ReservedKeyword, error) -} - type FB303ServiceChannelClient struct { ch thrift.RequestChannel } @@ -233,7 +222,6 @@ type FB303ServiceClient struct { } // Compile time interface enforcer var _ FB303ServiceClientInterface = (*FB303ServiceClient)(nil) -var _ FB303ServiceContextClientInterface = (*FB303ServiceClient)(nil) func NewFB303ServiceClient(prot thrift.Protocol) *FB303ServiceClient { return &FB303ServiceClient{ @@ -399,20 +387,6 @@ type MyServiceClientInterface interface { RpcSkippedCodegen() (error) } -type MyServiceContextClientInterface interface { - MyServiceClientInterface - PingContext(ctx context.Context) (error) - GetRandomDataContext(ctx context.Context) (string, error) - SinkContext(ctx context.Context, sink int64) (error) - PutDataByIdContext(ctx context.Context, id int64, data string) (error) - HasDataByIdContext(ctx context.Context, id int64) (bool, error) - GetDataByIdContext(ctx context.Context, id int64) (string, error) - DeleteDataByIdContext(ctx context.Context, id int64) (error) - LobDataByIdContext(ctx context.Context, id int64, data string) (error) - InvalidReturnForHackContext(ctx context.Context) ([]float32, error) - RpcSkippedCodegenContext(ctx context.Context) (error) -} - type MyServiceChannelClient struct { ch thrift.RequestChannel } @@ -434,7 +408,6 @@ type MyServiceClient struct { } // Compile time interface enforcer var _ MyServiceClientInterface = (*MyServiceClient)(nil) -var _ MyServiceContextClientInterface = (*MyServiceClient)(nil) func NewMyServiceClient(prot thrift.Protocol) *MyServiceClient { return &MyServiceClient{ @@ -1232,12 +1205,6 @@ type DbMixedStackArgumentsClientInterface interface { GetDataByKey1(key string) ([]byte, error) } -type DbMixedStackArgumentsContextClientInterface interface { - DbMixedStackArgumentsClientInterface - GetDataByKey0Context(ctx context.Context, key string) ([]byte, error) - GetDataByKey1Context(ctx context.Context, key string) ([]byte, error) -} - type DbMixedStackArgumentsChannelClient struct { ch thrift.RequestChannel } @@ -1259,7 +1226,6 @@ type DbMixedStackArgumentsClient struct { } // Compile time interface enforcer var _ DbMixedStackArgumentsClientInterface = (*DbMixedStackArgumentsClient)(nil) -var _ DbMixedStackArgumentsContextClientInterface = (*DbMixedStackArgumentsClient)(nil) func NewDbMixedStackArgumentsClient(prot thrift.Protocol) *DbMixedStackArgumentsClient { return &DbMixedStackArgumentsClient{ diff --git a/thrift/compiler/test/fixtures/doctext/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/doctext/out/go/gen-go/module/svcs.go index fb1090036e1..0e7066a7292 100644 --- a/thrift/compiler/test/fixtures/doctext/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/doctext/out/go/gen-go/module/svcs.go @@ -38,12 +38,6 @@ type CClientInterface interface { Thing(a int32, b string, c []int32) (string, error) } -type CContextClientInterface interface { - CClientInterface - FContext(ctx context.Context) (error) - ThingContext(ctx context.Context, a int32, b string, c []int32) (string, error) -} - type CChannelClient struct { ch thrift.RequestChannel } @@ -65,7 +59,6 @@ type CClient struct { } // Compile time interface enforcer var _ CClientInterface = (*CClient)(nil) -var _ CContextClientInterface = (*CClient)(nil) func NewCClient(prot thrift.Protocol) *CClient { return &CClient{ diff --git a/thrift/compiler/test/fixtures/exceptions/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/exceptions/out/go/gen-go/module/svcs.go index 8ea67750683..f5fc95b3cd8 100644 --- a/thrift/compiler/test/fixtures/exceptions/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/exceptions/out/go/gen-go/module/svcs.go @@ -42,14 +42,6 @@ type RaiserClientInterface interface { Get500() (string, error) } -type RaiserContextClientInterface interface { - RaiserClientInterface - DoBlandContext(ctx context.Context) (error) - DoRaiseContext(ctx context.Context) (error) - Get200Context(ctx context.Context) (string, error) - Get500Context(ctx context.Context) (string, error) -} - type RaiserChannelClient struct { ch thrift.RequestChannel } @@ -71,7 +63,6 @@ type RaiserClient struct { } // Compile time interface enforcer var _ RaiserClientInterface = (*RaiserClient)(nil) -var _ RaiserContextClientInterface = (*RaiserClient)(nil) func NewRaiserClient(prot thrift.Protocol) *RaiserClient { return &RaiserClient{ diff --git a/thrift/compiler/test/fixtures/go-service/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/go-service/out/go/gen-go/module/svcs.go index 16e31199543..f7145585c5f 100644 --- a/thrift/compiler/test/fixtures/go-service/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/go-service/out/go/gen-go/module/svcs.go @@ -78,32 +78,6 @@ type GetEntityClientInterface interface { GetErr1Collision(err int64, err1 int64) (int32, error) } -type GetEntityContextClientInterface interface { - GetEntityClientInterface - GetEntityContext(ctx context.Context, r *GetEntityRequest) (*GetEntityResponse, error) - GetBoolContext(ctx context.Context) (bool, error) - GetByteContext(ctx context.Context) (int8, error) - GetI16Context(ctx context.Context) (int16, error) - GetI32Context(ctx context.Context) (int32, error) - GetI64Context(ctx context.Context) (int64, error) - GetDoubleContext(ctx context.Context) (float64, error) - GetStringContext(ctx context.Context) (string, error) - GetBinaryContext(ctx context.Context) ([]byte, error) - GetMapContext(ctx context.Context) (map[string]string, error) - GetSetContext(ctx context.Context) ([]string, error) - GetListContext(ctx context.Context) ([]string, error) - GetLegacyStuffContext(ctx context.Context, numPos int64, numNeg1 int64, numNeg2 int64) (int32, error) - GetCtxCollisionContext(ctx1 context.Context, ctx int64) (int32, error) - GetCtx1CollisionContext(ctx2 context.Context, ctx int64, ctx1 int64) (int32, error) - GetContextCollisionContext(ctx context.Context, context_ int64) (int32, error) - GetOutCollisionContext(ctx context.Context, out int64) (int32, error) - GetOut1CollisionContext(ctx context.Context, out int64, out1 int64) (int32, error) - GetInCollisionContext(ctx context.Context, in int64) (int32, error) - GetIn1CollisionContext(ctx context.Context, in int64, in1 int64) (int32, error) - GetErrCollisionContext(ctx context.Context, err int64) (int32, error) - GetErr1CollisionContext(ctx context.Context, err int64, err1 int64) (int32, error) -} - type GetEntityChannelClient struct { ch thrift.RequestChannel } @@ -125,7 +99,6 @@ type GetEntityClient struct { } // Compile time interface enforcer var _ GetEntityClientInterface = (*GetEntityClient)(nil) -var _ GetEntityContextClientInterface = (*GetEntityClient)(nil) func NewGetEntityClient(prot thrift.Protocol) *GetEntityClient { return &GetEntityClient{ diff --git a/thrift/compiler/test/fixtures/go-typedef/out/go_module1/gen-go/module1/svcs.go b/thrift/compiler/test/fixtures/go-typedef/out/go_module1/gen-go/module1/svcs.go index 9a9c9d202cd..0b1a33ea0ed 100644 --- a/thrift/compiler/test/fixtures/go-typedef/out/go_module1/gen-go/module1/svcs.go +++ b/thrift/compiler/test/fixtures/go-typedef/out/go_module1/gen-go/module1/svcs.go @@ -44,13 +44,6 @@ type FinderClientInterface interface { PreviousPlate(plate Plate) (Plate, error) } -type FinderContextClientInterface interface { - FinderClientInterface - ByPlateContext(ctx context.Context, plate Plate) (*Automobile, error) - AliasByPlateContext(ctx context.Context, plate Plate) (*Car, error) - PreviousPlateContext(ctx context.Context, plate Plate) (Plate, error) -} - type FinderChannelClient struct { ch thrift.RequestChannel } @@ -72,7 +65,6 @@ type FinderClient struct { } // Compile time interface enforcer var _ FinderClientInterface = (*FinderClient)(nil) -var _ FinderContextClientInterface = (*FinderClient)(nil) func NewFinderClient(prot thrift.Protocol) *FinderClient { return &FinderClient{ diff --git a/thrift/compiler/test/fixtures/includes/out/go_service/gen-go/service/svcs.go b/thrift/compiler/test/fixtures/includes/out/go_service/gen-go/service/svcs.go index 3f12137f0a4..a94f568fdee 100644 --- a/thrift/compiler/test/fixtures/includes/out/go_service/gen-go/service/svcs.go +++ b/thrift/compiler/test/fixtures/includes/out/go_service/gen-go/service/svcs.go @@ -42,12 +42,6 @@ type MyServiceClientInterface interface { HasArgDocs(s *module.MyStruct, i *includes.Included) (error) } -type MyServiceContextClientInterface interface { - MyServiceClientInterface - QueryContext(ctx context.Context, s *module.MyStruct, i *includes.Included) (error) - HasArgDocsContext(ctx context.Context, s *module.MyStruct, i *includes.Included) (error) -} - type MyServiceChannelClient struct { ch thrift.RequestChannel } @@ -69,7 +63,6 @@ type MyServiceClient struct { } // Compile time interface enforcer var _ MyServiceClientInterface = (*MyServiceClient)(nil) -var _ MyServiceContextClientInterface = (*MyServiceClient)(nil) func NewMyServiceClient(prot thrift.Protocol) *MyServiceClient { return &MyServiceClient{ diff --git a/thrift/compiler/test/fixtures/inheritance/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/inheritance/out/go/gen-go/module/svcs.go index 0fde4227e11..6b549b30beb 100644 --- a/thrift/compiler/test/fixtures/inheritance/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/inheritance/out/go/gen-go/module/svcs.go @@ -36,11 +36,6 @@ type MyRootClientInterface interface { DoRoot() (error) } -type MyRootContextClientInterface interface { - MyRootClientInterface - DoRootContext(ctx context.Context) (error) -} - type MyRootChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type MyRootClient struct { } // Compile time interface enforcer var _ MyRootClientInterface = (*MyRootClient)(nil) -var _ MyRootContextClientInterface = (*MyRootClient)(nil) func NewMyRootClient(prot thrift.Protocol) *MyRootClient { return &MyRootClient{ @@ -213,14 +207,6 @@ type MyNodeClientInterface interface { DoMid() (error) } -type MyNodeContextClientInterface interface { - MyNodeClientInterface - // Inherited/extended service - MyRootContextClientInterface - - DoMidContext(ctx context.Context) (error) -} - type MyNodeChannelClient struct { // Inherited/extended service *MyRootChannelClient @@ -247,7 +233,6 @@ type MyNodeClient struct { } // Compile time interface enforcer var _ MyNodeClientInterface = (*MyNodeClient)(nil) -var _ MyNodeContextClientInterface = (*MyNodeClient)(nil) func NewMyNodeClient(prot thrift.Protocol) *MyNodeClient { return &MyNodeClient{ @@ -372,14 +357,6 @@ type MyLeafClientInterface interface { DoLeaf() (error) } -type MyLeafContextClientInterface interface { - MyLeafClientInterface - // Inherited/extended service - MyNodeContextClientInterface - - DoLeafContext(ctx context.Context) (error) -} - type MyLeafChannelClient struct { // Inherited/extended service *MyNodeChannelClient @@ -406,7 +383,6 @@ type MyLeafClient struct { } // Compile time interface enforcer var _ MyLeafClientInterface = (*MyLeafClient)(nil) -var _ MyLeafContextClientInterface = (*MyLeafClient)(nil) func NewMyLeafClient(prot thrift.Protocol) *MyLeafClient { return &MyLeafClient{ diff --git a/thrift/compiler/test/fixtures/interactions/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/interactions/out/go/gen-go/module/svcs.go index 1bd718cd354..3d7910f16f0 100644 --- a/thrift/compiler/test/fixtures/interactions/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/interactions/out/go/gen-go/module/svcs.go @@ -38,11 +38,6 @@ type MyServiceClientInterface interface { Foo() (error) } -type MyServiceContextClientInterface interface { - MyServiceClientInterface - FooContext(ctx context.Context) (error) -} - type MyServiceChannelClient struct { ch thrift.RequestChannel } @@ -64,7 +59,6 @@ type MyServiceClient struct { } // Compile time interface enforcer var _ MyServiceClientInterface = (*MyServiceClient)(nil) -var _ MyServiceContextClientInterface = (*MyServiceClient)(nil) func NewMyServiceClient(prot thrift.Protocol) *MyServiceClient { return &MyServiceClient{ @@ -209,11 +203,6 @@ type FactoriesClientInterface interface { Foo() (error) } -type FactoriesContextClientInterface interface { - FactoriesClientInterface - FooContext(ctx context.Context) (error) -} - type FactoriesChannelClient struct { ch thrift.RequestChannel } @@ -235,7 +224,6 @@ type FactoriesClient struct { } // Compile time interface enforcer var _ FactoriesClientInterface = (*FactoriesClient)(nil) -var _ FactoriesContextClientInterface = (*FactoriesClient)(nil) func NewFactoriesClient(prot thrift.Protocol) *FactoriesClient { return &FactoriesClient{ @@ -380,11 +368,6 @@ type PerformClientInterface interface { Foo() (error) } -type PerformContextClientInterface interface { - PerformClientInterface - FooContext(ctx context.Context) (error) -} - type PerformChannelClient struct { ch thrift.RequestChannel } @@ -406,7 +389,6 @@ type PerformClient struct { } // Compile time interface enforcer var _ PerformClientInterface = (*PerformClient)(nil) -var _ PerformContextClientInterface = (*PerformClient)(nil) func NewPerformClient(prot thrift.Protocol) *PerformClient { return &PerformClient{ @@ -551,11 +533,6 @@ type InteractWithSharedClientInterface interface { DoSomeSimilarThings() (*shared.DoSomethingResult, error) } -type InteractWithSharedContextClientInterface interface { - InteractWithSharedClientInterface - DoSomeSimilarThingsContext(ctx context.Context) (*shared.DoSomethingResult, error) -} - type InteractWithSharedChannelClient struct { ch thrift.RequestChannel } @@ -577,7 +554,6 @@ type InteractWithSharedClient struct { } // Compile time interface enforcer var _ InteractWithSharedClientInterface = (*InteractWithSharedClient)(nil) -var _ InteractWithSharedContextClientInterface = (*InteractWithSharedClient)(nil) func NewInteractWithSharedClient(prot thrift.Protocol) *InteractWithSharedClient { return &InteractWithSharedClient{ @@ -721,10 +697,6 @@ type BoxServiceClientInterface interface { thrift.ClientInterface } -type BoxServiceContextClientInterface interface { - BoxServiceClientInterface -} - type BoxServiceChannelClient struct { ch thrift.RequestChannel } @@ -746,7 +718,6 @@ type BoxServiceClient struct { } // Compile time interface enforcer var _ BoxServiceClientInterface = (*BoxServiceClient)(nil) -var _ BoxServiceContextClientInterface = (*BoxServiceClient)(nil) func NewBoxServiceClient(prot thrift.Protocol) *BoxServiceClient { return &BoxServiceClient{ diff --git a/thrift/compiler/test/fixtures/interactions/out/go/gen-go/shared/svcs.go b/thrift/compiler/test/fixtures/interactions/out/go/gen-go/shared/svcs.go index d44dac8308d..846e99b3d54 100644 --- a/thrift/compiler/test/fixtures/interactions/out/go/gen-go/shared/svcs.go +++ b/thrift/compiler/test/fixtures/interactions/out/go/gen-go/shared/svcs.go @@ -34,10 +34,6 @@ type InteractLocallyClientInterface interface { thrift.ClientInterface } -type InteractLocallyContextClientInterface interface { - InteractLocallyClientInterface -} - type InteractLocallyChannelClient struct { ch thrift.RequestChannel } @@ -59,7 +55,6 @@ type InteractLocallyClient struct { } // Compile time interface enforcer var _ InteractLocallyClientInterface = (*InteractLocallyClient)(nil) -var _ InteractLocallyContextClientInterface = (*InteractLocallyClient)(nil) func NewInteractLocallyClient(prot thrift.Protocol) *InteractLocallyClient { return &InteractLocallyClient{ diff --git a/thrift/compiler/test/fixtures/namespace/out/go/gen-go/my/namespacing/test/module/svcs.go b/thrift/compiler/test/fixtures/namespace/out/go/gen-go/my/namespacing/test/module/svcs.go index 2919d097fee..77c7659439c 100644 --- a/thrift/compiler/test/fixtures/namespace/out/go/gen-go/my/namespacing/test/module/svcs.go +++ b/thrift/compiler/test/fixtures/namespace/out/go/gen-go/my/namespacing/test/module/svcs.go @@ -36,11 +36,6 @@ type TestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type TestServiceContextClientInterface interface { - TestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type TestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type TestServiceClient struct { } // Compile time interface enforcer var _ TestServiceClientInterface = (*TestServiceClient)(nil) -var _ TestServiceContextClientInterface = (*TestServiceClient)(nil) func NewTestServiceClient(prot thrift.Protocol) *TestServiceClient { return &TestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace/out/go_emptyns/gen-go/emptyns/svcs.go b/thrift/compiler/test/fixtures/namespace/out/go_emptyns/gen-go/emptyns/svcs.go index 2d439701771..933f570ad83 100644 --- a/thrift/compiler/test/fixtures/namespace/out/go_emptyns/gen-go/emptyns/svcs.go +++ b/thrift/compiler/test/fixtures/namespace/out/go_emptyns/gen-go/emptyns/svcs.go @@ -36,11 +36,6 @@ type TestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type TestServiceContextClientInterface interface { - TestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type TestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type TestServiceClient struct { } // Compile time interface enforcer var _ TestServiceClientInterface = (*TestServiceClient)(nil) -var _ TestServiceContextClientInterface = (*TestServiceClient)(nil) func NewTestServiceClient(prot thrift.Protocol) *TestServiceClient { return &TestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/extend/test/svcs.go b/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/extend/test/svcs.go index d57be5bfe89..e08ddc6176e 100644 --- a/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/extend/test/svcs.go +++ b/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/extend/test/svcs.go @@ -44,14 +44,6 @@ type ExtendTestServiceClientInterface interface { Check(struct1 *test0.HsFoo) (bool, error) } -type ExtendTestServiceContextClientInterface interface { - ExtendTestServiceClientInterface - // Inherited/extended service - test0.HsTestServiceContextClientInterface - - CheckContext(ctx context.Context, struct1 *test0.HsFoo) (bool, error) -} - type ExtendTestServiceChannelClient struct { // Inherited/extended service *test0.HsTestServiceChannelClient @@ -78,7 +70,6 @@ type ExtendTestServiceClient struct { } // Compile time interface enforcer var _ ExtendTestServiceClientInterface = (*ExtendTestServiceClient)(nil) -var _ ExtendTestServiceContextClientInterface = (*ExtendTestServiceClient)(nil) func NewExtendTestServiceClient(prot thrift.Protocol) *ExtendTestServiceClient { return &ExtendTestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/test/svcs.go b/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/test/svcs.go index 060a893034a..470304712cd 100644 --- a/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/test/svcs.go +++ b/thrift/compiler/test/fixtures/namespace/out/go_extend/gen-go/my/namespacing/test/svcs.go @@ -36,11 +36,6 @@ type HsTestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type HsTestServiceContextClientInterface interface { - HsTestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type HsTestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type HsTestServiceClient struct { } // Compile time interface enforcer var _ HsTestServiceClientInterface = (*HsTestServiceClient)(nil) -var _ HsTestServiceContextClientInterface = (*HsTestServiceClient)(nil) func NewHsTestServiceClient(prot thrift.Protocol) *HsTestServiceClient { return &HsTestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace/out/go_hsmodule/gen-go/my/namespacing/test/svcs.go b/thrift/compiler/test/fixtures/namespace/out/go_hsmodule/gen-go/my/namespacing/test/svcs.go index eb2f0cdb715..4a4ad4aaa5a 100644 --- a/thrift/compiler/test/fixtures/namespace/out/go_hsmodule/gen-go/my/namespacing/test/svcs.go +++ b/thrift/compiler/test/fixtures/namespace/out/go_hsmodule/gen-go/my/namespacing/test/svcs.go @@ -36,11 +36,6 @@ type HsTestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type HsTestServiceContextClientInterface interface { - HsTestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type HsTestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type HsTestServiceClient struct { } // Compile time interface enforcer var _ HsTestServiceClientInterface = (*HsTestServiceClient)(nil) -var _ HsTestServiceContextClientInterface = (*HsTestServiceClient)(nil) func NewHsTestServiceClient(prot thrift.Protocol) *HsTestServiceClient { return &HsTestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace/out/go_quoted/gen-go/my/namespacing/test/module/svcs.go b/thrift/compiler/test/fixtures/namespace/out/go_quoted/gen-go/my/namespacing/test/module/svcs.go index e6ba849fa8c..db1fa1d1e7e 100644 --- a/thrift/compiler/test/fixtures/namespace/out/go_quoted/gen-go/my/namespacing/test/module/svcs.go +++ b/thrift/compiler/test/fixtures/namespace/out/go_quoted/gen-go/my/namespacing/test/module/svcs.go @@ -36,11 +36,6 @@ type TestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type TestServiceContextClientInterface interface { - TestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type TestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type TestServiceClient struct { } // Compile time interface enforcer var _ TestServiceClientInterface = (*TestServiceClient)(nil) -var _ TestServiceContextClientInterface = (*TestServiceClient)(nil) func NewTestServiceClient(prot thrift.Protocol) *TestServiceClient { return &TestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace_from_package/out/go/gen-go/namespace_from_package/module/svcs.go b/thrift/compiler/test/fixtures/namespace_from_package/out/go/gen-go/namespace_from_package/module/svcs.go index 84d93b73703..6221de9957e 100644 --- a/thrift/compiler/test/fixtures/namespace_from_package/out/go/gen-go/namespace_from_package/module/svcs.go +++ b/thrift/compiler/test/fixtures/namespace_from_package/out/go/gen-go/namespace_from_package/module/svcs.go @@ -36,11 +36,6 @@ type TestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type TestServiceContextClientInterface interface { - TestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type TestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type TestServiceClient struct { } // Compile time interface enforcer var _ TestServiceClientInterface = (*TestServiceClient)(nil) -var _ TestServiceContextClientInterface = (*TestServiceClient)(nil) func NewTestServiceClient(prot thrift.Protocol) *TestServiceClient { return &TestServiceClient{ diff --git a/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/go/gen-go/namespace_from_package_without_module_name/module/svcs.go b/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/go/gen-go/namespace_from_package_without_module_name/module/svcs.go index 522b6869337..c52e8f3e342 100644 --- a/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/go/gen-go/namespace_from_package_without_module_name/module/svcs.go +++ b/thrift/compiler/test/fixtures/namespace_from_package_without_module_name/out/go/gen-go/namespace_from_package_without_module_name/module/svcs.go @@ -36,11 +36,6 @@ type TestServiceClientInterface interface { Init(int1 int64) (int64, error) } -type TestServiceContextClientInterface interface { - TestServiceClientInterface - InitContext(ctx context.Context, int1 int64) (int64, error) -} - type TestServiceChannelClient struct { ch thrift.RequestChannel } @@ -62,7 +57,6 @@ type TestServiceClient struct { } // Compile time interface enforcer var _ TestServiceClientInterface = (*TestServiceClient)(nil) -var _ TestServiceContextClientInterface = (*TestServiceClient)(nil) func NewTestServiceClient(prot thrift.Protocol) *TestServiceClient { return &TestServiceClient{ diff --git a/thrift/compiler/test/fixtures/params/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/params/out/go/gen-go/module/svcs.go index 7d0b177be21..7c5e24e7989 100644 --- a/thrift/compiler/test/fixtures/params/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/params/out/go/gen-go/module/svcs.go @@ -44,15 +44,6 @@ type NestedContainersClientInterface interface { Turtles(foo [][]map[int32]map[int32][]int32) (error) } -type NestedContainersContextClientInterface interface { - NestedContainersClientInterface - MapListContext(ctx context.Context, foo map[int32][]int32) (error) - MapSetContext(ctx context.Context, foo map[int32][]int32) (error) - ListMapContext(ctx context.Context, foo []map[int32]int32) (error) - ListSetContext(ctx context.Context, foo [][]int32) (error) - TurtlesContext(ctx context.Context, foo [][]map[int32]map[int32][]int32) (error) -} - type NestedContainersChannelClient struct { ch thrift.RequestChannel } @@ -74,7 +65,6 @@ type NestedContainersClient struct { } // Compile time interface enforcer var _ NestedContainersClientInterface = (*NestedContainersClient)(nil) -var _ NestedContainersContextClientInterface = (*NestedContainersClient)(nil) func NewNestedContainersClient(prot thrift.Protocol) *NestedContainersClient { return &NestedContainersClient{ diff --git a/thrift/compiler/test/fixtures/types/out/go/gen-go/module/svcs.go b/thrift/compiler/test/fixtures/types/out/go/gen-go/module/svcs.go index 3800109bb72..ece20635a17 100644 --- a/thrift/compiler/test/fixtures/types/out/go/gen-go/module/svcs.go +++ b/thrift/compiler/test/fixtures/types/out/go/gen-go/module/svcs.go @@ -40,12 +40,6 @@ type SomeServiceClientInterface interface { BinaryKeyedMap(r []int64) (map[*TBinary]int64, error) } -type SomeServiceContextClientInterface interface { - SomeServiceClientInterface - BounceMapContext(ctx context.Context, m included.SomeMap) (included.SomeMap, error) - BinaryKeyedMapContext(ctx context.Context, r []int64) (map[*TBinary]int64, error) -} - type SomeServiceChannelClient struct { ch thrift.RequestChannel } @@ -67,7 +61,6 @@ type SomeServiceClient struct { } // Compile time interface enforcer var _ SomeServiceClientInterface = (*SomeServiceClient)(nil) -var _ SomeServiceContextClientInterface = (*SomeServiceClient)(nil) func NewSomeServiceClient(prot thrift.Protocol) *SomeServiceClient { return &SomeServiceClient{