feat: inject topics/subscriptions in go #9107
Annotations
3 errors and 1 warning
Test:
go-runtime/compile/stubs_test.go#L216
=== RUN TestGenerateGoStubs
debug: go: found github.com/TBD54566975/ftl/go-runtime/ftl in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug: go: downloading github.com/stretchr/testify v1.9.0
debug: go: downloading github.com/bool64/dev v0.2.35
debug: go: downloading github.com/swaggest/assertjson v1.9.0
debug: go: downloading github.com/yudai/gojsondiff v1.0.0
debug: go: downloading github.com/pmezard/go-difflib v1.0.0
debug: go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
debug: go: downloading github.com/stretchr/objx v0.5.2
debug: go: downloading github.com/sergi/go-diff v1.3.1
debug: go: downloading github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82
debug: go: downloading github.com/bool64/shared v0.1.5
debug: go: downloading github.com/iancoleman/orderedmap v0.3.0
debug: go: found github.com/TBD54566975/ftl/go-runtime/ftl in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug: go: found github.com/TBD54566975/ftl/go-runtime/ftl/reflection in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
go-runtime/compile/stubs_test.go:216: Expected values to be equal:
import (
"context"
+ "github.com/TBD54566975/ftl/go-runtime/ftl"
"github.com/TBD54566975/ftl/go-runtime/ftl/reflection"
)
@@ -52,7 +53,7 @@
}
//ftl:verb
-type EchoClient func(context.Context, EchoRequest) (EchoResponse, error)
+type EchoClient = ftl.Verb[EchoRequest, EchoResponse]
type SinkReq struct {
}
@@ -62,16 +63,16 @@
// Here is another line for this comment!
//
//ftl:verb
-type SinkClient func(context.Context, SinkReq)
+type SinkClient = ftl.Sink[SinkReq]
type SourceResp struct {
}
//ftl:verb
-type SourceClient func(context.Context) (SourceResp, error)
+type SourceClient = ftl.Source[SourceResp]
//ftl:verb
-type NothingClient func(context.Context) error
+type NothingClient = ftl.Empty
func init() {
reflection.Register(
--- FAIL: TestGenerateGoStubs (1.05s)
|
Test:
go-runtime/compile/stubs_test.go#L287
=== RUN TestMetadataImportsExcluded
debug: go: found github.com/TBD54566975/ftl/go-runtime/ftl in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug: go: found github.com/TBD54566975/ftl/go-runtime/ftl in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
go-runtime/compile/stubs_test.go:287: Expected values to be equal:
import (
"context"
+ "github.com/TBD54566975/ftl/go-runtime/ftl"
)
var _ = context.Background
@@ -19,5 +20,5 @@
// This is a verb.
//
//ftl:verb
-type CallClient func(context.Context, Req) (Resp, error)
+type CallClient = ftl.Verb[Req, Resp]
--- FAIL: TestMetadataImportsExcluded (0.43s)
|
Test
Process completed with exit code 1.
|
Build Cache
Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
|
Loading