diff --git a/.go-arch-lint.yml b/.go-arch-lint.yml index a9382be6e7..7261656747 100644 --- a/.go-arch-lint.yml +++ b/.go-arch-lint.yml @@ -8,7 +8,7 @@ components: internal: { in: internal/** } dal: { in: backend/dal/** } protos: { in: backend/protos/** } - schema: { in: backend/schema/** } + schema: { in: internal/schema/** } ftl: { in: . } ftl-cmd: { in: frontend/cli/ftl/** } go-runtime: { in: go-runtime/** } diff --git a/Justfile b/Justfile index 9d15747e12..061889d7f8 100644 --- a/Justfile +++ b/Justfile @@ -47,7 +47,7 @@ generate-kube-migrations: # Run "go generate" on all packages build-generate: - @mk backend/schema/aliaskind_enumer.go : backend/schema/metadataalias.go -- go generate -x ./backend/schema + @mk internal/schema/aliaskind_enumer.go : internal/schema/metadataalias.go -- go generate -x ./internal/schema @mk internal/log/log_level_string.go : internal/log/api.go -- go generate -x ./internal/log # Build command-line tools @@ -129,7 +129,7 @@ pnpm-install: # Regenerate protos build-protos: pnpm-install - @mk {{SCHEMA_OUT}} : backend/schema -- "ftl-schema > {{SCHEMA_OUT}} && buf format -w && buf lint" + @mk {{SCHEMA_OUT}} : internal/schema -- "ftl-schema > {{SCHEMA_OUT}} && buf format -w && buf lint" @mk {{PROTOS_OUT}} : {{PROTOS_IN}} -- "cd backend/protos && buf generate" # Unconditionally rebuild protos diff --git a/backend/controller/admin/admin.go b/backend/controller/admin/admin.go index 021e865f9d..2ab3e23184 100644 --- a/backend/controller/admin/admin.go +++ b/backend/controller/admin/admin.go @@ -9,12 +9,12 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/encoding" "github.com/TBD54566975/ftl/internal/configuration" "github.com/TBD54566975/ftl/internal/configuration/manager" "github.com/TBD54566975/ftl/internal/configuration/providers" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" ) type AdminService struct { diff --git a/backend/controller/admin/admin_test.go b/backend/controller/admin/admin_test.go index 3f0c24df54..14856ac013 100644 --- a/backend/controller/admin/admin_test.go +++ b/backend/controller/admin/admin_test.go @@ -13,12 +13,12 @@ import ( "github.com/alecthomas/types/optional" ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/configuration" "github.com/TBD54566975/ftl/internal/configuration/manager" "github.com/TBD54566975/ftl/internal/configuration/providers" "github.com/TBD54566975/ftl/internal/configuration/routers" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" ) func TestAdminService(t *testing.T) { diff --git a/backend/controller/admin/local_client.go b/backend/controller/admin/local_client.go index d2d74868b7..8206f5b12d 100644 --- a/backend/controller/admin/local_client.go +++ b/backend/controller/admin/local_client.go @@ -7,11 +7,11 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/internal/buildengine" cf "github.com/TBD54566975/ftl/internal/configuration" "github.com/TBD54566975/ftl/internal/configuration/manager" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/watch" ) // localClient reads and writes to local projectconfig files without making any network @@ -40,7 +40,7 @@ func (s *diskSchemaRetriever) GetActiveSchema(ctx context.Context) (*schema.Sche if err != nil { return nil, fmt.Errorf("could not load project config: %w", err) } - modules, err := buildengine.DiscoverModules(ctx, projConfig.AbsModuleDirs()) + modules, err := watch.DiscoverModules(ctx, projConfig.AbsModuleDirs()) if err != nil { return nil, fmt.Errorf("could not discover modules: %w", err) } diff --git a/backend/controller/async/async.go b/backend/controller/async/async.go index f759097ad2..dfce2d3ced 100644 --- a/backend/controller/async/async.go +++ b/backend/controller/async/async.go @@ -6,8 +6,8 @@ import ( "github.com/alecthomas/participle/v2" "github.com/alecthomas/participle/v2/lexer" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) type asyncOriginParseRoot struct { diff --git a/backend/controller/console/console.go b/backend/controller/console/console.go index 53e2165731..ee64bd72d3 100644 --- a/backend/controller/console/console.go +++ b/backend/controller/console/console.go @@ -19,10 +19,10 @@ import ( pbconsole "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console/pbconsoleconnect" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/buildengine" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/controller/console/console_test.go b/backend/controller/console/console_test.go index 4485f3c982..48ec88445d 100644 --- a/backend/controller/console/console_test.go +++ b/backend/controller/console/console_test.go @@ -5,7 +5,7 @@ import ( "github.com/alecthomas/assert/v2" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) func TestVerbSchemaString(t *testing.T) { diff --git a/backend/controller/controller.go b/backend/controller/controller.go index ac05aabd7b..cc1498f7eb 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -54,7 +54,6 @@ import ( "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console/pbconsoleconnect" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" frontend "github.com/TBD54566975/ftl/frontend/console" cf "github.com/TBD54566975/ftl/internal/configuration/manager" "github.com/TBD54566975/ftl/internal/cors" @@ -66,6 +65,7 @@ import ( internalobservability "github.com/TBD54566975/ftl/internal/observability" "github.com/TBD54566975/ftl/internal/rpc" "github.com/TBD54566975/ftl/internal/rpc/headers" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/sha256" "github.com/TBD54566975/ftl/internal/slices" status "github.com/TBD54566975/ftl/internal/terminal" diff --git a/backend/controller/cronjobs/cronjobs.go b/backend/controller/cronjobs/cronjobs.go index 59a3efc1e2..f0bfde0e67 100644 --- a/backend/controller/cronjobs/cronjobs.go +++ b/backend/controller/cronjobs/cronjobs.go @@ -13,10 +13,10 @@ import ( encryptionsvc "github.com/TBD54566975/ftl/backend/controller/encryption" "github.com/TBD54566975/ftl/backend/controller/encryption/api" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/cron" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) type Service struct { diff --git a/backend/controller/cronjobs/cronjobs_test.go b/backend/controller/cronjobs/cronjobs_test.go index e1bdaad12d..2f0204303c 100644 --- a/backend/controller/cronjobs/cronjobs_test.go +++ b/backend/controller/cronjobs/cronjobs_test.go @@ -22,10 +22,10 @@ import ( "github.com/TBD54566975/ftl/backend/controller/scheduledtask" "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/cron" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) func TestNewCronJobsForModule(t *testing.T) { diff --git a/backend/controller/cronjobs/internal/dal/dal.go b/backend/controller/cronjobs/internal/dal/dal.go index d41f75a720..670ffe8d0c 100644 --- a/backend/controller/cronjobs/internal/dal/dal.go +++ b/backend/controller/cronjobs/internal/dal/dal.go @@ -10,8 +10,8 @@ import ( cronsql "github.com/TBD54566975/ftl/backend/controller/cronjobs/internal/sql" "github.com/TBD54566975/ftl/backend/controller/observability" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/controller/cronjobs/internal/sql/async_queries.sql.go b/backend/controller/cronjobs/internal/sql/async_queries.sql.go index e6002dd786..496db8ba4f 100644 --- a/backend/controller/cronjobs/internal/sql/async_queries.sql.go +++ b/backend/controller/cronjobs/internal/sql/async_queries.sql.go @@ -12,7 +12,7 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/cronjobs/internal/sql/models.go b/backend/controller/cronjobs/internal/sql/models.go index 7fc9ce050e..528d3e54d8 100644 --- a/backend/controller/cronjobs/internal/sql/models.go +++ b/backend/controller/cronjobs/internal/sql/models.go @@ -9,8 +9,8 @@ import ( "time" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/dal/async_calls.go b/backend/controller/dal/async_calls.go index 5fdb9cd794..68f8929a1b 100644 --- a/backend/controller/dal/async_calls.go +++ b/backend/controller/dal/async_calls.go @@ -16,7 +16,7 @@ import ( leasedal "github.com/TBD54566975/ftl/backend/controller/leases/dbleaser" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type AsyncCall struct { diff --git a/backend/controller/dal/async_calls_test.go b/backend/controller/dal/async_calls_test.go index d00a3ef910..37434089c1 100644 --- a/backend/controller/dal/async_calls_test.go +++ b/backend/controller/dal/async_calls_test.go @@ -14,9 +14,9 @@ import ( "github.com/TBD54566975/ftl/backend/controller/scheduledtask" "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) func TestNoCallToAcquire(t *testing.T) { diff --git a/backend/controller/dal/dal.go b/backend/controller/dal/dal.go index f0cd7ff317..a560fd302d 100644 --- a/backend/controller/dal/dal.go +++ b/backend/controller/dal/dal.go @@ -24,10 +24,10 @@ import ( "github.com/TBD54566975/ftl/backend/controller/pubsub" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/maps" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/sha256" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/controller/dal/dal_test.go b/backend/controller/dal/dal_test.go index 8cd24b9d52..f62aaa0f9f 100644 --- a/backend/controller/dal/dal_test.go +++ b/backend/controller/dal/dal_test.go @@ -19,9 +19,9 @@ import ( "github.com/TBD54566975/ftl/backend/controller/scheduledtask" "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/sha256" ) diff --git a/backend/controller/dal/fsm.go b/backend/controller/dal/fsm.go index 90ded2e705..5b700a2de7 100644 --- a/backend/controller/dal/fsm.go +++ b/backend/controller/dal/fsm.go @@ -16,7 +16,7 @@ import ( "github.com/TBD54566975/ftl/backend/controller/observability" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) // StartFSMTransition sends an event to an executing instance of an FSM. diff --git a/backend/controller/dal/fsm_test.go b/backend/controller/dal/fsm_test.go index f152200733..859f468365 100644 --- a/backend/controller/dal/fsm_test.go +++ b/backend/controller/dal/fsm_test.go @@ -17,9 +17,9 @@ import ( "github.com/TBD54566975/ftl/backend/controller/scheduledtask" "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) func TestSendFSMEvent(t *testing.T) { diff --git a/backend/controller/dal/internal/sql/async_queries.sql.go b/backend/controller/dal/internal/sql/async_queries.sql.go index e6002dd786..496db8ba4f 100644 --- a/backend/controller/dal/internal/sql/async_queries.sql.go +++ b/backend/controller/dal/internal/sql/async_queries.sql.go @@ -12,7 +12,7 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/dal/internal/sql/models.go b/backend/controller/dal/internal/sql/models.go index 8b2f1e3e6b..db23bc89f0 100644 --- a/backend/controller/dal/internal/sql/models.go +++ b/backend/controller/dal/internal/sql/models.go @@ -12,8 +12,8 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" "github.com/sqlc-dev/pqtype" ) diff --git a/backend/controller/dal/internal/sql/querier.go b/backend/controller/dal/internal/sql/querier.go index b295e277a3..923fa9caa9 100644 --- a/backend/controller/dal/internal/sql/querier.go +++ b/backend/controller/dal/internal/sql/querier.go @@ -10,8 +10,8 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/dal/internal/sql/queries.sql.go b/backend/controller/dal/internal/sql/queries.sql.go index 9ae6a2fffd..f981b4769e 100644 --- a/backend/controller/dal/internal/sql/queries.sql.go +++ b/backend/controller/dal/internal/sql/queries.sql.go @@ -13,8 +13,8 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/leases" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" "github.com/google/uuid" "github.com/lib/pq" diff --git a/backend/controller/dal/model/model.go b/backend/controller/dal/model/model.go index ce4c895b9f..b02b8ac09c 100644 --- a/backend/controller/dal/model/model.go +++ b/backend/controller/dal/model/model.go @@ -9,8 +9,8 @@ import ( "github.com/TBD54566975/ftl/backend/controller/dal/internal/sql" ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/sha256" ) diff --git a/backend/controller/ingress/handler.go b/backend/controller/ingress/handler.go index 4c1b03830b..93221b24ff 100644 --- a/backend/controller/ingress/handler.go +++ b/backend/controller/ingress/handler.go @@ -19,9 +19,9 @@ import ( "github.com/TBD54566975/ftl/backend/libdal" ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) // Handle HTTP ingress routes. diff --git a/backend/controller/ingress/handler_test.go b/backend/controller/ingress/handler_test.go index c65f701f9b..6dda3605df 100644 --- a/backend/controller/ingress/handler_test.go +++ b/backend/controller/ingress/handler_test.go @@ -19,10 +19,10 @@ import ( "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" "github.com/TBD54566975/ftl/backend/controller/timeline" ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/encoding" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) func TestIngress(t *testing.T) { diff --git a/backend/controller/ingress/ingress.go b/backend/controller/ingress/ingress.go index 837b3eff66..d1fe8388c1 100644 --- a/backend/controller/ingress/ingress.go +++ b/backend/controller/ingress/ingress.go @@ -8,7 +8,7 @@ import ( "github.com/TBD54566975/ftl/backend/controller/dal/model" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/controller/ingress/ingress_test.go b/backend/controller/ingress/ingress_test.go index e57921a144..8f9a7113e1 100644 --- a/backend/controller/ingress/ingress_test.go +++ b/backend/controller/ingress/ingress_test.go @@ -7,7 +7,7 @@ import ( "github.com/alecthomas/assert/v2" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type obj = map[string]any diff --git a/backend/controller/ingress/request.go b/backend/controller/ingress/request.go index 5452778891..883c66d47c 100644 --- a/backend/controller/ingress/request.go +++ b/backend/controller/ingress/request.go @@ -12,7 +12,7 @@ import ( "github.com/alecthomas/types/optional" "github.com/TBD54566975/ftl/backend/controller/dal/model" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/controller/ingress/request_test.go b/backend/controller/ingress/request_test.go index a26da0a257..764fa4df1c 100644 --- a/backend/controller/ingress/request_test.go +++ b/backend/controller/ingress/request_test.go @@ -11,9 +11,9 @@ import ( "github.com/alecthomas/assert/v2" "github.com/TBD54566975/ftl/backend/controller/dal/model" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/encoding" "github.com/TBD54566975/ftl/go-runtime/ftl" + "github.com/TBD54566975/ftl/internal/schema" ) type AliasRequest struct { diff --git a/backend/controller/ingress/response.go b/backend/controller/ingress/response.go index d4cce6a353..8a2c26babf 100644 --- a/backend/controller/ingress/response.go +++ b/backend/controller/ingress/response.go @@ -9,7 +9,7 @@ import ( "net/http" "strconv" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) // HTTPResponse mirrors builtins.HttpResponse. diff --git a/backend/controller/observability/async_calls.go b/backend/controller/observability/async_calls.go index e37e51fc73..00a0d6400d 100644 --- a/backend/controller/observability/async_calls.go +++ b/backend/controller/observability/async_calls.go @@ -13,8 +13,8 @@ import ( "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/propagation" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/observability" + "github.com/TBD54566975/ftl/internal/schema" ) const ( diff --git a/backend/controller/observability/calls.go b/backend/controller/observability/calls.go index 1e95594c7a..2e6dbb5479 100644 --- a/backend/controller/observability/calls.go +++ b/backend/controller/observability/calls.go @@ -13,8 +13,8 @@ import ( "go.opentelemetry.io/otel/trace" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/observability" + "github.com/TBD54566975/ftl/internal/schema" ) const ( diff --git a/backend/controller/observability/fsm.go b/backend/controller/observability/fsm.go index 632a452dad..5e4eaf3bd0 100644 --- a/backend/controller/observability/fsm.go +++ b/backend/controller/observability/fsm.go @@ -9,8 +9,8 @@ import ( "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/noop" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/observability" + "github.com/TBD54566975/ftl/internal/schema" ) const ( diff --git a/backend/controller/observability/ingress.go b/backend/controller/observability/ingress.go index 9ad6def394..87b01ed75a 100644 --- a/backend/controller/observability/ingress.go +++ b/backend/controller/observability/ingress.go @@ -12,8 +12,8 @@ import ( "go.opentelemetry.io/otel/metric/noop" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/observability" + "github.com/TBD54566975/ftl/internal/schema" ) const ( diff --git a/backend/controller/observability/pubsub.go b/backend/controller/observability/pubsub.go index 8fd86cc827..192853089a 100644 --- a/backend/controller/observability/pubsub.go +++ b/backend/controller/observability/pubsub.go @@ -10,9 +10,9 @@ import ( "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/noop" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" "github.com/TBD54566975/ftl/internal/observability" + "github.com/TBD54566975/ftl/internal/schema" ) // To learn more about how sinks and subscriptions work together, check out the diff --git a/backend/controller/pubsub/integration_test.go b/backend/controller/pubsub/integration_test.go index 176a5b477d..26fbe522a1 100644 --- a/backend/controller/pubsub/integration_test.go +++ b/backend/controller/pubsub/integration_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/TBD54566975/ftl/backend/controller/async" - "github.com/TBD54566975/ftl/backend/schema" in "github.com/TBD54566975/ftl/internal/integration" + "github.com/TBD54566975/ftl/internal/schema" ) func TestPubSub(t *testing.T) { diff --git a/backend/controller/pubsub/internal/dal/dal.go b/backend/controller/pubsub/internal/dal/dal.go index debe674af5..dc982a3aa7 100644 --- a/backend/controller/pubsub/internal/dal/dal.go +++ b/backend/controller/pubsub/internal/dal/dal.go @@ -15,10 +15,10 @@ import ( dalsql "github.com/TBD54566975/ftl/backend/controller/pubsub/internal/sql" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/controller/pubsub/internal/sql/async_queries.sql.go b/backend/controller/pubsub/internal/sql/async_queries.sql.go index e6002dd786..496db8ba4f 100644 --- a/backend/controller/pubsub/internal/sql/async_queries.sql.go +++ b/backend/controller/pubsub/internal/sql/async_queries.sql.go @@ -12,7 +12,7 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/pubsub/internal/sql/queries.sql.go b/backend/controller/pubsub/internal/sql/queries.sql.go index 1a9ef5dd1d..0f19bec87d 100644 --- a/backend/controller/pubsub/internal/sql/queries.sql.go +++ b/backend/controller/pubsub/internal/sql/queries.sql.go @@ -11,8 +11,8 @@ import ( "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/types/optional" "github.com/sqlc-dev/pqtype" ) diff --git a/backend/controller/pubsub/service.go b/backend/controller/pubsub/service.go index 3d47e8728f..85b08061da 100644 --- a/backend/controller/pubsub/service.go +++ b/backend/controller/pubsub/service.go @@ -13,9 +13,9 @@ import ( "github.com/TBD54566975/ftl/backend/controller/pubsub/internal/dal" "github.com/TBD54566975/ftl/backend/controller/scheduledtask" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) const ( diff --git a/backend/controller/sql/sqltypes/sqltypes.go b/backend/controller/sql/sqltypes/sqltypes.go index 03bfd6cda2..07b8fb5345 100644 --- a/backend/controller/sql/sqltypes/sqltypes.go +++ b/backend/controller/sql/sqltypes/sqltypes.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/proto" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type Duration time.Duration diff --git a/backend/controller/timeline/events_call.go b/backend/controller/timeline/events_call.go index 8b828e33f9..363ce746f4 100644 --- a/backend/controller/timeline/events_call.go +++ b/backend/controller/timeline/events_call.go @@ -14,8 +14,8 @@ import ( "github.com/TBD54566975/ftl/backend/controller/timeline/internal/sql" "github.com/TBD54566975/ftl/backend/libdal" ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) type CallEvent struct { diff --git a/backend/controller/timeline/events_ingress.go b/backend/controller/timeline/events_ingress.go index 4f8d476504..022c9535b4 100644 --- a/backend/controller/timeline/events_ingress.go +++ b/backend/controller/timeline/events_ingress.go @@ -13,8 +13,8 @@ import ( ftlencryption "github.com/TBD54566975/ftl/backend/controller/encryption/api" "github.com/TBD54566975/ftl/backend/controller/timeline/internal/sql" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) type IngressEvent struct { diff --git a/backend/controller/timeline/query.go b/backend/controller/timeline/query.go index f8f3f43f89..8c486797df 100644 --- a/backend/controller/timeline/query.go +++ b/backend/controller/timeline/query.go @@ -11,9 +11,9 @@ import ( "github.com/TBD54566975/ftl/backend/controller/timeline/internal/sql" "github.com/TBD54566975/ftl/backend/libdal" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) type eventFilterCall struct { diff --git a/backend/controller/timeline/timeline_test.go b/backend/controller/timeline/timeline_test.go index b58a9d346e..f64c458ffe 100644 --- a/backend/controller/timeline/timeline_test.go +++ b/backend/controller/timeline/timeline_test.go @@ -21,9 +21,9 @@ import ( "github.com/TBD54566975/ftl/backend/controller/pubsub" "github.com/TBD54566975/ftl/backend/controller/scheduledtask" "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/sha256" ) diff --git a/backend/protos/xyz/block/ftl/v1/language/mixins.go b/backend/protos/xyz/block/ftl/v1/language/mixins.go index ee68193f6f..0c177a15e3 100644 --- a/backend/protos/xyz/block/ftl/v1/language/mixins.go +++ b/backend/protos/xyz/block/ftl/v1/language/mixins.go @@ -4,8 +4,8 @@ import ( "fmt" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/builderrors" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go b/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go index 24a4b98def..43365b3caf 100644 --- a/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go +++ b/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go @@ -4,7 +4,7 @@ // protoc (unknown) // source: xyz/block/ftl/v1/schema/schema.proto -// This file is generated by github.com/TBD54566975/ftl/backend/schema/protobuf.go, DO NOT MODIFY +// This file is generated by github.com/TBD54566975/ftl/internal/schema/protobuf.go, DO NOT MODIFY package schemapb diff --git a/backend/protos/xyz/block/ftl/v1/schema/schema.proto b/backend/protos/xyz/block/ftl/v1/schema/schema.proto index a3b30c1dd1..fb7ad24238 100644 --- a/backend/protos/xyz/block/ftl/v1/schema/schema.proto +++ b/backend/protos/xyz/block/ftl/v1/schema/schema.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -// This file is generated by github.com/TBD54566975/ftl/backend/schema/protobuf.go, DO NOT MODIFY +// This file is generated by github.com/TBD54566975/ftl/internal/schema/protobuf.go, DO NOT MODIFY package xyz.block.ftl.v1.schema; import "xyz/block/ftl/v1/schema/runtime.proto"; diff --git a/backend/provisioner/deployment/provisioner.go b/backend/provisioner/deployment/provisioner.go index 3b89ad4304..0c67155abd 100644 --- a/backend/provisioner/deployment/provisioner.go +++ b/backend/provisioner/deployment/provisioner.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1beta1/provisioner" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) // ResourceType is a type of resource used to configure provisioners diff --git a/backend/provisioner/service.go b/backend/provisioner/service.go index 4e140d59d1..ffdb546f4f 100644 --- a/backend/provisioner/service.go +++ b/backend/provisioner/service.go @@ -18,9 +18,9 @@ import ( "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1beta1/provisioner" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1beta1/provisioner/provisionerconnect" "github.com/TBD54566975/ftl/backend/provisioner/deployment" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" ) // CommonProvisionerConfig is shared config between the production controller and development server. diff --git a/backend/runner/runner.go b/backend/runner/runner.go index 7688ecde93..8f4517acdc 100644 --- a/backend/runner/runner.go +++ b/backend/runner/runner.go @@ -30,13 +30,13 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" "github.com/TBD54566975/ftl/backend/runner/observability" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/common/plugin" "github.com/TBD54566975/ftl/internal/download" "github.com/TBD54566975/ftl/internal/identity" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" "github.com/TBD54566975/ftl/internal/unstoppable" ) diff --git a/cmd/ftl-schema/main.go b/cmd/ftl-schema/main.go index 5547aaf1ae..845833bea2 100644 --- a/cmd/ftl-schema/main.go +++ b/cmd/ftl-schema/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) func main() { diff --git a/frontend/cli/cmd_box_run.go b/frontend/cli/cmd_box_run.go index d3bda1e43c..95b52cc327 100644 --- a/frontend/cli/cmd_box_run.go +++ b/frontend/cli/cmd_box_run.go @@ -14,13 +14,13 @@ import ( "github.com/TBD54566975/ftl/backend/controller/scaling/localscaling" "github.com/TBD54566975/ftl/backend/controller/sql/databasetesting" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/bind" "github.com/TBD54566975/ftl/internal/buildengine" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" "github.com/TBD54566975/ftl/internal/projectconfig" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" ) type boxRunCmd struct { diff --git a/frontend/cli/cmd_call.go b/frontend/cli/cmd_call.go index faf8e9bb4e..ec82c9ff00 100644 --- a/frontend/cli/cmd_call.go +++ b/frontend/cli/cmd_call.go @@ -15,10 +15,10 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" status "github.com/TBD54566975/ftl/internal/terminal" ) diff --git a/frontend/cli/cmd_new.go b/frontend/cli/cmd_new.go index c173184c49..677048c9b0 100644 --- a/frontend/cli/cmd_new.go +++ b/frontend/cli/cmd_new.go @@ -12,12 +12,12 @@ import ( "github.com/alecthomas/kong" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal" "github.com/TBD54566975/ftl/internal/buildengine" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/frontend/cli/cmd_replay.go b/frontend/cli/cmd_replay.go index aa471ecf35..ad4713c77d 100644 --- a/frontend/cli/cmd_replay.go +++ b/frontend/cli/cmd_replay.go @@ -13,10 +13,10 @@ import ( pbconsole "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console/pbconsoleconnect" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" status "github.com/TBD54566975/ftl/internal/terminal" ) diff --git a/frontend/cli/cmd_schema_diff.go b/frontend/cli/cmd_schema_diff.go index 9c684dc50b..028763b3ab 100644 --- a/frontend/cli/cmd_schema_diff.go +++ b/frontend/cli/cmd_schema_diff.go @@ -17,11 +17,11 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/internal/buildengine" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/projectconfig" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/watch" ) type schemaDiffCmd struct { @@ -88,7 +88,7 @@ func localSchema(ctx context.Context, projectConfig projectconfig.Config) (*sche pb := &schema.Schema{} found := false tried := "" - modules, err := buildengine.DiscoverModules(ctx, projectConfig.AbsModuleDirs()) + modules, err := watch.DiscoverModules(ctx, projectConfig.AbsModuleDirs()) if err != nil { return nil, fmt.Errorf("failed to discover modules %w", err) } diff --git a/frontend/cli/cmd_schema_generate.go b/frontend/cli/cmd_schema_generate.go index 4c7059aadf..bd0fc1fd27 100644 --- a/frontend/cli/cmd_schema_generate.go +++ b/frontend/cli/cmd_schema_generate.go @@ -17,8 +17,8 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/frontend/cli/cmd_schema_get.go b/frontend/cli/cmd_schema_get.go index 81951fb498..aab0355908 100644 --- a/frontend/cli/cmd_schema_get.go +++ b/frontend/cli/cmd_schema_get.go @@ -14,7 +14,7 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type getSchemaCmd struct { diff --git a/frontend/cli/cmd_schema_protobuf.go b/frontend/cli/cmd_schema_protobuf.go index 41d6d1b897..df97caaec1 100644 --- a/frontend/cli/cmd_schema_protobuf.go +++ b/frontend/cli/cmd_schema_protobuf.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type schemaProtobufCmd struct{} diff --git a/frontend/console/src/features/modules/schema/schema.utils.ts b/frontend/console/src/features/modules/schema/schema.utils.ts index 343efa2bd5..366937bc40 100644 --- a/frontend/console/src/features/modules/schema/schema.utils.ts +++ b/frontend/console/src/features/modules/schema/schema.utils.ts @@ -50,7 +50,7 @@ export const declTypeMultiselectOpts = [ }, ] -// Keep these in sync with backend/schema/module.go#L86-L95 +// Keep these in sync with internal/schema/module.go#L86-L95 const skipNewLineDeclTypes = ['config', 'secret', 'database', 'topic', 'subscription', 'typealias'] const skipGapAfterTypes: { [key: string]: string[] } = { secret: ['config'], diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts b/frontend/console/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts index 3dcfd47978..dcdf5eaa50 100644 --- a/frontend/console/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts +++ b/frontend/console/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -// This file is generated by github.com/TBD54566975/ftl/backend/schema/protobuf.go, DO NOT MODIFY +// This file is generated by github.com/TBD54566975/ftl/internal/schema/protobuf.go, DO NOT MODIFY import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; diff --git a/go-runtime/compile/build.go b/go-runtime/compile/build.go index d57031c113..fcf8e67250 100644 --- a/go-runtime/compile/build.go +++ b/go-runtime/compile/build.go @@ -26,7 +26,6 @@ import ( "github.com/TBD54566975/ftl" languagepb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/language" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" extract "github.com/TBD54566975/ftl/go-runtime/schema" "github.com/TBD54566975/ftl/internal" "github.com/TBD54566975/ftl/internal/builderrors" @@ -35,6 +34,7 @@ import ( "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/projectconfig" "github.com/TBD54566975/ftl/internal/reflect" + "github.com/TBD54566975/ftl/internal/schema" ) type MainWorkContext struct { diff --git a/go-runtime/compile/build_test.go b/go-runtime/compile/build_test.go index f824504cb8..dd77b26150 100644 --- a/go-runtime/compile/build_test.go +++ b/go-runtime/compile/build_test.go @@ -3,7 +3,7 @@ package compile import ( "testing" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/assert/v2" ) diff --git a/go-runtime/encoding/encoding.go b/go-runtime/encoding/encoding.go index 32076e350f..ac43b66c47 100644 --- a/go-runtime/encoding/encoding.go +++ b/go-runtime/encoding/encoding.go @@ -12,8 +12,8 @@ import ( "strings" "time" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) var ( diff --git a/go-runtime/ftl/ftltest/fake.go b/go-runtime/ftl/ftltest/fake.go index 6d4bbf9227..295ff12325 100644 --- a/go-runtime/ftl/ftltest/fake.go +++ b/go-runtime/ftl/ftltest/fake.go @@ -9,10 +9,10 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/ftl" "github.com/TBD54566975/ftl/go-runtime/internal" "github.com/TBD54566975/ftl/internal/configuration" + "github.com/TBD54566975/ftl/internal/schema" ) // pubSubEvent is a sum type for all events that can be published to the pubsub system. diff --git a/go-runtime/ftl/ftltest/ftltest.go b/go-runtime/ftl/ftltest/ftltest.go index 8d0b88e9aa..748890830d 100644 --- a/go-runtime/ftl/ftltest/ftltest.go +++ b/go-runtime/ftl/ftltest/ftltest.go @@ -14,7 +14,6 @@ import ( _ "github.com/jackc/pgx/v5/stdlib" // SQL driver - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/ftl" "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" "github.com/TBD54566975/ftl/go-runtime/internal" @@ -23,6 +22,7 @@ import ( "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/modulecontext" pc "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" mcu "github.com/TBD54566975/ftl/internal/testutils/modulecontext" ) diff --git a/go-runtime/ftl/ftltest/pubsub.go b/go-runtime/ftl/ftltest/pubsub.go index 3f306747b9..46b8da0633 100644 --- a/go-runtime/ftl/ftltest/pubsub.go +++ b/go-runtime/ftl/ftltest/pubsub.go @@ -11,9 +11,9 @@ import ( "github.com/alecthomas/types/optional" "github.com/alecthomas/types/pubsub" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/ftl" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/go-runtime/ftl/pubsub.go b/go-runtime/ftl/pubsub.go index eab1f8e2a4..dc6c91b630 100644 --- a/go-runtime/ftl/pubsub.go +++ b/go-runtime/ftl/pubsub.go @@ -3,9 +3,9 @@ package ftl import ( "context" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" "github.com/TBD54566975/ftl/go-runtime/internal" + "github.com/TBD54566975/ftl/internal/schema" ) // Topic declares a topic diff --git a/go-runtime/ftl/reflection/reflection.go b/go-runtime/ftl/reflection/reflection.go index 0c465b3749..7c4bb81433 100644 --- a/go-runtime/ftl/reflection/reflection.go +++ b/go-runtime/ftl/reflection/reflection.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Module returns the FTL module currently being executed. diff --git a/go-runtime/ftl/reflection/reflection_test.go b/go-runtime/ftl/reflection/reflection_test.go index 08c318bd4c..96a59ce516 100644 --- a/go-runtime/ftl/reflection/reflection_test.go +++ b/go-runtime/ftl/reflection/reflection_test.go @@ -6,7 +6,7 @@ import ( "github.com/alecthomas/assert/v2" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type MySumType interface{ sealed() } diff --git a/go-runtime/ftl/reflection/type_registry.go b/go-runtime/ftl/reflection/type_registry.go index 5f4d6eeab5..f74708c6c8 100644 --- a/go-runtime/ftl/reflection/type_registry.go +++ b/go-runtime/ftl/reflection/type_registry.go @@ -5,7 +5,7 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) // TypeRegistry is used for dynamic type resolution at runtime. It stores associations between sum type discriminators diff --git a/go-runtime/ftl/reflection/types.go b/go-runtime/ftl/reflection/types.go index 6b734dd22f..dc352d8848 100644 --- a/go-runtime/ftl/reflection/types.go +++ b/go-runtime/ftl/reflection/types.go @@ -5,7 +5,7 @@ import ( "strings" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) // Ref is an untyped reference to a symbol. diff --git a/go-runtime/internal/api.go b/go-runtime/internal/api.go index c881cd46e9..1da79a9cbd 100644 --- a/go-runtime/internal/api.go +++ b/go-runtime/internal/api.go @@ -3,7 +3,7 @@ package internal import ( "context" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type MetadataKey string diff --git a/go-runtime/internal/impl.go b/go-runtime/internal/impl.go index 58ead90c88..b26eb8c43c 100644 --- a/go-runtime/internal/impl.go +++ b/go-runtime/internal/impl.go @@ -13,11 +13,11 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/encoding" "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" "github.com/TBD54566975/ftl/internal/modulecontext" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" ) type mapCacheEntry struct { diff --git a/go-runtime/schema/common/common.go b/go-runtime/schema/common/common.go index 4207399057..f81b3bef45 100644 --- a/go-runtime/schema/common/common.go +++ b/go-runtime/schema/common/common.go @@ -15,8 +15,8 @@ import ( "github.com/alecthomas/types/optional" "github.com/puzpuzpuz/xsync/v3" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) var ( diff --git a/go-runtime/schema/common/directive.go b/go-runtime/schema/common/directive.go index fe78b583c3..d14584a75b 100644 --- a/go-runtime/schema/common/directive.go +++ b/go-runtime/schema/common/directive.go @@ -12,8 +12,8 @@ import ( "github.com/alecthomas/participle/v2" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/cron" + "github.com/TBD54566975/ftl/internal/schema" ) // This file contains a parser for Go FTL directives. diff --git a/go-runtime/schema/common/fact.go b/go-runtime/schema/common/fact.go index 40d0eaff25..ed8dd23398 100644 --- a/go-runtime/schema/common/fact.go +++ b/go-runtime/schema/common/fact.go @@ -7,7 +7,7 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) // SchemaFact is a fact that associates a schema node with a Go object. diff --git a/go-runtime/schema/configsecret/analyzer.go b/go-runtime/schema/configsecret/analyzer.go index 744cb2c698..1aee026dbf 100644 --- a/go-runtime/schema/configsecret/analyzer.go +++ b/go-runtime/schema/configsecret/analyzer.go @@ -9,8 +9,8 @@ import ( "github.com/TBD54566975/golang-tools/go/ast/inspector" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" ) const ( diff --git a/go-runtime/schema/data/analyzer.go b/go-runtime/schema/data/analyzer.go index b1df2c6010..fb128ba0f7 100644 --- a/go-runtime/schema/data/analyzer.go +++ b/go-runtime/schema/data/analyzer.go @@ -12,9 +12,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) var ( diff --git a/go-runtime/schema/database/analyzer.go b/go-runtime/schema/database/analyzer.go index 80d9bbf361..8ce7ed7011 100644 --- a/go-runtime/schema/database/analyzer.go +++ b/go-runtime/schema/database/analyzer.go @@ -7,8 +7,8 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" ) const ftlPostgresDBFuncPath = "github.com/TBD54566975/ftl/go-runtime/ftl.PostgresDatabase" diff --git a/go-runtime/schema/enum/analyzer.go b/go-runtime/schema/enum/analyzer.go index bebdf71a00..1af83afc16 100644 --- a/go-runtime/schema/enum/analyzer.go +++ b/go-runtime/schema/enum/analyzer.go @@ -9,9 +9,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Extractor extracts enums to the module schema. diff --git a/go-runtime/schema/extract.go b/go-runtime/schema/extract.go index f7754126b3..afff73b6ca 100644 --- a/go-runtime/schema/extract.go +++ b/go-runtime/schema/extract.go @@ -14,8 +14,6 @@ import ( sets "github.com/deckarep/golang-set/v2" "golang.org/x/exp/maps" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/call" "github.com/TBD54566975/ftl/go-runtime/schema/common" "github.com/TBD54566975/ftl/go-runtime/schema/configsecret" @@ -35,6 +33,8 @@ import ( "github.com/TBD54566975/ftl/go-runtime/schema/valueenumvariant" "github.com/TBD54566975/ftl/go-runtime/schema/verb" "github.com/TBD54566975/ftl/internal/builderrors" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Extractors contains all schema extractors that will run. diff --git a/go-runtime/schema/finalize/analyzer.go b/go-runtime/schema/finalize/analyzer.go index ea0e9a7fc2..c97ab40f99 100644 --- a/go-runtime/schema/finalize/analyzer.go +++ b/go-runtime/schema/finalize/analyzer.go @@ -10,9 +10,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis/passes/inspect" "github.com/TBD54566975/golang-tools/go/ast/inspector" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Analyzer aggregates the results of all extractors. diff --git a/go-runtime/schema/fsm/analyzer.go b/go-runtime/schema/fsm/analyzer.go index f754a8a736..e626e566b0 100644 --- a/go-runtime/schema/fsm/analyzer.go +++ b/go-runtime/schema/fsm/analyzer.go @@ -7,9 +7,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) const ( diff --git a/go-runtime/schema/metadata/analyzer.go b/go-runtime/schema/metadata/analyzer.go index 8bba01df15..b2ca585c87 100644 --- a/go-runtime/schema/metadata/analyzer.go +++ b/go-runtime/schema/metadata/analyzer.go @@ -11,8 +11,8 @@ import ( "github.com/alecthomas/types/optional" sets "github.com/deckarep/golang-set/v2" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" ) // Extractor extracts metadata to the module schema. diff --git a/go-runtime/schema/schema_fuzz_test.go b/go-runtime/schema/schema_fuzz_test.go index 9f1cf007e6..8f2a1fcc02 100644 --- a/go-runtime/schema/schema_fuzz_test.go +++ b/go-runtime/schema/schema_fuzz_test.go @@ -12,10 +12,10 @@ import ( "github.com/otiai10/copy" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal" "github.com/TBD54566975/ftl/internal/exec" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" "github.com/alecthomas/assert/v2" ) diff --git a/go-runtime/schema/schema_test.go b/go-runtime/schema/schema_test.go index effaedfbc5..0bf565dfdd 100644 --- a/go-runtime/schema/schema_test.go +++ b/go-runtime/schema/schema_test.go @@ -13,11 +13,11 @@ import ( "github.com/TBD54566975/ftl/go-runtime/schema/common" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/builderrors" "github.com/TBD54566975/ftl/internal/errors" "github.com/TBD54566975/ftl/internal/exec" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) diff --git a/go-runtime/schema/subscription/analyzer.go b/go-runtime/schema/subscription/analyzer.go index 84dc481be6..23d5207daf 100644 --- a/go-runtime/schema/subscription/analyzer.go +++ b/go-runtime/schema/subscription/analyzer.go @@ -7,9 +7,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) const ( diff --git a/go-runtime/schema/topic/analyzer.go b/go-runtime/schema/topic/analyzer.go index aa63036353..9e729a8608 100644 --- a/go-runtime/schema/topic/analyzer.go +++ b/go-runtime/schema/topic/analyzer.go @@ -7,9 +7,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) const ( diff --git a/go-runtime/schema/transitive/analyzer.go b/go-runtime/schema/transitive/analyzer.go index c1da9d3a65..9dbd4b80d3 100644 --- a/go-runtime/schema/transitive/analyzer.go +++ b/go-runtime/schema/transitive/analyzer.go @@ -10,8 +10,8 @@ import ( "github.com/alecthomas/types/optional" sets "github.com/deckarep/golang-set/v2" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" ) // Extractor extracts transitive schema.Decls to the module schema. diff --git a/go-runtime/schema/typealias/analyzer.go b/go-runtime/schema/typealias/analyzer.go index 6a75b28cd6..6487afdf9a 100644 --- a/go-runtime/schema/typealias/analyzer.go +++ b/go-runtime/schema/typealias/analyzer.go @@ -8,9 +8,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Extractor extracts type aliases to the module schema. diff --git a/go-runtime/schema/typeenum/analyzer.go b/go-runtime/schema/typeenum/analyzer.go index 5f543da251..da8fe7f1ad 100644 --- a/go-runtime/schema/typeenum/analyzer.go +++ b/go-runtime/schema/typeenum/analyzer.go @@ -8,9 +8,9 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis/passes/inspect" "github.com/TBD54566975/golang-tools/go/ast/inspector" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Extractor extracts possible type enum discriminators. diff --git a/go-runtime/schema/typeenumvariant/analyzer.go b/go-runtime/schema/typeenumvariant/analyzer.go index 0067397fb5..84c35b8a1c 100644 --- a/go-runtime/schema/typeenumvariant/analyzer.go +++ b/go-runtime/schema/typeenumvariant/analyzer.go @@ -9,9 +9,9 @@ import ( "github.com/TBD54566975/golang-tools/go/ast/inspector" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Extractor extracts possible type enum variants. diff --git a/go-runtime/schema/valueenumvariant/analyzer.go b/go-runtime/schema/valueenumvariant/analyzer.go index 6a1bc19728..fd1366e1b3 100644 --- a/go-runtime/schema/valueenumvariant/analyzer.go +++ b/go-runtime/schema/valueenumvariant/analyzer.go @@ -11,9 +11,9 @@ import ( "github.com/TBD54566975/golang-tools/go/ast/inspector" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // Extractor extracts possible value enum variants. diff --git a/go-runtime/schema/verb/analyzer.go b/go-runtime/schema/verb/analyzer.go index edca99a7cb..373fadecaa 100644 --- a/go-runtime/schema/verb/analyzer.go +++ b/go-runtime/schema/verb/analyzer.go @@ -9,10 +9,10 @@ import ( "github.com/TBD54566975/golang-tools/go/analysis" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" "github.com/TBD54566975/ftl/go-runtime/schema/initialize" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) type resourceType int diff --git a/go-runtime/server/server.go b/go-runtime/server/server.go index e035eb8976..56f99a6d39 100644 --- a/go-runtime/server/server.go +++ b/go-runtime/server/server.go @@ -13,7 +13,6 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/common/plugin" "github.com/TBD54566975/ftl/go-runtime/encoding" "github.com/TBD54566975/ftl/go-runtime/ftl" @@ -24,6 +23,7 @@ import ( "github.com/TBD54566975/ftl/internal/modulecontext" "github.com/TBD54566975/ftl/internal/observability" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" ) type UserVerbConfig struct { diff --git a/internal/buildengine/build.go b/internal/buildengine/build.go index 89bb5f962b..dea75190ff 100644 --- a/internal/buildengine/build.go +++ b/internal/buildengine/build.go @@ -9,11 +9,11 @@ import ( "github.com/alecthomas/types/either" "google.golang.org/protobuf/proto" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/builderrors" "github.com/TBD54566975/ftl/internal/errors" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" + "github.com/TBD54566975/ftl/internal/schema" ) // Build a module in the given directory given the schema and module config. diff --git a/internal/buildengine/engine.go b/internal/buildengine/engine.go index 2366c12d39..9461ae8892 100644 --- a/internal/buildengine/engine.go +++ b/internal/buildengine/engine.go @@ -19,12 +19,13 @@ import ( "golang.org/x/sync/errgroup" ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" "github.com/TBD54566975/ftl/internal/terminal" + "github.com/TBD54566975/ftl/internal/watch" ) type CompilerBuildError struct { @@ -94,7 +95,7 @@ type Engine struct { moduleMetas *xsync.MapOf[string, moduleMeta] projectRoot string moduleDirs []string - watcher *Watcher // only watches for module toml changes + watcher *watch.Watcher // only watches for module toml changes controllerSchema *xsync.MapOf[string, *schema.Module] schemaChanges *pubsub.Topic[schemaChange] pluginEvents chan PluginEvent @@ -156,7 +157,7 @@ func New(ctx context.Context, client DeployClient, projectRoot string, moduleDir projectRoot: projectRoot, moduleDirs: moduleDirs, moduleMetas: xsync.NewMapOf[string, moduleMeta](), - watcher: NewWatcher("ftl.toml"), + watcher: watch.NewWatcher("ftl.toml"), controllerSchema: xsync.NewMapOf[string, *schema.Module](), schemaChanges: pubsub.New[schemaChange](), pluginEvents: make(chan PluginEvent, 128), @@ -177,7 +178,7 @@ func New(ctx context.Context, client DeployClient, projectRoot string, moduleDir go e.listenForBuildUpdates(ctx) - configs, err := DiscoverModules(ctx, moduleDirs) + configs, err := watch.DiscoverModules(ctx, moduleDirs) if err != nil { return nil, fmt.Errorf("could not find modules: %w", err) } @@ -398,7 +399,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration e.schemaChanges.Unsubscribe(schemaChanges) }() - watchEvents := make(chan WatchEvent, 128) + watchEvents := make(chan watch.WatchEvent, 128) ctx, cancel := context.WithCancel(ctx) topic, err := e.watcher.Watch(ctx, period, e.moduleDirs) if err != nil { @@ -459,7 +460,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration didUpdateDeployments = false case event := <-watchEvents: switch event := event.(type) { - case WatchEventModuleAdded: + case watch.WatchEventModuleAdded: config := event.Config if _, exists := e.moduleMetas.Load(config.Module); !exists { meta, err := e.newModuleMeta(ctx, config, e.projectRoot) @@ -478,7 +479,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration didUpdateDeployments = true } } - case WatchEventModuleRemoved: + case watch.WatchEventModuleRemoved: err := terminateModuleDeployment(ctx, e.client, event.Config.Module) terminal.UpdateModuleState(ctx, event.Config.Module, terminal.BuildStateTerminated) @@ -499,7 +500,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration } } e.moduleMetas.Delete(event.Config.Module) - case WatchEventModuleChanged: + case watch.WatchEventModuleChanged: // ftl.toml file has changed meta, ok := e.moduleMetas.Load(event.Config.Module) if !ok { diff --git a/internal/buildengine/engine_test.go b/internal/buildengine/engine_test.go index 84e1caddc9..4983e67d88 100644 --- a/internal/buildengine/engine_test.go +++ b/internal/buildengine/engine_test.go @@ -6,9 +6,9 @@ import ( "github.com/alecthomas/assert/v2" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/buildengine" "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/schema" ) func TestGraph(t *testing.T) { diff --git a/internal/buildengine/plugin.go b/internal/buildengine/plugin.go index 5f43794aa7..725f79c339 100644 --- a/internal/buildengine/plugin.go +++ b/internal/buildengine/plugin.go @@ -13,12 +13,13 @@ import ( "google.golang.org/protobuf/proto" languagepb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/language" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/builderrors" "github.com/TBD54566975/ftl/internal/errors" "github.com/TBD54566975/ftl/internal/flock" "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/watch" ) const BuildLockTimeout = time.Minute @@ -119,7 +120,7 @@ type getDependenciesCommand struct { func (getDependenciesCommand) pluginCmd() {} -type buildFunc = func(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction ModifyFilesTransaction) error +type buildFunc = func(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction watch.ModifyFilesTransaction) error // internalPlugin is used by languages that have not been split off into their own external plugins yet. // It has standard behaviours around building and watching files. @@ -205,8 +206,8 @@ func (p *internalPlugin) getDependencies(ctx context.Context, d dependenciesFunc } func (p *internalPlugin) run(ctx context.Context) { - watcher := NewWatcher(p.config.Watch...) - watchChan := make(chan WatchEvent, 128) + watcher := watch.NewWatcher(p.config.Watch...) + watchChan := make(chan watch.WatchEvent, 128) // State // This is updated when given explicit build commands and used for automatic rebuilds @@ -256,7 +257,7 @@ func (p *internalPlugin) run(ctx context.Context) { } case event := <-watchChan: switch event.(type) { - case WatchEventModuleChanged: + case watch.WatchEventModuleChanged: // automatic rebuild p.updates.Publish(AutoRebuildStartedEvent{Module: p.config.Module}) @@ -272,10 +273,10 @@ func (p *internalPlugin) run(ctx context.Context) { Module: p.config.Module, Result: either.LeftOf[error](result), }) - case WatchEventModuleAdded: + case watch.WatchEventModuleAdded: // ignore - case WatchEventModuleRemoved: + case watch.WatchEventModuleRemoved: // ignore } @@ -285,7 +286,7 @@ func (p *internalPlugin) run(ctx context.Context) { } } -func buildAndLoadResult(ctx context.Context, projectRoot string, c moduleconfig.ModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, watcher *Watcher, build buildFunc) (BuildResult, error) { +func buildAndLoadResult(ctx context.Context, projectRoot string, c moduleconfig.ModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, watcher *watch.Watcher, build buildFunc) (BuildResult, error) { config := c.Abs() release, err := flock.Acquire(ctx, filepath.Join(config.Dir, ".ftl.lock"), BuildLockTimeout) if err != nil { diff --git a/internal/buildengine/plugin_go.go b/internal/buildengine/plugin_go.go index ffd0da4705..1383a7b177 100644 --- a/internal/buildengine/plugin_go.go +++ b/internal/buildengine/plugin_go.go @@ -16,7 +16,6 @@ import ( "github.com/alecthomas/kong" "golang.org/x/exp/maps" - "github.com/TBD54566975/ftl/backend/schema" goruntime "github.com/TBD54566975/ftl/go-runtime" "github.com/TBD54566975/ftl/go-runtime/compile" "github.com/TBD54566975/ftl/internal" @@ -24,6 +23,8 @@ import ( "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/watch" ) type goPlugin struct { @@ -104,12 +105,12 @@ func (p *goPlugin) GetDependencies(ctx context.Context) ([]string, error) { return p.internalPlugin.getDependencies(ctx, func() ([]string, error) { dependencies := map[string]bool{} fset := token.NewFileSet() - err := WalkDir(p.config.Abs().Dir, func(path string, d fs.DirEntry) error { + err := watch.WalkDir(p.config.Abs().Dir, func(path string, d fs.DirEntry) error { if !d.IsDir() { return nil } if strings.HasPrefix(d.Name(), "_") || d.Name() == "testdata" { - return ErrSkip + return watch.ErrSkip } pkgs, err := parser.ParseDir(fset, path, nil, parser.ImportsOnly) if pkgs == nil { @@ -144,7 +145,7 @@ func (p *goPlugin) GetDependencies(ctx context.Context) ([]string, error) { }) } -func buildGo(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction ModifyFilesTransaction) error { +func buildGo(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction watch.ModifyFilesTransaction) error { if err := compile.Build(ctx, projectRoot, config.Dir, sch, transaction, buildEnv, devMode); err != nil { return CompilerBuildError{err: fmt.Errorf("failed to build module %q: %w", config.Module, err)} } diff --git a/internal/buildengine/plugin_java.go b/internal/buildengine/plugin_java.go index 8827f3efda..d035526d50 100644 --- a/internal/buildengine/plugin_java.go +++ b/internal/buildengine/plugin_java.go @@ -18,12 +18,13 @@ import ( "golang.org/x/exp/maps" "github.com/TBD54566975/ftl" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal" "github.com/TBD54566975/ftl/internal/exec" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/watch" "github.com/TBD54566975/ftl/jvm-runtime/java" "github.com/TBD54566975/ftl/jvm-runtime/kotlin" ) @@ -190,7 +191,7 @@ func extractKotlinFTLImports(self, dir string) ([]string, error) { return modules, nil } -func buildJava(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction ModifyFilesTransaction) error { +func buildJava(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction watch.ModifyFilesTransaction) error { logger := log.FromContext(ctx) if config.Java.BuildTool == moduleconfig.JavaBuildToolMaven { if err := setPOMProperties(ctx, config.Dir); err != nil { diff --git a/internal/buildengine/plugin_rust.go b/internal/buildengine/plugin_rust.go index d73820416e..d295705afd 100644 --- a/internal/buildengine/plugin_rust.go +++ b/internal/buildengine/plugin_rust.go @@ -6,11 +6,12 @@ import ( "github.com/alecthomas/kong" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/exec" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/watch" ) type rustPlugin struct { @@ -38,7 +39,7 @@ func (p *rustPlugin) GetDependencies(ctx context.Context) ([]string, error) { return nil, fmt.Errorf("not implemented") } -func buildRust(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction ModifyFilesTransaction) error { +func buildRust(ctx context.Context, projectRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, buildEnv []string, devMode bool, transaction watch.ModifyFilesTransaction) error { logger := log.FromContext(ctx) logger.Debugf("Using build command '%s'", config.Build) err := exec.Command(ctx, log.Debug, config.Dir+"/_ftl", "bash", "-c", config.Build).RunBuffered(ctx) diff --git a/internal/buildengine/stubs.go b/internal/buildengine/stubs.go index 1432aa24ce..d85185e0be 100644 --- a/internal/buildengine/stubs.go +++ b/internal/buildengine/stubs.go @@ -6,9 +6,9 @@ import ( "os" "path/filepath" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/go-runtime/compile" "github.com/TBD54566975/ftl/internal/moduleconfig" + "github.com/TBD54566975/ftl/internal/schema" ) // GenerateStubs generates stubs for the given modules. diff --git a/internal/buildengine/stubs_test.go b/internal/buildengine/stubs_test.go index 243efcf2c7..af43ec9a31 100644 --- a/internal/buildengine/stubs_test.go +++ b/internal/buildengine/stubs_test.go @@ -8,9 +8,9 @@ import ( "github.com/alecthomas/assert/v2" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/moduleconfig" + "github.com/TBD54566975/ftl/internal/schema" ) func TestGenerateGoStubs(t *testing.T) { diff --git a/internal/model/cron_job.go b/internal/model/cron_job.go index 1f0fc084c4..896036fbfe 100644 --- a/internal/model/cron_job.go +++ b/internal/model/cron_job.go @@ -5,7 +5,7 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" ) type CronJob struct { diff --git a/internal/model/model.go b/internal/model/model.go index eb8b585496..9234aab8f7 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/sha256" ) diff --git a/internal/modulecontext/module_context.go b/internal/modulecontext/module_context.go index 27938c6043..55cf425442 100644 --- a/internal/modulecontext/module_context.go +++ b/internal/modulecontext/module_context.go @@ -18,9 +18,9 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/reflect" "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/schema" ) // Verb is a function that takes a request and returns a response but is not constrained by request/response type like ftl.Verb diff --git a/internal/rpc/context.go b/internal/rpc/context.go index 3b10eab8f2..484f6dc00d 100644 --- a/internal/rpc/context.go +++ b/internal/rpc/context.go @@ -12,10 +12,10 @@ import ( "golang.org/x/mod/semver" "github.com/TBD54566975/ftl" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/log" "github.com/TBD54566975/ftl/internal/model" "github.com/TBD54566975/ftl/internal/rpc/headers" + "github.com/TBD54566975/ftl/internal/schema" ) type ftlDirectRoutingKey struct{} diff --git a/internal/rpc/headers/headers.go b/internal/rpc/headers/headers.go index e785613e4a..56b05e3150 100644 --- a/internal/rpc/headers/headers.go +++ b/internal/rpc/headers/headers.go @@ -6,8 +6,8 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/schema" ) // Headers used by the internal RPC system. diff --git a/internal/scaffold.go b/internal/scaffold.go index 652fd6f14d..4575f19ac8 100644 --- a/internal/scaffold.go +++ b/internal/scaffold.go @@ -7,8 +7,8 @@ import ( "github.com/TBD54566975/scaffolder" - "github.com/TBD54566975/ftl/backend/schema" - "github.com/TBD54566975/ftl/backend/schema/strcase" + "github.com/TBD54566975/ftl/internal/schema" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) // ScaffoldZip is a convenience function for scaffolding a zip archive with scaffolder. diff --git a/backend/schema/aliaskind_enumer.go b/internal/schema/aliaskind_enumer.go similarity index 100% rename from backend/schema/aliaskind_enumer.go rename to internal/schema/aliaskind_enumer.go diff --git a/backend/schema/any.go b/internal/schema/any.go similarity index 100% rename from backend/schema/any.go rename to internal/schema/any.go diff --git a/backend/schema/array.go b/internal/schema/array.go similarity index 100% rename from backend/schema/array.go rename to internal/schema/array.go diff --git a/backend/schema/bool.go b/internal/schema/bool.go similarity index 100% rename from backend/schema/bool.go rename to internal/schema/bool.go diff --git a/backend/schema/builtin.go b/internal/schema/builtin.go similarity index 100% rename from backend/schema/builtin.go rename to internal/schema/builtin.go diff --git a/backend/schema/bytes.go b/internal/schema/bytes.go similarity index 100% rename from backend/schema/bytes.go rename to internal/schema/bytes.go diff --git a/backend/schema/config.go b/internal/schema/config.go similarity index 100% rename from backend/schema/config.go rename to internal/schema/config.go diff --git a/backend/schema/data.go b/internal/schema/data.go similarity index 100% rename from backend/schema/data.go rename to internal/schema/data.go diff --git a/backend/schema/data_test.go b/internal/schema/data_test.go similarity index 100% rename from backend/schema/data_test.go rename to internal/schema/data_test.go diff --git a/backend/schema/database.go b/internal/schema/database.go similarity index 100% rename from backend/schema/database.go rename to internal/schema/database.go diff --git a/backend/schema/encoding.go b/internal/schema/encoding.go similarity index 100% rename from backend/schema/encoding.go rename to internal/schema/encoding.go diff --git a/backend/schema/enum.go b/internal/schema/enum.go similarity index 100% rename from backend/schema/enum.go rename to internal/schema/enum.go diff --git a/backend/schema/field.go b/internal/schema/field.go similarity index 100% rename from backend/schema/field.go rename to internal/schema/field.go diff --git a/backend/schema/float.go b/internal/schema/float.go similarity index 100% rename from backend/schema/float.go rename to internal/schema/float.go diff --git a/backend/schema/fsm.go b/internal/schema/fsm.go similarity index 100% rename from backend/schema/fsm.go rename to internal/schema/fsm.go diff --git a/backend/schema/fsm_test.go b/internal/schema/fsm_test.go similarity index 100% rename from backend/schema/fsm_test.go rename to internal/schema/fsm_test.go diff --git a/backend/schema/int.go b/internal/schema/int.go similarity index 100% rename from backend/schema/int.go rename to internal/schema/int.go diff --git a/backend/schema/intvalue.go b/internal/schema/intvalue.go similarity index 100% rename from backend/schema/intvalue.go rename to internal/schema/intvalue.go diff --git a/backend/schema/jsonschema.go b/internal/schema/jsonschema.go similarity index 100% rename from backend/schema/jsonschema.go rename to internal/schema/jsonschema.go diff --git a/backend/schema/jsonschema_test.go b/internal/schema/jsonschema_test.go similarity index 100% rename from backend/schema/jsonschema_test.go rename to internal/schema/jsonschema_test.go diff --git a/backend/schema/jsonvalidate.go b/internal/schema/jsonvalidate.go similarity index 100% rename from backend/schema/jsonvalidate.go rename to internal/schema/jsonvalidate.go diff --git a/backend/schema/jsonvalidate_test.go b/internal/schema/jsonvalidate_test.go similarity index 100% rename from backend/schema/jsonvalidate_test.go rename to internal/schema/jsonvalidate_test.go diff --git a/backend/schema/map.go b/internal/schema/map.go similarity index 100% rename from backend/schema/map.go rename to internal/schema/map.go diff --git a/backend/schema/metadataalias.go b/internal/schema/metadataalias.go similarity index 100% rename from backend/schema/metadataalias.go rename to internal/schema/metadataalias.go diff --git a/backend/schema/metadatacalls.go b/internal/schema/metadatacalls.go similarity index 100% rename from backend/schema/metadatacalls.go rename to internal/schema/metadatacalls.go diff --git a/backend/schema/metadatacronjob.go b/internal/schema/metadatacronjob.go similarity index 100% rename from backend/schema/metadatacronjob.go rename to internal/schema/metadatacronjob.go diff --git a/backend/schema/metadatadatabases.go b/internal/schema/metadatadatabases.go similarity index 100% rename from backend/schema/metadatadatabases.go rename to internal/schema/metadatadatabases.go diff --git a/backend/schema/metadataencoding.go b/internal/schema/metadataencoding.go similarity index 100% rename from backend/schema/metadataencoding.go rename to internal/schema/metadataencoding.go diff --git a/backend/schema/metadataingress.go b/internal/schema/metadataingress.go similarity index 100% rename from backend/schema/metadataingress.go rename to internal/schema/metadataingress.go diff --git a/backend/schema/metadataretry.go b/internal/schema/metadataretry.go similarity index 100% rename from backend/schema/metadataretry.go rename to internal/schema/metadataretry.go diff --git a/backend/schema/metadatasubscriber.go b/internal/schema/metadatasubscriber.go similarity index 100% rename from backend/schema/metadatasubscriber.go rename to internal/schema/metadatasubscriber.go diff --git a/backend/schema/metadatatypemap.go b/internal/schema/metadatatypemap.go similarity index 100% rename from backend/schema/metadatatypemap.go rename to internal/schema/metadatatypemap.go diff --git a/backend/schema/module.go b/internal/schema/module.go similarity index 100% rename from backend/schema/module.go rename to internal/schema/module.go diff --git a/backend/schema/normalise.go b/internal/schema/normalise.go similarity index 100% rename from backend/schema/normalise.go rename to internal/schema/normalise.go diff --git a/backend/schema/optional.go b/internal/schema/optional.go similarity index 100% rename from backend/schema/optional.go rename to internal/schema/optional.go diff --git a/backend/schema/parser.go b/internal/schema/parser.go similarity index 100% rename from backend/schema/parser.go rename to internal/schema/parser.go diff --git a/backend/schema/protobuf.go b/internal/schema/protobuf.go similarity index 96% rename from backend/schema/protobuf.go rename to internal/schema/protobuf.go index dfa15b2e22..93004f598f 100644 --- a/backend/schema/protobuf.go +++ b/internal/schema/protobuf.go @@ -9,7 +9,7 @@ import ( "golang.org/x/exp/maps" "golang.org/x/exp/slices" - "github.com/TBD54566975/ftl/backend/schema/strcase" + "github.com/TBD54566975/ftl/internal/schema/strcase" ) var typesWithRuntime = map[string]bool{ @@ -27,7 +27,7 @@ func ProtobufSchema() string { w := &strings.Builder{} fmt.Fprintf(w, `syntax = "proto3"; -// This file is generated by github.com/TBD54566975/ftl/backend/schema/protobuf.go, DO NOT MODIFY +// This file is generated by github.com/TBD54566975/ftl/internal/schema/protobuf.go, DO NOT MODIFY package xyz.block.ftl.v1.schema; import "xyz/block/ftl/v1/schema/runtime.proto"; diff --git a/backend/schema/protobuf_dec.go b/internal/schema/protobuf_dec.go similarity index 100% rename from backend/schema/protobuf_dec.go rename to internal/schema/protobuf_dec.go diff --git a/backend/schema/protobuf_enc.go b/internal/schema/protobuf_enc.go similarity index 100% rename from backend/schema/protobuf_enc.go rename to internal/schema/protobuf_enc.go diff --git a/backend/schema/protobuf_test.go b/internal/schema/protobuf_test.go similarity index 100% rename from backend/schema/protobuf_test.go rename to internal/schema/protobuf_test.go diff --git a/backend/schema/ref.go b/internal/schema/ref.go similarity index 100% rename from backend/schema/ref.go rename to internal/schema/ref.go diff --git a/backend/schema/schema.go b/internal/schema/schema.go similarity index 100% rename from backend/schema/schema.go rename to internal/schema/schema.go diff --git a/backend/schema/schema_test.go b/internal/schema/schema_test.go similarity index 100% rename from backend/schema/schema_test.go rename to internal/schema/schema_test.go diff --git a/backend/schema/secret.go b/internal/schema/secret.go similarity index 100% rename from backend/schema/secret.go rename to internal/schema/secret.go diff --git a/backend/schema/strcase/case.go b/internal/schema/strcase/case.go similarity index 100% rename from backend/schema/strcase/case.go rename to internal/schema/strcase/case.go diff --git a/backend/schema/strcase/case_test.go b/internal/schema/strcase/case_test.go similarity index 100% rename from backend/schema/strcase/case_test.go rename to internal/schema/strcase/case_test.go diff --git a/backend/schema/string.go b/internal/schema/string.go similarity index 100% rename from backend/schema/string.go rename to internal/schema/string.go diff --git a/backend/schema/stringvalue.go b/internal/schema/stringvalue.go similarity index 100% rename from backend/schema/stringvalue.go rename to internal/schema/stringvalue.go diff --git a/backend/schema/subscription.go b/internal/schema/subscription.go similarity index 100% rename from backend/schema/subscription.go rename to internal/schema/subscription.go diff --git a/backend/schema/time.go b/internal/schema/time.go similarity index 100% rename from backend/schema/time.go rename to internal/schema/time.go diff --git a/backend/schema/topic.go b/internal/schema/topic.go similarity index 100% rename from backend/schema/topic.go rename to internal/schema/topic.go diff --git a/backend/schema/typealias.go b/internal/schema/typealias.go similarity index 100% rename from backend/schema/typealias.go rename to internal/schema/typealias.go diff --git a/backend/schema/typeparameter.go b/internal/schema/typeparameter.go similarity index 100% rename from backend/schema/typeparameter.go rename to internal/schema/typeparameter.go diff --git a/backend/schema/typeresolver.go b/internal/schema/typeresolver.go similarity index 100% rename from backend/schema/typeresolver.go rename to internal/schema/typeresolver.go diff --git a/backend/schema/typeresolver_test.go b/internal/schema/typeresolver_test.go similarity index 100% rename from backend/schema/typeresolver_test.go rename to internal/schema/typeresolver_test.go diff --git a/backend/schema/typevalue.go b/internal/schema/typevalue.go similarity index 100% rename from backend/schema/typevalue.go rename to internal/schema/typevalue.go diff --git a/backend/schema/unit.go b/internal/schema/unit.go similarity index 100% rename from backend/schema/unit.go rename to internal/schema/unit.go diff --git a/backend/schema/validate.go b/internal/schema/validate.go similarity index 100% rename from backend/schema/validate.go rename to internal/schema/validate.go diff --git a/backend/schema/validate_test.go b/internal/schema/validate_test.go similarity index 100% rename from backend/schema/validate_test.go rename to internal/schema/validate_test.go diff --git a/backend/schema/verb.go b/internal/schema/verb.go similarity index 100% rename from backend/schema/verb.go rename to internal/schema/verb.go diff --git a/backend/schema/visit.go b/internal/schema/visit.go similarity index 100% rename from backend/schema/visit.go rename to internal/schema/visit.go diff --git a/internal/buildengine/discover.go b/internal/watch/discover.go similarity index 98% rename from internal/buildengine/discover.go rename to internal/watch/discover.go index ef35478503..edcdfd76bd 100644 --- a/internal/buildengine/discover.go +++ b/internal/watch/discover.go @@ -1,4 +1,4 @@ -package buildengine +package watch import ( "context" diff --git a/internal/buildengine/discover_test.go b/internal/watch/discover_test.go similarity index 99% rename from internal/buildengine/discover_test.go rename to internal/watch/discover_test.go index 72097336a3..74798acbe2 100644 --- a/internal/buildengine/discover_test.go +++ b/internal/watch/discover_test.go @@ -1,4 +1,4 @@ -package buildengine +package watch import ( "context" diff --git a/internal/buildengine/filehash.go b/internal/watch/filehash.go similarity index 99% rename from internal/buildengine/filehash.go rename to internal/watch/filehash.go index 27a9f0f01c..b61cb57692 100644 --- a/internal/buildengine/filehash.go +++ b/internal/watch/filehash.go @@ -1,4 +1,4 @@ -package buildengine +package watch import ( "bytes" diff --git a/internal/buildengine/filehash_test.go b/internal/watch/filehash_test.go similarity index 98% rename from internal/buildengine/filehash_test.go rename to internal/watch/filehash_test.go index 1d0a8e956a..1e6a3e75b4 100644 --- a/internal/buildengine/filehash_test.go +++ b/internal/watch/filehash_test.go @@ -1,4 +1,4 @@ -package buildengine +package watch import ( "os" diff --git a/internal/watch/testdata/alpha/alpha.go b/internal/watch/testdata/alpha/alpha.go new file mode 100644 index 0000000000..e67e191476 --- /dev/null +++ b/internal/watch/testdata/alpha/alpha.go @@ -0,0 +1,24 @@ +package alpha + +import ( + "context" + "fmt" + + "ftl/other" + + "github.com/TBD54566975/ftl/go-runtime/ftl" // Import the FTL SDK. +) + +type EchoRequest struct { + Name ftl.Option[string] `json:"name"` +} + +type EchoResponse struct { + Message string `json:"message"` +} + +//ftl:verb +func Echo(ctx context.Context, req EchoRequest, oc other.EchoClient) (EchoResponse, error) { + oc(ctx, other.EchoRequest{}) + return EchoResponse{Message: fmt.Sprintf("Hello, %s!", req.Name.Default("anonymous"))}, nil +} diff --git a/internal/watch/testdata/alpha/ftl.toml b/internal/watch/testdata/alpha/ftl.toml new file mode 100644 index 0000000000..133fa77e90 --- /dev/null +++ b/internal/watch/testdata/alpha/ftl.toml @@ -0,0 +1,2 @@ +module = "alpha" +language = "go" diff --git a/internal/watch/testdata/alpha/go.mod b/internal/watch/testdata/alpha/go.mod new file mode 100644 index 0000000000..ecf69388c0 --- /dev/null +++ b/internal/watch/testdata/alpha/go.mod @@ -0,0 +1,63 @@ +module ftl/alpha + +go 1.23.0 + +require github.com/TBD54566975/ftl v0.129.2 + +require ( + connectrpc.com/connect v1.16.2 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.7.1 // indirect + github.com/XSAM/otelsql v0.34.0 // indirect + github.com/alecthomas/atomic v0.1.0-alpha2 // indirect + github.com/alecthomas/concurrency v0.0.2 // indirect + github.com/alecthomas/kong v1.2.1 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/types v0.16.0 // indirect + github.com/alessio/shellescape v1.4.2 // indirect + github.com/benbjohnson/clock v1.3.5 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/danieljoos/wincred v1.2.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect + github.com/hashicorp/cronexpr v1.1.2 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.7.1 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/puzpuzpuz/xsync/v3 v3.4.0 // indirect + github.com/swaggest/jsonschema-go v0.3.72 // indirect + github.com/swaggest/refl v1.3.0 // indirect + github.com/zalando/go-keyring v0.2.5 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.30.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/sdk v1.30.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect +) + +replace github.com/TBD54566975/ftl => ../../../.. diff --git a/internal/watch/testdata/alpha/go.sum b/internal/watch/testdata/alpha/go.sum new file mode 100644 index 0000000000..0dece39d76 --- /dev/null +++ b/internal/watch/testdata/alpha/go.sum @@ -0,0 +1,248 @@ +connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= +connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY= +connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2Tbz17ms= +github.com/TBD54566975/scaffolder v1.1.0 h1:R92zjC4XiS/lGCxJ8Ebn93g8gC0LU9qo06AAKo9cEJE= +github.com/TBD54566975/scaffolder v1.1.0/go.mod h1:dRi67GryEhZ5u0XRSiR294SYaqAfnCkZ7u3rmc4W6iI= +github.com/XSAM/otelsql v0.34.0 h1:YdCRKy17Xn0MH717LEwqpVL/a+4nexmSCBrgoycYY6E= +github.com/XSAM/otelsql v0.34.0/go.mod h1:xaE+ybu+kJOYvtDyThbe0VoKWngvKHmNlrM1rOn8f94= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= +github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= +github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= +github.com/alecthomas/concurrency v0.0.2/go.mod h1:GmuQb/iHX7mbNtPlC/WDzEFxDMB0HYFer2Qda9QTs7w= +github.com/alecthomas/kong v1.2.1 h1:E8jH4Tsgv6wCRX2nGrdPyHDUCSG83WH2qE4XLACD33Q= +github.com/alecthomas/kong v1.2.1/go.mod h1:rKTSFhbdp3Ryefn8x5MOEprnRFQ7nlmMC01GKhehhBM= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7U0= +github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bool64/dev v0.2.35 h1:M17TLsO/pV2J7PYI/gpe3Ua26ETkzZGb+dC06eoMqlk= +github.com/bool64/dev v0.2.35/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= +github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= +github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= +github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/puzpuzpuz/xsync/v3 v3.4.0 h1:DuVBAdXuGFHv8adVXjWWZ63pJq+NRXOWVXlKDBZ+mJ4= +github.com/puzpuzpuz/xsync/v3 v3.4.0/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= +github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= +github.com/swaggest/jsonschema-go v0.3.72 h1:IHaGlR1bdBUBPfhe4tfacN2TGAPKENEGiNyNzvnVHv4= +github.com/swaggest/jsonschema-go v0.3.72/go.mod h1:OrGyEoVqpfSFJ4Am4V/FQcQ3mlEC1vVeleA+5ggbVW4= +github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= +github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/zalando/go-keyring v0.2.5 h1:Bc2HHpjALryKD62ppdEzaFG6VxL6Bc+5v0LYpN8Lba8= +github.com/zalando/go-keyring v0.2.5/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.30.0 h1:WypxHH02KX2poqqbaadmkMYalGyy/vil4HE4PM4nRJc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.30.0/go.mod h1:U79SV99vtvGSEBeeHnpgGJfTsnsdkWLpPN/CcHAzBSI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= +go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +istio.io/api v1.23.2 h1:FvWi7GC+rWD60/ZFPuulX/h3k+f2Q9qot3dP8CIL8Ss= +istio.io/api v1.23.2/go.mod h1:QPSTGXuIQdnZFEm3myf9NZ5uBMwCdJWUvfj9ZZ+2oBM= +istio.io/client-go v1.23.2 h1:BIt6A+KaUOFin3SzXiDq2Fr/TMBev1+c836R0BfUfhU= +istio.io/client-go v1.23.2/go.mod h1:E08wpMtUulJk2tlWOCUVakjy1bKFxUNm22tM1R1QY0Y= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= +modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= +modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= +modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= +modernc.org/sqlite v1.33.1 h1:trb6Z3YYoeM9eDL1O8do81kP+0ejv+YzgyFo+Gwy0nM= +modernc.org/sqlite v1.33.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/watch/testdata/alpha/pkg/pkg.go b/internal/watch/testdata/alpha/pkg/pkg.go new file mode 100644 index 0000000000..8d15ac0564 --- /dev/null +++ b/internal/watch/testdata/alpha/pkg/pkg.go @@ -0,0 +1,10 @@ +package pkg + +import ( + "context" + "ftl/another" +) + +func Pkg(ec another.EchoClient) { + ec(context.Background(), another.EchoRequest{}) +} diff --git a/internal/watch/testdata/alpha/types.ftl.go b/internal/watch/testdata/alpha/types.ftl.go new file mode 100644 index 0000000000..93ec7a961f --- /dev/null +++ b/internal/watch/testdata/alpha/types.ftl.go @@ -0,0 +1,22 @@ +// Code generated by FTL. DO NOT EDIT. +package alpha + +import ( + "context" + ftlother "ftl/other" + "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" + lib "github.com/TBD54566975/ftl/go-runtime/schema/testdata" + "github.com/TBD54566975/ftl/go-runtime/server" +) + +type EchoClient func(context.Context, EchoRequest) (EchoResponse, error) + +func init() { + reflection.Register( + reflection.ExternalType(*new(lib.AnotherNonFTLType)), + reflection.ProvideResourcesForVerb( + Echo, + server.VerbClient[ftlother.EchoClient, ftlother.EchoRequest, ftlother.EchoResponse](), + ), + ) +} diff --git a/internal/watch/testdata/alphakotlin/src/main/kotlin/ftl/alpha/Alpha.kt b/internal/watch/testdata/alphakotlin/src/main/kotlin/ftl/alpha/Alpha.kt new file mode 100644 index 0000000000..fe20667cde --- /dev/null +++ b/internal/watch/testdata/alphakotlin/src/main/kotlin/ftl/alpha/Alpha.kt @@ -0,0 +1,15 @@ +package ftl.alpha + +import ftl.builtin.Empty +import ftl.other.Other +import xyz.block.ftl.Context +import xyz.block.ftl.Export + +data class EchoRequest(val name: String?) +data class EchoResponse(val message: String) + +@Export +fun echo(context: Context, req: EchoRequest): EchoResponse { + val other = Other() + return EchoResponse(message = "Hello, ${req.name ?: "anonymous"}!.") +} diff --git a/internal/watch/testdata/another/another.go b/internal/watch/testdata/another/another.go new file mode 100644 index 0000000000..684bbcce13 --- /dev/null +++ b/internal/watch/testdata/another/another.go @@ -0,0 +1,54 @@ +package another + +import ( + "context" + "fmt" + + "github.com/TBD54566975/ftl/go-runtime/ftl" // Import the FTL SDK. + lib "github.com/TBD54566975/ftl/go-runtime/schema/testdata" +) + +//ftl:enum export +type TypeEnum interface { + tag() +} + +type A int + +func (A) tag() {} + +type B string + +func (B) tag() {} + +//ftl:enum export +type SecondTypeEnum interface{ typeEnum() } + +type One int + +func (One) typeEnum() {} + +type Two string + +func (Two) typeEnum() {} + +//ftl:data export +type TransitiveTypeEnum struct { + TypeEnumRef SecondTypeEnum +} + +type EchoRequest struct { + Name ftl.Option[string] `json:"name"` +} + +type EchoResponse struct { + Message string `json:"message"` +} + +//ftl:verb export +func Echo(ctx context.Context, req EchoRequest) (EchoResponse, error) { + return EchoResponse{Message: fmt.Sprintf("Hello, %s!", req.Name.Default("anonymous"))}, nil +} + +//ftl:typealias export +type External lib.AnotherNonFTLType diff --git a/internal/watch/testdata/another/ftl.toml b/internal/watch/testdata/another/ftl.toml new file mode 100644 index 0000000000..57e7400a68 --- /dev/null +++ b/internal/watch/testdata/another/ftl.toml @@ -0,0 +1,2 @@ +module = "another" +language = "go" diff --git a/internal/watch/testdata/another/go.mod b/internal/watch/testdata/another/go.mod new file mode 100644 index 0000000000..9981baf754 --- /dev/null +++ b/internal/watch/testdata/another/go.mod @@ -0,0 +1,49 @@ +module ftl/another + +go 1.23.0 + +require github.com/TBD54566975/ftl v0.129.2 + +require ( + connectrpc.com/connect v1.16.2 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.7.1 // indirect + github.com/XSAM/otelsql v0.34.0 // indirect + github.com/alecthomas/atomic v0.1.0-alpha2 // indirect + github.com/alecthomas/concurrency v0.0.2 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/types v0.16.0 // indirect + github.com/alessio/shellescape v1.4.2 // indirect + github.com/benbjohnson/clock v1.3.5 // indirect + github.com/danieljoos/wincred v1.2.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/hashicorp/cronexpr v1.1.2 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.7.1 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/puzpuzpuz/xsync/v3 v3.4.0 // indirect + github.com/swaggest/jsonschema-go v0.3.72 // indirect + github.com/swaggest/refl v1.3.0 // indirect + github.com/zalando/go-keyring v0.2.5 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect +) + +replace github.com/TBD54566975/ftl => ../../../.. diff --git a/internal/watch/testdata/another/go.sum b/internal/watch/testdata/another/go.sum new file mode 100644 index 0000000000..e86889ebc9 --- /dev/null +++ b/internal/watch/testdata/another/go.sum @@ -0,0 +1,224 @@ +connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= +connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY= +connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2Tbz17ms= +github.com/TBD54566975/scaffolder v1.1.0 h1:R92zjC4XiS/lGCxJ8Ebn93g8gC0LU9qo06AAKo9cEJE= +github.com/TBD54566975/scaffolder v1.1.0/go.mod h1:dRi67GryEhZ5u0XRSiR294SYaqAfnCkZ7u3rmc4W6iI= +github.com/XSAM/otelsql v0.34.0 h1:YdCRKy17Xn0MH717LEwqpVL/a+4nexmSCBrgoycYY6E= +github.com/XSAM/otelsql v0.34.0/go.mod h1:xaE+ybu+kJOYvtDyThbe0VoKWngvKHmNlrM1rOn8f94= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= +github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= +github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= +github.com/alecthomas/concurrency v0.0.2/go.mod h1:GmuQb/iHX7mbNtPlC/WDzEFxDMB0HYFer2Qda9QTs7w= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7U0= +github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bool64/dev v0.2.35 h1:M17TLsO/pV2J7PYI/gpe3Ua26ETkzZGb+dC06eoMqlk= +github.com/bool64/dev v0.2.35/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= +github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= +github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= +github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/puzpuzpuz/xsync/v3 v3.4.0 h1:DuVBAdXuGFHv8adVXjWWZ63pJq+NRXOWVXlKDBZ+mJ4= +github.com/puzpuzpuz/xsync/v3 v3.4.0/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= +github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= +github.com/swaggest/jsonschema-go v0.3.72 h1:IHaGlR1bdBUBPfhe4tfacN2TGAPKENEGiNyNzvnVHv4= +github.com/swaggest/jsonschema-go v0.3.72/go.mod h1:OrGyEoVqpfSFJ4Am4V/FQcQ3mlEC1vVeleA+5ggbVW4= +github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= +github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/zalando/go-keyring v0.2.5 h1:Bc2HHpjALryKD62ppdEzaFG6VxL6Bc+5v0LYpN8Lba8= +github.com/zalando/go-keyring v0.2.5/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= +go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +istio.io/api v1.23.2 h1:FvWi7GC+rWD60/ZFPuulX/h3k+f2Q9qot3dP8CIL8Ss= +istio.io/api v1.23.2/go.mod h1:QPSTGXuIQdnZFEm3myf9NZ5uBMwCdJWUvfj9ZZ+2oBM= +istio.io/client-go v1.23.2 h1:BIt6A+KaUOFin3SzXiDq2Fr/TMBev1+c836R0BfUfhU= +istio.io/client-go v1.23.2/go.mod h1:E08wpMtUulJk2tlWOCUVakjy1bKFxUNm22tM1R1QY0Y= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= +modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= +modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= +modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= +modernc.org/sqlite v1.33.1 h1:trb6Z3YYoeM9eDL1O8do81kP+0ejv+YzgyFo+Gwy0nM= +modernc.org/sqlite v1.33.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/watch/testdata/another/types.ftl.go b/internal/watch/testdata/another/types.ftl.go new file mode 100644 index 0000000000..4652ba9af8 --- /dev/null +++ b/internal/watch/testdata/another/types.ftl.go @@ -0,0 +1,27 @@ +// Code generated by FTL. DO NOT EDIT. +package another + +import ( + "context" + "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" + lib "github.com/TBD54566975/ftl/go-runtime/schema/testdata" +) + +type EchoClient func(context.Context, EchoRequest) (EchoResponse, error) + +func init() { + reflection.Register( + reflection.SumType[SecondTypeEnum]( + *new(One), + *new(Two), + ), + reflection.SumType[TypeEnum]( + *new(A), + *new(B), + ), + reflection.ExternalType(*new(lib.AnotherNonFTLType)), + reflection.ProvideResourcesForVerb( + Echo, + ), + ) +} diff --git a/internal/watch/testdata/depcycle1/depcycle1.go b/internal/watch/testdata/depcycle1/depcycle1.go new file mode 100644 index 0000000000..2ec373993e --- /dev/null +++ b/internal/watch/testdata/depcycle1/depcycle1.go @@ -0,0 +1,18 @@ +package depcycle1 + +import ( + "context" + "fmt" + "ftl/depcycle2" +) + +type Request struct{} +type Response struct { + Message string +} + +//ftl:verb export +func Cycle1(ctx context.Context, req Request) (Response, error) { + var resp depcycle2.Response + return Response{Message: fmt.Sprintf("cycle1 %s", resp)}, nil +} diff --git a/internal/watch/testdata/depcycle1/ftl.toml b/internal/watch/testdata/depcycle1/ftl.toml new file mode 100644 index 0000000000..28b149f2a5 --- /dev/null +++ b/internal/watch/testdata/depcycle1/ftl.toml @@ -0,0 +1,2 @@ +module = "depcycle1" +language = "go" diff --git a/internal/watch/testdata/depcycle1/go.mod b/internal/watch/testdata/depcycle1/go.mod new file mode 100644 index 0000000000..d324300a5b --- /dev/null +++ b/internal/watch/testdata/depcycle1/go.mod @@ -0,0 +1,5 @@ +module ftl/depcycle1 + +go 1.23.0 + +replace github.com/TBD54566975/ftl => ../../../.. diff --git a/internal/watch/testdata/depcycle2/depcycle2.go b/internal/watch/testdata/depcycle2/depcycle2.go new file mode 100644 index 0000000000..e1d492b74d --- /dev/null +++ b/internal/watch/testdata/depcycle2/depcycle2.go @@ -0,0 +1,18 @@ +package depcycle2 + +import ( + "context" + "fmt" + "ftl/depcycle1" +) + +type Request struct{} +type Response struct { + Message string +} + +//ftl:verb export +func Cycle2(ctx context.Context, req Request) (Response, error) { + var resp depcycle1.Response + return Response{Message: fmt.Sprintf("cycle2 %s", resp)}, nil +} diff --git a/internal/watch/testdata/depcycle2/ftl.toml b/internal/watch/testdata/depcycle2/ftl.toml new file mode 100644 index 0000000000..4e5a099c41 --- /dev/null +++ b/internal/watch/testdata/depcycle2/ftl.toml @@ -0,0 +1,2 @@ +module = "depcycle2" +language = "go" diff --git a/internal/watch/testdata/depcycle2/go.mod b/internal/watch/testdata/depcycle2/go.mod new file mode 100644 index 0000000000..ba72aa35c6 --- /dev/null +++ b/internal/watch/testdata/depcycle2/go.mod @@ -0,0 +1,5 @@ +module ftl/depcycle2 + +go 1.23.0 + +replace github.com/TBD54566975/ftl => ./../../.. diff --git a/internal/buildengine/testdata/echokotlin/ftl.toml b/internal/watch/testdata/echokotlin/ftl.toml similarity index 100% rename from internal/buildengine/testdata/echokotlin/ftl.toml rename to internal/watch/testdata/echokotlin/ftl.toml diff --git a/internal/buildengine/testdata/echokotlin/pom.xml b/internal/watch/testdata/echokotlin/pom.xml similarity index 100% rename from internal/buildengine/testdata/echokotlin/pom.xml rename to internal/watch/testdata/echokotlin/pom.xml diff --git a/internal/buildengine/testdata/echokotlin/src/main/kotlin/ftl/echo/Echo.kt b/internal/watch/testdata/echokotlin/src/main/kotlin/ftl/echo/Echo.kt similarity index 100% rename from internal/buildengine/testdata/echokotlin/src/main/kotlin/ftl/echo/Echo.kt rename to internal/watch/testdata/echokotlin/src/main/kotlin/ftl/echo/Echo.kt diff --git a/internal/watch/testdata/external/external.go b/internal/watch/testdata/external/external.go new file mode 100644 index 0000000000..93feca28d1 --- /dev/null +++ b/internal/watch/testdata/external/external.go @@ -0,0 +1,19 @@ +//ftl:module external +package external + +import ( + "context" + "time" +) + +type ExternalRequest struct{} +type ExternalResponse struct { + Month time.Month // external type should not be allowed +} + +// External returns the current month as an external type. +// +//ftl:verb +func Time(ctx context.Context, req ExternalRequest) (ExternalResponse, error) { + return ExternalResponse{Month: time.Now().Month()}, nil +} diff --git a/internal/watch/testdata/external/ftl.toml b/internal/watch/testdata/external/ftl.toml new file mode 100644 index 0000000000..8dacc44933 --- /dev/null +++ b/internal/watch/testdata/external/ftl.toml @@ -0,0 +1,2 @@ +module = "external" +language = "go" diff --git a/internal/watch/testdata/external/go.mod b/internal/watch/testdata/external/go.mod new file mode 100644 index 0000000000..539bd0b268 --- /dev/null +++ b/internal/watch/testdata/external/go.mod @@ -0,0 +1,5 @@ +module ftl/external + +go 1.23.0 + +replace github.com/TBD54566975/ftl => ../../../.. diff --git a/internal/watch/testdata/external/go.sum b/internal/watch/testdata/external/go.sum new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/buildengine/testdata/externalkotlin/ftl.toml b/internal/watch/testdata/externalkotlin/ftl.toml similarity index 100% rename from internal/buildengine/testdata/externalkotlin/ftl.toml rename to internal/watch/testdata/externalkotlin/ftl.toml diff --git a/internal/buildengine/testdata/externalkotlin/pom.xml b/internal/watch/testdata/externalkotlin/pom.xml similarity index 100% rename from internal/buildengine/testdata/externalkotlin/pom.xml rename to internal/watch/testdata/externalkotlin/pom.xml diff --git a/internal/buildengine/testdata/externalkotlin/src/main/kotlin/ftl/externalkotlin/ExternalKotlin.kt b/internal/watch/testdata/externalkotlin/src/main/kotlin/ftl/externalkotlin/ExternalKotlin.kt similarity index 100% rename from internal/buildengine/testdata/externalkotlin/src/main/kotlin/ftl/externalkotlin/ExternalKotlin.kt rename to internal/watch/testdata/externalkotlin/src/main/kotlin/ftl/externalkotlin/ExternalKotlin.kt diff --git a/internal/watch/testdata/integer/ftl.toml b/internal/watch/testdata/integer/ftl.toml new file mode 100644 index 0000000000..b1d03df587 --- /dev/null +++ b/internal/watch/testdata/integer/ftl.toml @@ -0,0 +1,2 @@ +module = "integer" +language = "go" diff --git a/internal/watch/testdata/integer/go.mod b/internal/watch/testdata/integer/go.mod new file mode 100644 index 0000000000..7762ee9b7c --- /dev/null +++ b/internal/watch/testdata/integer/go.mod @@ -0,0 +1,7 @@ +module ftl/integer + +go 1.23.0 + +toolchain go1.22.4 + +replace github.com/TBD54566975/ftl => ../../../.. diff --git a/internal/watch/testdata/integer/go.sum b/internal/watch/testdata/integer/go.sum new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/watch/testdata/integer/integer.go b/internal/watch/testdata/integer/integer.go new file mode 100644 index 0000000000..cd97d284d8 --- /dev/null +++ b/internal/watch/testdata/integer/integer.go @@ -0,0 +1,18 @@ +package integer + +import ( + "context" +) + +type EchoRequest struct { + Input int64 `json:"value"` +} + +type EchoResponse struct { + Output int64 `json:"value"` +} + +//ftl:verb +func Echo(ctx context.Context, req EchoRequest) (EchoResponse, error) { + return EchoResponse{Output: req.Input}, nil +} diff --git a/internal/watch/testdata/other/ftl.toml b/internal/watch/testdata/other/ftl.toml new file mode 100644 index 0000000000..df8a2232a3 --- /dev/null +++ b/internal/watch/testdata/other/ftl.toml @@ -0,0 +1,2 @@ +module = "other" +language = "go" diff --git a/internal/watch/testdata/other/go.mod b/internal/watch/testdata/other/go.mod new file mode 100644 index 0000000000..ce8705f5ac --- /dev/null +++ b/internal/watch/testdata/other/go.mod @@ -0,0 +1,49 @@ +module ftl/other + +go 1.23.0 + +require github.com/TBD54566975/ftl v0.129.2 + +require ( + connectrpc.com/connect v1.16.2 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.7.1 // indirect + github.com/XSAM/otelsql v0.34.0 // indirect + github.com/alecthomas/atomic v0.1.0-alpha2 // indirect + github.com/alecthomas/concurrency v0.0.2 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/types v0.16.0 // indirect + github.com/alessio/shellescape v1.4.2 // indirect + github.com/benbjohnson/clock v1.3.5 // indirect + github.com/danieljoos/wincred v1.2.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/hashicorp/cronexpr v1.1.2 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.7.1 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/puzpuzpuz/xsync/v3 v3.4.0 // indirect + github.com/swaggest/jsonschema-go v0.3.72 // indirect + github.com/swaggest/refl v1.3.0 // indirect + github.com/zalando/go-keyring v0.2.5 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect +) + +replace github.com/TBD54566975/ftl => ../../../.. diff --git a/internal/watch/testdata/other/go.sum b/internal/watch/testdata/other/go.sum new file mode 100644 index 0000000000..e86889ebc9 --- /dev/null +++ b/internal/watch/testdata/other/go.sum @@ -0,0 +1,224 @@ +connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= +connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY= +connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2Tbz17ms= +github.com/TBD54566975/scaffolder v1.1.0 h1:R92zjC4XiS/lGCxJ8Ebn93g8gC0LU9qo06AAKo9cEJE= +github.com/TBD54566975/scaffolder v1.1.0/go.mod h1:dRi67GryEhZ5u0XRSiR294SYaqAfnCkZ7u3rmc4W6iI= +github.com/XSAM/otelsql v0.34.0 h1:YdCRKy17Xn0MH717LEwqpVL/a+4nexmSCBrgoycYY6E= +github.com/XSAM/otelsql v0.34.0/go.mod h1:xaE+ybu+kJOYvtDyThbe0VoKWngvKHmNlrM1rOn8f94= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= +github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= +github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= +github.com/alecthomas/concurrency v0.0.2/go.mod h1:GmuQb/iHX7mbNtPlC/WDzEFxDMB0HYFer2Qda9QTs7w= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7U0= +github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bool64/dev v0.2.35 h1:M17TLsO/pV2J7PYI/gpe3Ua26ETkzZGb+dC06eoMqlk= +github.com/bool64/dev v0.2.35/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= +github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= +github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= +github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/puzpuzpuz/xsync/v3 v3.4.0 h1:DuVBAdXuGFHv8adVXjWWZ63pJq+NRXOWVXlKDBZ+mJ4= +github.com/puzpuzpuz/xsync/v3 v3.4.0/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= +github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= +github.com/swaggest/jsonschema-go v0.3.72 h1:IHaGlR1bdBUBPfhe4tfacN2TGAPKENEGiNyNzvnVHv4= +github.com/swaggest/jsonschema-go v0.3.72/go.mod h1:OrGyEoVqpfSFJ4Am4V/FQcQ3mlEC1vVeleA+5ggbVW4= +github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= +github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/zalando/go-keyring v0.2.5 h1:Bc2HHpjALryKD62ppdEzaFG6VxL6Bc+5v0LYpN8Lba8= +github.com/zalando/go-keyring v0.2.5/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= +go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +istio.io/api v1.23.2 h1:FvWi7GC+rWD60/ZFPuulX/h3k+f2Q9qot3dP8CIL8Ss= +istio.io/api v1.23.2/go.mod h1:QPSTGXuIQdnZFEm3myf9NZ5uBMwCdJWUvfj9ZZ+2oBM= +istio.io/client-go v1.23.2 h1:BIt6A+KaUOFin3SzXiDq2Fr/TMBev1+c836R0BfUfhU= +istio.io/client-go v1.23.2/go.mod h1:E08wpMtUulJk2tlWOCUVakjy1bKFxUNm22tM1R1QY0Y= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= +modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= +modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= +modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= +modernc.org/sqlite v1.33.1 h1:trb6Z3YYoeM9eDL1O8do81kP+0ejv+YzgyFo+Gwy0nM= +modernc.org/sqlite v1.33.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/watch/testdata/other/other.go b/internal/watch/testdata/other/other.go new file mode 100644 index 0000000000..b257c1f946 --- /dev/null +++ b/internal/watch/testdata/other/other.go @@ -0,0 +1,93 @@ +package other + +import ( + "context" + "fmt" + "time" + + "github.com/TBD54566975/ftl/go-runtime/ftl" // Import the FTL SDK. + lib "github.com/TBD54566975/ftl/go-runtime/schema/testdata" + + "ftl/another" +) + +//ftl:enum +type TypeEnum interface { + tag() +} + +type MyBool bool + +func (MyBool) tag() {} + +type MyBytes []byte + +func (MyBytes) tag() {} + +type MyFloat float64 + +func (MyFloat) tag() {} + +type MyInt int + +func (MyInt) tag() {} + +type MyTime time.Time + +func (MyTime) tag() {} + +type MyList []string + +func (MyList) tag() {} + +type MyMap map[string]string + +func (MyMap) tag() {} + +type MyString string + +func (MyString) tag() {} + +type MyStruct struct{} + +func (MyStruct) tag() {} + +type MyOption ftl.Option[string] + +func (MyOption) tag() {} + +type MyUnit ftl.Unit + +func (MyUnit) tag() {} + +//ftl:enum +type SecondTypeEnum interface { + tag2() +} + +type A string + +func (A) tag2() {} + +type B EchoRequest + +func (B) tag2() {} + +type EchoRequest struct { + Name ftl.Option[string] `json:"name"` + ExternalSumType another.TypeEnum + ExternalNestedSumType another.TransitiveTypeEnum + ExternalExternalType another.External +} + +type EchoResponse struct { + Message string `json:"message"` +} + +//ftl:verb export +func Echo(ctx context.Context, req EchoRequest) (EchoResponse, error) { + return EchoResponse{Message: fmt.Sprintf("Hello, %s!", req.Name.Default("anonymous"))}, nil +} + +//ftl:typealias +type External lib.NonFTLType diff --git a/internal/watch/testdata/other/types.ftl.go b/internal/watch/testdata/other/types.ftl.go new file mode 100644 index 0000000000..9e30e8e6c9 --- /dev/null +++ b/internal/watch/testdata/other/types.ftl.go @@ -0,0 +1,37 @@ +// Code generated by FTL. DO NOT EDIT. +package other + +import ( + "context" + "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" + lib "github.com/TBD54566975/ftl/go-runtime/schema/testdata" +) + +type EchoClient func(context.Context, EchoRequest) (EchoResponse, error) + +func init() { + reflection.Register( + reflection.SumType[SecondTypeEnum]( + *new(A), + *new(B), + ), + reflection.SumType[TypeEnum]( + *new(MyBool), + *new(MyBytes), + *new(MyFloat), + *new(MyInt), + *new(MyList), + *new(MyMap), + *new(MyOption), + *new(MyString), + *new(MyStruct), + *new(MyTime), + *new(MyUnit), + ), + reflection.ExternalType(*new(lib.NonFTLType)), + reflection.ExternalType(*new(lib.AnotherNonFTLType)), + reflection.ProvideResourcesForVerb( + Echo, + ), + ) +} diff --git a/internal/watch/testdata/type_registry_main.go b/internal/watch/testdata/type_registry_main.go new file mode 100644 index 0000000000..d14b8fd770 --- /dev/null +++ b/internal/watch/testdata/type_registry_main.go @@ -0,0 +1,55 @@ +// Code generated by FTL. DO NOT EDIT. +package main + +import ( + "context" + ftlanother "ftl/another" + ftlother "ftl/other" + "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" + "github.com/TBD54566975/ftl/common/plugin" + "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" + lib "github.com/TBD54566975/ftl/go-runtime/schema/testdata" + "github.com/TBD54566975/ftl/go-runtime/server" +) + +func init() { + reflection.Register( + reflection.SumType[ftlanother.SecondTypeEnum]( + *new(ftlanother.One), + *new(ftlanother.Two), + ), + reflection.SumType[ftlanother.TypeEnum]( + *new(ftlanother.A), + *new(ftlanother.B), + ), + reflection.SumType[ftlother.SecondTypeEnum]( + *new(ftlother.A), + *new(ftlother.B), + ), + reflection.SumType[ftlother.TypeEnum]( + *new(ftlother.MyBool), + *new(ftlother.MyBytes), + *new(ftlother.MyFloat), + *new(ftlother.MyInt), + *new(ftlother.MyList), + *new(ftlother.MyMap), + *new(ftlother.MyOption), + *new(ftlother.MyString), + *new(ftlother.MyStruct), + *new(ftlother.MyTime), + *new(ftlother.MyUnit), + ), + reflection.ExternalType(*new(lib.NonFTLType)), + reflection.ExternalType(*new(lib.AnotherNonFTLType)), + reflection.ProvideResourcesForVerb( + ftlother.Echo, + ), + ) +} + +func main() { + verbConstructor := server.NewUserVerbServer("integration", "other", + server.HandleCall[ftlother.EchoRequest, ftlother.EchoResponse](ftlother.Echo), + ) + plugin.Start(context.Background(), "other", verbConstructor, ftlv1connect.VerbServiceName, ftlv1connect.NewVerbServiceHandler) +} diff --git a/internal/buildengine/walk.go b/internal/watch/walk.go similarity index 99% rename from internal/buildengine/walk.go rename to internal/watch/walk.go index ec4d5d47e4..d9973a7e1d 100644 --- a/internal/buildengine/walk.go +++ b/internal/watch/walk.go @@ -1,4 +1,4 @@ -package buildengine +package watch import ( "bufio" diff --git a/internal/buildengine/watch.go b/internal/watch/watch.go similarity index 99% rename from internal/buildengine/watch.go rename to internal/watch/watch.go index 94887717fc..50238a39fb 100644 --- a/internal/buildengine/watch.go +++ b/internal/watch/watch.go @@ -1,4 +1,4 @@ -package buildengine +package watch import ( "context" diff --git a/internal/buildengine/watch_integration_test.go b/internal/watch/watch_integration_test.go similarity index 99% rename from internal/buildengine/watch_integration_test.go rename to internal/watch/watch_integration_test.go index 9012e1a2f6..80e908b21c 100644 --- a/internal/buildengine/watch_integration_test.go +++ b/internal/watch/watch_integration_test.go @@ -1,6 +1,6 @@ //go:build integration -package buildengine +package watch import ( "context" //nolint:depguard diff --git a/sqlc.yaml b/sqlc.yaml index 3ac3d13605..1a52574e82 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -36,7 +36,7 @@ sql: go_type: type: "optional.Option[sqltypes.Duration]" - db_type: "module_schema_pb" - go_type: "*github.com/TBD54566975/ftl/backend/schema.Module" + go_type: "*github.com/TBD54566975/ftl/internal/schema.Module" - db_type: "timestamptz" nullable: true go_type: "github.com/TBD54566975/ftl/backend/controller/sql/sqltypes.OptionalTime" @@ -50,7 +50,7 @@ sql: go_type: type: "optional.Option[model.RunnerKey]" - db_type: "schema_ref" - go_type: "github.com/TBD54566975/ftl/backend/schema.RefKey" + go_type: "github.com/TBD54566975/ftl/internal/schema.RefKey" - db_type: "schema_ref" nullable: true go_type: