Skip to content

Commit

Permalink
revert: "feat: support external types with type widening (#2010)" (#2031
Browse files Browse the repository at this point in the history
)

This reverts commit 2e07ee4.

due to #2030
  • Loading branch information
matt2e authored Jul 10, 2024
1 parent a8bc627 commit 5cc0f7a
Show file tree
Hide file tree
Showing 60 changed files with 819 additions and 1,469 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ testdata/**/go.work.sum
# Leaving old _ftl for now to avoid old stuff getting checked in
**/testdata/**/_ftl
**/examples/**/_ftl
**/types.ftl.go
**/examples/**/types.ftl.go
**/testdata/**/.ftl
**/examples/**/.ftl
/.ftl
Expand Down
51 changes: 26 additions & 25 deletions backend/controller/dal/testdata/go/fsm/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions backend/controller/ingress/ingress_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ func TestHttpIngress(t *testing.T) {
assert.Equal(t, nil, resp.Headers["Access-Control-Allow-Methods"])
assert.Equal(t, nil, resp.Headers["Access-Control-Allow-Headers"])
}),
in.HttpCall(http.MethodGet, "/external", nil, in.JsonData(t, in.Obj{"message": "hello"}), func(t testing.TB, resp *in.HTTPResponse) {
assert.Equal(t, 200, resp.Status)
assert.Equal(t, []string{"application/json; charset=utf-8"}, resp.Headers["Content-Type"])
assert.Equal(t, in.JsonData(t, in.Obj{"message": "hello"}), resp.BodyBytes)
}),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"ftl/builtin"

lib "github.com/TBD54566975/ftl/go-runtime/compile/testdata"
"github.com/TBD54566975/ftl/go-runtime/ftl" // Import the FTL SDK.
)

Expand Down Expand Up @@ -179,10 +178,3 @@ func ArrayData(ctx context.Context, req builtin.HttpRequest[[]ArrayType]) (built
func TypeEnum(ctx context.Context, req builtin.HttpRequest[SumType]) (builtin.HttpResponse[SumType, string], error) {
return builtin.HttpResponse[SumType, string]{Body: ftl.Some(req.Body)}, nil
}

type ExternalAlias lib.NonFTLType

//ftl:ingress http GET /external
func External(ctx context.Context, req builtin.HttpRequest[ExternalAlias]) (builtin.HttpResponse[ExternalAlias, string], error) {
return builtin.HttpResponse[ExternalAlias, string]{Body: ftl.Some(req.Body)}, nil
}
51 changes: 26 additions & 25 deletions backend/controller/leases/testdata/go/leases/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5cc0f7a

Please sign in to comment.