diff --git a/backend/controller/ingress/response.go b/backend/controller/ingress/response.go index fd91d98b89..35f14046ac 100644 --- a/backend/controller/ingress/response.go +++ b/backend/controller/ingress/response.go @@ -53,6 +53,9 @@ func ResponseForVerb(sch *schema.Schema, verb *schema.Verb, response HTTPRespons // Clone and canonicalise the headers. headers := http.Header(maps.Clone(response.Headers)) + if headers == nil { + headers = http.Header{} + } for k, v := range response.Headers { headers[http.CanonicalHeaderKey(k)] = v } diff --git a/backend/schema/validate.go b/backend/schema/validate.go index 5d18d4a6b3..5c8dc76813 100644 --- a/backend/schema/validate.go +++ b/backend/schema/validate.go @@ -8,7 +8,6 @@ import ( "strings" "github.com/alecthomas/participle/v2" - "github.com/alecthomas/repr" "golang.design/x/reflect" "golang.org/x/exp/maps" @@ -218,8 +217,6 @@ func ValidateModule(module *Module) error { if n.Module == "" { merr = append(merr, fmt.Errorf("%s: unqualified reference to invalid data structure %q", n.Pos, n)) } - repr.Println(n) - repr.Println(mdecl) n.Module = mdecl.Module.Name } } else if n.Module == "" || n.Module == module.Name { // Don't report errors for external modules. diff --git a/go-runtime/compile/schema_test.go b/go-runtime/compile/schema_test.go index 07e1305ac2..d1a3082e57 100644 --- a/go-runtime/compile/schema_test.go +++ b/go-runtime/compile/schema_test.go @@ -1,7 +1,6 @@ package compile import ( - "fmt" "go/ast" "go/types" "strings" @@ -47,7 +46,6 @@ func TestExtractModuleSchema(t *testing.T) { func TestExtractModuleSchemaTwo(t *testing.T) { _, actual, err := ExtractModuleSchema("testdata/two") - fmt.Println(actual) assert.NoError(t, err) actual = schema.Normalise(actual) expected := `module two { diff --git a/go-runtime/encoding/encoding.go b/go-runtime/encoding/encoding.go index 4cba75fe38..4849c2e72c 100644 --- a/go-runtime/encoding/encoding.go +++ b/go-runtime/encoding/encoding.go @@ -11,8 +11,6 @@ import ( "reflect" "strings" - "github.com/alecthomas/repr" - "github.com/TBD54566975/ftl/backend/schema/strcase" ) @@ -121,7 +119,6 @@ func encodeStruct(v reflect.Value, w *bytes.Buffer) error { (t.String() == "ftl.Unit" && fv.IsZero()) || (strings.HasPrefix(t.String(), "ftl.Option[") && fv.IsZero()) || (t == reflect.TypeOf((*any)(nil)).Elem() && fv.IsZero()) { - repr.Println(ft.Name, fv.Interface()) continue } if afterFirst {