From 724b62958af754de5b2503631bb014faef3c5ba6 Mon Sep 17 00:00:00 2001 From: chris ludden Date: Thu, 19 Dec 2024 13:50:36 -0700 Subject: [PATCH] fix cross-package cli imports, repeated string flags --- CHANGELOG.md | 1 + gen/example/helloworld/v1/example.pb.go | 2 +- .../helloworld/v1/example_temporal.pb.go | 4 +- .../example_xns_temporal.pb.go | 4 +- gen/example/mutex/v1/mutex.pb.go | 2 +- gen/example/mutex/v1/mutex_temporal.pb.go | 4 +- .../v1/mutexv1xns/mutex_xns_temporal.pb.go | 4 +- gen/example/schedule/v1/schedule.pb.go | 2 +- .../schedule/v1/schedule_temporal.pb.go | 4 +- .../schedulev1xns/schedule_xns_temporal.pb.go | 4 +- .../v1/searchattributes.pb.go | 2 +- .../v1/searchattributes_temporal.pb.go | 4 +- .../searchattributes_xns_temporal.pb.go | 4 +- .../updatabletimer/v1/updatabletimer.pb.go | 2 +- .../v1/updatabletimer_temporal.pb.go | 4 +- .../updatabletimer_xns_temporal.pb.go | 4 +- gen/example/v1/example.pb.go | 2 +- gen/example/v1/example_temporal.pb.go | 4 +- .../examplev1xns/example_xns_temporal.pb.go | 4 +- gen/example/xns/v1/xns.pb.go | 2 +- gen/example/xns/v1/xns_temporal.pb.go | 4 +- .../xns/v1/xnsv1xns/xns_xns_temporal.pb.go | 4 +- gen/patch/go.pb.go | 2 +- gen/temporal/v1/temporal.pb.go | 2 +- gen/temporal/xns/v1/xns.pb.go | 2 +- gen/test/expression/v1/expression.pb.go | 2 +- gen/test/option/v1/option.pb.go | 2 +- gen/test/option/v1/option_temporal.pb.go | 4 +- .../v1/optionv1xns/option_xns_temporal.pb.go | 4 +- gen/test/simple/common/v1/common.pb.go | 2 +- gen/test/simple/v1/simple.pb.go | 2 +- gen/test/simple/v1/simple_temporal.pb.go | 4 +- .../simple/v1/v1xns/simple_xns_temporal.pb.go | 4 +- gen/test/xnserr/v1/xnserr.pb.go | 2 +- gen/test/xnserr/v1/xnserr_temporal.pb.go | 4 +- .../v1/xnserrv1xns/xnserr_xns_temporal.pb.go | 4 +- internal/plugin/cli.go | 8 ++- internal/plugin/plugin.go | 2 - .../gen/example/v1/mock_CreateFooRun.go | 17 +++-- .../gen/example/v1/mock_ExampleClient.go | 21 +++---- .../v1/mock_UpdateFooProgressHandle.go | 2 +- .../simple/v1/mock_SimpleWorkflowFunctions.go | 62 +++++++++---------- .../gen/test/xnserr/v1/mock_ServerClient.go | 2 +- .../gen/test/xnserr/v1/mock_SleepRun.go | 17 +++-- .../go.temporal.io/sdk/client/mock_Client.go | 2 +- .../sdk/clientutils/mock_WorkflowRun.go | 2 +- 46 files changed, 123 insertions(+), 123 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f46104..2e0e923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - [#80](https://github.com/cludden/protoc-gen-go-temporal/pull/80) fix cross-package signal-with-start +- [#84](https://github.com/cludden/protoc-gen-go-temporal/pull/84) q diff --git a/gen/example/helloworld/v1/example.pb.go b/gen/example/helloworld/v1/example.pb.go index 5755dc0..783b67d 100644 --- a/gen/example/helloworld/v1/example.pb.go +++ b/gen/example/helloworld/v1/example.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/helloworld/v1/example.proto diff --git a/gen/example/helloworld/v1/example_temporal.pb.go b/gen/example/helloworld/v1/example_temporal.pb.go index 9e1f3c1..eacd29e 100644 --- a/gen/example/helloworld/v1/example_temporal.pb.go +++ b/gen/example/helloworld/v1/example_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/helloworld/v1/example.proto diff --git a/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go b/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go index a023b7b..1c33bc7 100644 --- a/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go +++ b/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/helloworld/v1/example.proto diff --git a/gen/example/mutex/v1/mutex.pb.go b/gen/example/mutex/v1/mutex.pb.go index a85c5f9..a99afa6 100644 --- a/gen/example/mutex/v1/mutex.pb.go +++ b/gen/example/mutex/v1/mutex.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/mutex/v1/mutex.proto diff --git a/gen/example/mutex/v1/mutex_temporal.pb.go b/gen/example/mutex/v1/mutex_temporal.pb.go index 04b3158..a34cf64 100644 --- a/gen/example/mutex/v1/mutex_temporal.pb.go +++ b/gen/example/mutex/v1/mutex_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/mutex/v1/mutex.proto diff --git a/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go b/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go index 803ce24..5a66b48 100644 --- a/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go +++ b/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/mutex/v1/mutex.proto diff --git a/gen/example/schedule/v1/schedule.pb.go b/gen/example/schedule/v1/schedule.pb.go index fe60ad0..4b60701 100644 --- a/gen/example/schedule/v1/schedule.pb.go +++ b/gen/example/schedule/v1/schedule.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/schedule/v1/schedule.proto diff --git a/gen/example/schedule/v1/schedule_temporal.pb.go b/gen/example/schedule/v1/schedule_temporal.pb.go index b776634..7c22445 100644 --- a/gen/example/schedule/v1/schedule_temporal.pb.go +++ b/gen/example/schedule/v1/schedule_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/schedule/v1/schedule.proto diff --git a/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go b/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go index fb4a44a..65d9f51 100644 --- a/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go +++ b/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/schedule/v1/schedule.proto diff --git a/gen/example/searchattributes/v1/searchattributes.pb.go b/gen/example/searchattributes/v1/searchattributes.pb.go index b930a0e..35902fa 100644 --- a/gen/example/searchattributes/v1/searchattributes.pb.go +++ b/gen/example/searchattributes/v1/searchattributes.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/searchattributes/v1/searchattributes.proto diff --git a/gen/example/searchattributes/v1/searchattributes_temporal.pb.go b/gen/example/searchattributes/v1/searchattributes_temporal.pb.go index ffd4788..82d0871 100644 --- a/gen/example/searchattributes/v1/searchattributes_temporal.pb.go +++ b/gen/example/searchattributes/v1/searchattributes_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/searchattributes/v1/searchattributes.proto diff --git a/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go b/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go index e942851..427353d 100644 --- a/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go +++ b/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/searchattributes/v1/searchattributes.proto diff --git a/gen/example/updatabletimer/v1/updatabletimer.pb.go b/gen/example/updatabletimer/v1/updatabletimer.pb.go index 4d27684..7592d35 100644 --- a/gen/example/updatabletimer/v1/updatabletimer.pb.go +++ b/gen/example/updatabletimer/v1/updatabletimer.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/updatabletimer/v1/updatabletimer.proto diff --git a/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go b/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go index c39a5e3..64869c2 100644 --- a/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go +++ b/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/updatabletimer/v1/updatabletimer.proto diff --git a/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go b/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go index b35d833..392d20d 100644 --- a/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go +++ b/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/updatabletimer/v1/updatabletimer.proto diff --git a/gen/example/v1/example.pb.go b/gen/example/v1/example.pb.go index 4b3400f..17488d8 100644 --- a/gen/example/v1/example.pb.go +++ b/gen/example/v1/example.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/v1/example.proto diff --git a/gen/example/v1/example_temporal.pb.go b/gen/example/v1/example_temporal.pb.go index bc4fff7..9ba3570 100644 --- a/gen/example/v1/example_temporal.pb.go +++ b/gen/example/v1/example_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/v1/example.proto diff --git a/gen/example/v1/examplev1xns/example_xns_temporal.pb.go b/gen/example/v1/examplev1xns/example_xns_temporal.pb.go index dd84e05..c5f0494 100644 --- a/gen/example/v1/examplev1xns/example_xns_temporal.pb.go +++ b/gen/example/v1/examplev1xns/example_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/v1/example.proto diff --git a/gen/example/xns/v1/xns.pb.go b/gen/example/xns/v1/xns.pb.go index 3c2bd71..c786cf8 100644 --- a/gen/example/xns/v1/xns.pb.go +++ b/gen/example/xns/v1/xns.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: example/xns/v1/xns.proto diff --git a/gen/example/xns/v1/xns_temporal.pb.go b/gen/example/xns/v1/xns_temporal.pb.go index 4997a99..fc4b80b 100644 --- a/gen/example/xns/v1/xns_temporal.pb.go +++ b/gen/example/xns/v1/xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/xns/v1/xns.proto diff --git a/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go b/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go index 91a2fb5..1c5c6cc 100644 --- a/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go +++ b/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: example/xns/v1/xns.proto diff --git a/gen/patch/go.pb.go b/gen/patch/go.pb.go index 5c9aaf1..4b678e9 100644 --- a/gen/patch/go.pb.go +++ b/gen/patch/go.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: patch/go.proto diff --git a/gen/temporal/v1/temporal.pb.go b/gen/temporal/v1/temporal.pb.go index ec1fa39..b88ddac 100644 --- a/gen/temporal/v1/temporal.pb.go +++ b/gen/temporal/v1/temporal.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: temporal/v1/temporal.proto diff --git a/gen/temporal/xns/v1/xns.pb.go b/gen/temporal/xns/v1/xns.pb.go index fdfaf4b..e98ac73 100644 --- a/gen/temporal/xns/v1/xns.pb.go +++ b/gen/temporal/xns/v1/xns.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: temporal/xns/v1/xns.proto diff --git a/gen/test/expression/v1/expression.pb.go b/gen/test/expression/v1/expression.pb.go index c061784..fcb48ac 100644 --- a/gen/test/expression/v1/expression.pb.go +++ b/gen/test/expression/v1/expression.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: test/expression/v1/expression.proto diff --git a/gen/test/option/v1/option.pb.go b/gen/test/option/v1/option.pb.go index 49a1b03..772079b 100644 --- a/gen/test/option/v1/option.pb.go +++ b/gen/test/option/v1/option.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: test/option/v1/option.proto diff --git a/gen/test/option/v1/option_temporal.pb.go b/gen/test/option/v1/option_temporal.pb.go index e311a6c..9026169 100644 --- a/gen/test/option/v1/option_temporal.pb.go +++ b/gen/test/option/v1/option_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: test/option/v1/option.proto diff --git a/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go b/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go index 7460497..0d3c75a 100644 --- a/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go +++ b/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: test/option/v1/option.proto diff --git a/gen/test/simple/common/v1/common.pb.go b/gen/test/simple/common/v1/common.pb.go index d331891..9abfac7 100644 --- a/gen/test/simple/common/v1/common.pb.go +++ b/gen/test/simple/common/v1/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: test/simple/common/v1/common.proto diff --git a/gen/test/simple/v1/simple.pb.go b/gen/test/simple/v1/simple.pb.go index a8fbb6a..8398e0b 100644 --- a/gen/test/simple/v1/simple.pb.go +++ b/gen/test/simple/v1/simple.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: test/simple/v1/simple.proto diff --git a/gen/test/simple/v1/simple_temporal.pb.go b/gen/test/simple/v1/simple_temporal.pb.go index f4ea8f3..8ced759 100644 --- a/gen/test/simple/v1/simple_temporal.pb.go +++ b/gen/test/simple/v1/simple_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: test/simple/v1/simple.proto diff --git a/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go b/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go index 4dd77d5..7cbedfd 100644 --- a/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go +++ b/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: test/simple/v1/simple.proto diff --git a/gen/test/xnserr/v1/xnserr.pb.go b/gen/test/xnserr/v1/xnserr.pb.go index e4420b0..0ac41ba 100644 --- a/gen/test/xnserr/v1/xnserr.pb.go +++ b/gen/test/xnserr/v1/xnserr.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: test/xnserr/v1/xnserr.proto diff --git a/gen/test/xnserr/v1/xnserr_temporal.pb.go b/gen/test/xnserr/v1/xnserr_temporal.pb.go index ee0179c..9d9c4b5 100644 --- a/gen/test/xnserr/v1/xnserr_temporal.pb.go +++ b/gen/test/xnserr/v1/xnserr_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: test/xnserr/v1/xnserr.proto diff --git a/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go b/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go index 3f57783..499d929 100644 --- a/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go +++ b/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go_temporal. DO NOT EDIT. // versions: // -// protoc-gen-go_temporal 1.14.4-next (0db6561a5e4a1985a1d33f8558a2b02da60e9bac) -// go go1.22.2 +// protoc-gen-go_temporal 1.14.4-next (b3f3ee9d86797a856ec4696266c0dc2fbef5bee5) +// go go1.23.3 // protoc (unknown) // // source: test/xnserr/v1/xnserr.proto diff --git a/internal/plugin/cli.go b/internal/plugin/cli.go index 48fb57f..99bb6c2 100644 --- a/internal/plugin/cli.go +++ b/internal/plugin/cli.go @@ -828,10 +828,10 @@ func (svc *Manifest) genCliUnmarshalMessage(f *g.File, msg *protogen.Message) { oneof := field.Oneof switch { - case field.Desc.IsList(): + case field.Desc.IsList() && field.Desc.Kind() != protoreflect.StringKind: fallthrough case field.Desc.IsMap(): - b.Var().Id("tmp").Id(name) + b.Var().Id("tmp").Qual(string(msg.GoIdent.GoImportPath), name) b.If( g.Err().Op(":=").Qual(protojsonPkg, "Unmarshal").Call( g.Index().Byte().Call(g.Qual("fmt", "Sprintf").Call(g.Lit(fmt.Sprintf(`{"%s":%%s}`, field.Desc.JSONName())), g.Id("cmd").Dot("String").Call(g.Lit(flag)))), @@ -944,6 +944,10 @@ func (svc *Manifest) genCliUnmarshalMessage(f *g.File, msg *protogen.Message) { b.Id("result").Dot(oneof.GoName).Op("=").Op("&").Qual(string(field.GoIdent.GoImportPath), field.GoIdent.GoName).Values(g.Id(goName).Op(":").Id("cmd").Dot("String").Call(g.Lit(flag))) return } + if field.Desc.IsList() { + b.Id("result").Dot(goName).Op("=").Id("cmd").Dot("StringSlice").Call(g.Lit(flag)) + return + } b.Id("result").Dot(goName).Op("=").Id("cmd").Dot("String").Call(g.Lit(flag)) } }) diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index e763d2e..ee4d28a 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -2,7 +2,6 @@ package plugin import ( "fmt" - "io" "runtime" "strings" @@ -37,7 +36,6 @@ type Plugin struct { Version string cfg *Config flags *pflag.FlagSet - stderr io.WriteCloser } func New(commit, version string) *Plugin { diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go index e58134e..19495f9 100644 --- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go +++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go @@ -1,13 +1,12 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package examplev1 import ( context "context" - client "go.temporal.io/sdk/client" - examplev1 "github.com/cludden/protoc-gen-go-temporal/gen/example/v1" + internal "go.temporal.io/sdk/client" mock "github.com/stretchr/testify/mock" ) @@ -233,19 +232,19 @@ func (_c *MockCreateFooRun_ID_Call) RunAndReturn(run func() string) *MockCreateF } // Run provides a mock function with given fields: -func (_m *MockCreateFooRun) Run() client.WorkflowRun { +func (_m *MockCreateFooRun) Run() internal.WorkflowRun { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Run") } - var r0 client.WorkflowRun - if rf, ok := ret.Get(0).(func() client.WorkflowRun); ok { + var r0 internal.WorkflowRun + if rf, ok := ret.Get(0).(func() internal.WorkflowRun); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(client.WorkflowRun) + r0 = ret.Get(0).(internal.WorkflowRun) } } @@ -269,12 +268,12 @@ func (_c *MockCreateFooRun_Run_Call) Run(run func()) *MockCreateFooRun_Run_Call return _c } -func (_c *MockCreateFooRun_Run_Call) Return(_a0 client.WorkflowRun) *MockCreateFooRun_Run_Call { +func (_c *MockCreateFooRun_Run_Call) Return(_a0 internal.WorkflowRun) *MockCreateFooRun_Run_Call { _c.Call.Return(_a0) return _c } -func (_c *MockCreateFooRun_Run_Call) RunAndReturn(run func() client.WorkflowRun) *MockCreateFooRun_Run_Call { +func (_c *MockCreateFooRun_Run_Call) RunAndReturn(run func() internal.WorkflowRun) *MockCreateFooRun_Run_Call { _c.Call.Return(run) return _c } diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go index 01a391a..97efc08 100644 --- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go +++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go @@ -1,13 +1,12 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package examplev1 import ( context "context" - client "go.temporal.io/sdk/client" - examplev1 "github.com/cludden/protoc-gen-go-temporal/gen/example/v1" + internal "go.temporal.io/sdk/client" mock "github.com/stretchr/testify/mock" ) @@ -482,7 +481,7 @@ func (_c *MockExampleClient_GetFooProgress_Call) RunAndReturn(run func(context.C } // GetUpdateFooProgress provides a mock function with given fields: ctx, req -func (_m *MockExampleClient) GetUpdateFooProgress(ctx context.Context, req client.GetWorkflowUpdateHandleOptions) (examplev1.UpdateFooProgressHandle, error) { +func (_m *MockExampleClient) GetUpdateFooProgress(ctx context.Context, req internal.GetWorkflowUpdateHandleOptions) (examplev1.UpdateFooProgressHandle, error) { ret := _m.Called(ctx, req) if len(ret) == 0 { @@ -491,10 +490,10 @@ func (_m *MockExampleClient) GetUpdateFooProgress(ctx context.Context, req clien var r0 examplev1.UpdateFooProgressHandle var r1 error - if rf, ok := ret.Get(0).(func(context.Context, client.GetWorkflowUpdateHandleOptions) (examplev1.UpdateFooProgressHandle, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, internal.GetWorkflowUpdateHandleOptions) (examplev1.UpdateFooProgressHandle, error)); ok { return rf(ctx, req) } - if rf, ok := ret.Get(0).(func(context.Context, client.GetWorkflowUpdateHandleOptions) examplev1.UpdateFooProgressHandle); ok { + if rf, ok := ret.Get(0).(func(context.Context, internal.GetWorkflowUpdateHandleOptions) examplev1.UpdateFooProgressHandle); ok { r0 = rf(ctx, req) } else { if ret.Get(0) != nil { @@ -502,7 +501,7 @@ func (_m *MockExampleClient) GetUpdateFooProgress(ctx context.Context, req clien } } - if rf, ok := ret.Get(1).(func(context.Context, client.GetWorkflowUpdateHandleOptions) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, internal.GetWorkflowUpdateHandleOptions) error); ok { r1 = rf(ctx, req) } else { r1 = ret.Error(1) @@ -518,14 +517,14 @@ type MockExampleClient_GetUpdateFooProgress_Call struct { // GetUpdateFooProgress is a helper method to define mock.On call // - ctx context.Context -// - req client.GetWorkflowUpdateHandleOptions +// - req internal.GetWorkflowUpdateHandleOptions func (_e *MockExampleClient_Expecter) GetUpdateFooProgress(ctx interface{}, req interface{}) *MockExampleClient_GetUpdateFooProgress_Call { return &MockExampleClient_GetUpdateFooProgress_Call{Call: _e.mock.On("GetUpdateFooProgress", ctx, req)} } -func (_c *MockExampleClient_GetUpdateFooProgress_Call) Run(run func(ctx context.Context, req client.GetWorkflowUpdateHandleOptions)) *MockExampleClient_GetUpdateFooProgress_Call { +func (_c *MockExampleClient_GetUpdateFooProgress_Call) Run(run func(ctx context.Context, req internal.GetWorkflowUpdateHandleOptions)) *MockExampleClient_GetUpdateFooProgress_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(client.GetWorkflowUpdateHandleOptions)) + run(args[0].(context.Context), args[1].(internal.GetWorkflowUpdateHandleOptions)) }) return _c } @@ -535,7 +534,7 @@ func (_c *MockExampleClient_GetUpdateFooProgress_Call) Return(_a0 examplev1.Upda return _c } -func (_c *MockExampleClient_GetUpdateFooProgress_Call) RunAndReturn(run func(context.Context, client.GetWorkflowUpdateHandleOptions) (examplev1.UpdateFooProgressHandle, error)) *MockExampleClient_GetUpdateFooProgress_Call { +func (_c *MockExampleClient_GetUpdateFooProgress_Call) RunAndReturn(run func(context.Context, internal.GetWorkflowUpdateHandleOptions) (examplev1.UpdateFooProgressHandle, error)) *MockExampleClient_GetUpdateFooProgress_Call { _c.Call.Return(run) return _c } diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go index 725f402..d93b736 100644 --- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go +++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package examplev1 diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go index a053628..88459c9 100644 --- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go +++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go @@ -1,14 +1,14 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package v1 import ( commonv1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1" + internal "go.temporal.io/sdk/workflow" + mock "github.com/stretchr/testify/mock" v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1" - - workflow "go.temporal.io/sdk/workflow" ) // MockSimpleWorkflowFunctions is an autogenerated mock type for the SimpleWorkflowFunctions type @@ -25,7 +25,7 @@ func (_m *MockSimpleWorkflowFunctions) EXPECT() *MockSimpleWorkflowFunctions_Exp } // SomeWorkflow1 provides a mock function with given fields: _a0, _a1 -func (_m *MockSimpleWorkflowFunctions) SomeWorkflow1(_a0 workflow.Context, _a1 *v1.SomeWorkflow1Request) (*v1.SomeWorkflow1Response, error) { +func (_m *MockSimpleWorkflowFunctions) SomeWorkflow1(_a0 internal.Context, _a1 *v1.SomeWorkflow1Request) (*v1.SomeWorkflow1Response, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -34,10 +34,10 @@ func (_m *MockSimpleWorkflowFunctions) SomeWorkflow1(_a0 workflow.Context, _a1 * var r0 *v1.SomeWorkflow1Response var r1 error - if rf, ok := ret.Get(0).(func(workflow.Context, *v1.SomeWorkflow1Request) (*v1.SomeWorkflow1Response, error)); ok { + if rf, ok := ret.Get(0).(func(internal.Context, *v1.SomeWorkflow1Request) (*v1.SomeWorkflow1Response, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(workflow.Context, *v1.SomeWorkflow1Request) *v1.SomeWorkflow1Response); ok { + if rf, ok := ret.Get(0).(func(internal.Context, *v1.SomeWorkflow1Request) *v1.SomeWorkflow1Response); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -45,7 +45,7 @@ func (_m *MockSimpleWorkflowFunctions) SomeWorkflow1(_a0 workflow.Context, _a1 * } } - if rf, ok := ret.Get(1).(func(workflow.Context, *v1.SomeWorkflow1Request) error); ok { + if rf, ok := ret.Get(1).(func(internal.Context, *v1.SomeWorkflow1Request) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -60,15 +60,15 @@ type MockSimpleWorkflowFunctions_SomeWorkflow1_Call struct { } // SomeWorkflow1 is a helper method to define mock.On call -// - _a0 workflow.Context +// - _a0 internal.Context // - _a1 *v1.SomeWorkflow1Request func (_e *MockSimpleWorkflowFunctions_Expecter) SomeWorkflow1(_a0 interface{}, _a1 interface{}) *MockSimpleWorkflowFunctions_SomeWorkflow1_Call { return &MockSimpleWorkflowFunctions_SomeWorkflow1_Call{Call: _e.mock.On("SomeWorkflow1", _a0, _a1)} } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow1_Call) Run(run func(_a0 workflow.Context, _a1 *v1.SomeWorkflow1Request)) *MockSimpleWorkflowFunctions_SomeWorkflow1_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow1_Call) Run(run func(_a0 internal.Context, _a1 *v1.SomeWorkflow1Request)) *MockSimpleWorkflowFunctions_SomeWorkflow1_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workflow.Context), args[1].(*v1.SomeWorkflow1Request)) + run(args[0].(internal.Context), args[1].(*v1.SomeWorkflow1Request)) }) return _c } @@ -78,13 +78,13 @@ func (_c *MockSimpleWorkflowFunctions_SomeWorkflow1_Call) Return(_a0 *v1.SomeWor return _c } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow1_Call) RunAndReturn(run func(workflow.Context, *v1.SomeWorkflow1Request) (*v1.SomeWorkflow1Response, error)) *MockSimpleWorkflowFunctions_SomeWorkflow1_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow1_Call) RunAndReturn(run func(internal.Context, *v1.SomeWorkflow1Request) (*v1.SomeWorkflow1Response, error)) *MockSimpleWorkflowFunctions_SomeWorkflow1_Call { _c.Call.Return(run) return _c } // SomeWorkflow2 provides a mock function with given fields: _a0 -func (_m *MockSimpleWorkflowFunctions) SomeWorkflow2(_a0 workflow.Context) error { +func (_m *MockSimpleWorkflowFunctions) SomeWorkflow2(_a0 internal.Context) error { ret := _m.Called(_a0) if len(ret) == 0 { @@ -92,7 +92,7 @@ func (_m *MockSimpleWorkflowFunctions) SomeWorkflow2(_a0 workflow.Context) error } var r0 error - if rf, ok := ret.Get(0).(func(workflow.Context) error); ok { + if rf, ok := ret.Get(0).(func(internal.Context) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) @@ -107,14 +107,14 @@ type MockSimpleWorkflowFunctions_SomeWorkflow2_Call struct { } // SomeWorkflow2 is a helper method to define mock.On call -// - _a0 workflow.Context +// - _a0 internal.Context func (_e *MockSimpleWorkflowFunctions_Expecter) SomeWorkflow2(_a0 interface{}) *MockSimpleWorkflowFunctions_SomeWorkflow2_Call { return &MockSimpleWorkflowFunctions_SomeWorkflow2_Call{Call: _e.mock.On("SomeWorkflow2", _a0)} } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow2_Call) Run(run func(_a0 workflow.Context)) *MockSimpleWorkflowFunctions_SomeWorkflow2_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow2_Call) Run(run func(_a0 internal.Context)) *MockSimpleWorkflowFunctions_SomeWorkflow2_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workflow.Context)) + run(args[0].(internal.Context)) }) return _c } @@ -124,13 +124,13 @@ func (_c *MockSimpleWorkflowFunctions_SomeWorkflow2_Call) Return(_a0 error) *Moc return _c } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow2_Call) RunAndReturn(run func(workflow.Context) error) *MockSimpleWorkflowFunctions_SomeWorkflow2_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow2_Call) RunAndReturn(run func(internal.Context) error) *MockSimpleWorkflowFunctions_SomeWorkflow2_Call { _c.Call.Return(run) return _c } // SomeWorkflow3 provides a mock function with given fields: _a0, _a1 -func (_m *MockSimpleWorkflowFunctions) SomeWorkflow3(_a0 workflow.Context, _a1 *v1.SomeWorkflow3Request) error { +func (_m *MockSimpleWorkflowFunctions) SomeWorkflow3(_a0 internal.Context, _a1 *v1.SomeWorkflow3Request) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -138,7 +138,7 @@ func (_m *MockSimpleWorkflowFunctions) SomeWorkflow3(_a0 workflow.Context, _a1 * } var r0 error - if rf, ok := ret.Get(0).(func(workflow.Context, *v1.SomeWorkflow3Request) error); ok { + if rf, ok := ret.Get(0).(func(internal.Context, *v1.SomeWorkflow3Request) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -153,15 +153,15 @@ type MockSimpleWorkflowFunctions_SomeWorkflow3_Call struct { } // SomeWorkflow3 is a helper method to define mock.On call -// - _a0 workflow.Context +// - _a0 internal.Context // - _a1 *v1.SomeWorkflow3Request func (_e *MockSimpleWorkflowFunctions_Expecter) SomeWorkflow3(_a0 interface{}, _a1 interface{}) *MockSimpleWorkflowFunctions_SomeWorkflow3_Call { return &MockSimpleWorkflowFunctions_SomeWorkflow3_Call{Call: _e.mock.On("SomeWorkflow3", _a0, _a1)} } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow3_Call) Run(run func(_a0 workflow.Context, _a1 *v1.SomeWorkflow3Request)) *MockSimpleWorkflowFunctions_SomeWorkflow3_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow3_Call) Run(run func(_a0 internal.Context, _a1 *v1.SomeWorkflow3Request)) *MockSimpleWorkflowFunctions_SomeWorkflow3_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workflow.Context), args[1].(*v1.SomeWorkflow3Request)) + run(args[0].(internal.Context), args[1].(*v1.SomeWorkflow3Request)) }) return _c } @@ -171,13 +171,13 @@ func (_c *MockSimpleWorkflowFunctions_SomeWorkflow3_Call) Return(_a0 error) *Moc return _c } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow3_Call) RunAndReturn(run func(workflow.Context, *v1.SomeWorkflow3Request) error) *MockSimpleWorkflowFunctions_SomeWorkflow3_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow3_Call) RunAndReturn(run func(internal.Context, *v1.SomeWorkflow3Request) error) *MockSimpleWorkflowFunctions_SomeWorkflow3_Call { _c.Call.Return(run) return _c } // SomeWorkflow4 provides a mock function with given fields: _a0, _a1 -func (_m *MockSimpleWorkflowFunctions) SomeWorkflow4(_a0 workflow.Context, _a1 *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error) { +func (_m *MockSimpleWorkflowFunctions) SomeWorkflow4(_a0 internal.Context, _a1 *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -186,10 +186,10 @@ func (_m *MockSimpleWorkflowFunctions) SomeWorkflow4(_a0 workflow.Context, _a1 * var r0 *commonv1.PaginatedResponse var r1 error - if rf, ok := ret.Get(0).(func(workflow.Context, *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error)); ok { + if rf, ok := ret.Get(0).(func(internal.Context, *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(workflow.Context, *commonv1.PaginatedRequest) *commonv1.PaginatedResponse); ok { + if rf, ok := ret.Get(0).(func(internal.Context, *commonv1.PaginatedRequest) *commonv1.PaginatedResponse); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -197,7 +197,7 @@ func (_m *MockSimpleWorkflowFunctions) SomeWorkflow4(_a0 workflow.Context, _a1 * } } - if rf, ok := ret.Get(1).(func(workflow.Context, *commonv1.PaginatedRequest) error); ok { + if rf, ok := ret.Get(1).(func(internal.Context, *commonv1.PaginatedRequest) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -212,15 +212,15 @@ type MockSimpleWorkflowFunctions_SomeWorkflow4_Call struct { } // SomeWorkflow4 is a helper method to define mock.On call -// - _a0 workflow.Context +// - _a0 internal.Context // - _a1 *commonv1.PaginatedRequest func (_e *MockSimpleWorkflowFunctions_Expecter) SomeWorkflow4(_a0 interface{}, _a1 interface{}) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call { return &MockSimpleWorkflowFunctions_SomeWorkflow4_Call{Call: _e.mock.On("SomeWorkflow4", _a0, _a1)} } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) Run(run func(_a0 workflow.Context, _a1 *commonv1.PaginatedRequest)) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) Run(run func(_a0 internal.Context, _a1 *commonv1.PaginatedRequest)) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workflow.Context), args[1].(*commonv1.PaginatedRequest)) + run(args[0].(internal.Context), args[1].(*commonv1.PaginatedRequest)) }) return _c } @@ -230,7 +230,7 @@ func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) Return(_a0 *commonv1.P return _c } -func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) RunAndReturn(run func(workflow.Context, *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error)) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call { +func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) RunAndReturn(run func(internal.Context, *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error)) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call { _c.Call.Return(run) return _c } diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go index 7f4b387..c7e6f71 100644 --- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go +++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package xnserrv1mocks diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go index a9b484f..d686d60 100644 --- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go +++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go @@ -1,13 +1,12 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package xnserrv1mocks import ( context "context" - client "go.temporal.io/sdk/client" - mock "github.com/stretchr/testify/mock" + internal "go.temporal.io/sdk/client" ) // MockSleepRun is an autogenerated mock type for the SleepRun type @@ -161,19 +160,19 @@ func (_c *MockSleepRun_ID_Call) RunAndReturn(run func() string) *MockSleepRun_ID } // Run provides a mock function with given fields: -func (_m *MockSleepRun) Run() client.WorkflowRun { +func (_m *MockSleepRun) Run() internal.WorkflowRun { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Run") } - var r0 client.WorkflowRun - if rf, ok := ret.Get(0).(func() client.WorkflowRun); ok { + var r0 internal.WorkflowRun + if rf, ok := ret.Get(0).(func() internal.WorkflowRun); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(client.WorkflowRun) + r0 = ret.Get(0).(internal.WorkflowRun) } } @@ -197,12 +196,12 @@ func (_c *MockSleepRun_Run_Call) Run(run func()) *MockSleepRun_Run_Call { return _c } -func (_c *MockSleepRun_Run_Call) Return(_a0 client.WorkflowRun) *MockSleepRun_Run_Call { +func (_c *MockSleepRun_Run_Call) Return(_a0 internal.WorkflowRun) *MockSleepRun_Run_Call { _c.Call.Return(_a0) return _c } -func (_c *MockSleepRun_Run_Call) RunAndReturn(run func() client.WorkflowRun) *MockSleepRun_Run_Call { +func (_c *MockSleepRun_Run_Call) RunAndReturn(run func() internal.WorkflowRun) *MockSleepRun_Run_Call { _c.Call.Return(run) return _c } diff --git a/mocks/go.temporal.io/sdk/client/mock_Client.go b/mocks/go.temporal.io/sdk/client/mock_Client.go index 7b82d7c..350bfef 100644 --- a/mocks/go.temporal.io/sdk/client/mock_Client.go +++ b/mocks/go.temporal.io/sdk/client/mock_Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package client diff --git a/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go b/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go index e6e9cf5..4233d3e 100644 --- a/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go +++ b/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.49.1. DO NOT EDIT. package clientutils