Skip to content

Commit

Permalink
fix: build broke from last PR but I didn't see it :(
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Feb 6, 2024
1 parent bcbf8f7 commit b3b57f8
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 102 deletions.
2 changes: 1 addition & 1 deletion frontend/src/protos/google/protobuf/timestamp_pb.ts

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

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

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

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

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

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

11 changes: 2 additions & 9 deletions frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts

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

Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class ModuleGenerator() {
type.bool != null -> ClassName("kotlin", "Boolean")
type.time != null -> ClassName("java.time", "OffsetDateTime")
type.any != null -> ClassName("kotlin", "Any")
type.parameter != null -> TypeVariableName(type.parameter.name)
type.array != null -> {
val element = type.array?.element ?: throw IllegalArgumentException(
"Missing element type in kotlin array generator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class TestModule()
name = "ParamTestData",
typeParameters = listOf(TypeParameter(name = "T")),
fields = listOf(
Field(name = "t", type = Type(parameter = TypeParameter(name = "T"))),
Field(name = "t", type = Type(dataRef = DataRef(name = "T"))),
)
)
),
Expand Down Expand Up @@ -87,7 +87,7 @@ public class TestModule()
name = "parameterizedDataRef", type = Type(
dataRef = DataRef(
name = "ParamTestData",
typeParameters = listOf(Type(parameter = TypeParameter(name = "T")))
typeParameters = listOf(Type(dataRef = DataRef(name = "T")))
)
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class SchemaExtractor(
private fun KotlinType.toSchemaType(position: Position): Type {
if (this.unwrap().constructor.isTypeParameterTypeConstructor()) {
return Type(
parameter = TypeParameter(
dataRef = DataRef(
name = this.constructor.declarationDescriptor?.name?.asString() ?: "T",
pos = position,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal class ExtractSchemaRuleTest(private val env: KotlinCoreEnvironment) {
fields = listOf(
Field(
name = "t",
type = Type(parameter = TypeParameter(name = "T"))
type = Type(dataRef = DataRef(name = "T"))
),
Field(
name = "name",
Expand Down
140 changes: 60 additions & 80 deletions protos/xyz/block/ftl/v1/schema/schema.pb.go

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

3 changes: 1 addition & 2 deletions protos/xyz/block/ftl/v1/schema/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ message Type {
DataRef dataRef = 9;
Unit unit = 10;
Any any = 11;
TypeParameter parameter = 12;
Optional optional = 13;
Optional optional = 12;

Check failure on line 187 in protos/xyz/block/ftl/v1/schema/schema.proto

View workflow job for this annotation

GitHub Actions / Proto Breaking Change Check

protos/xyz/block/ftl/v1/schema/schema.proto:187:5:Field "12" with name "optional" on message "Type" changed option "json_name" from "parameter" to "optional".

Check failure on line 187 in protos/xyz/block/ftl/v1/schema/schema.proto

View workflow job for this annotation

GitHub Actions / Proto Breaking Change Check

protos/xyz/block/ftl/v1/schema/schema.proto:187:5:Field "12" on message "Type" changed type from "xyz.block.ftl.v1.schema.TypeParameter" to "xyz.block.ftl.v1.schema.Optional".

Check failure on line 187 in protos/xyz/block/ftl/v1/schema/schema.proto

View workflow job for this annotation

GitHub Actions / Proto Breaking Change Check

protos/xyz/block/ftl/v1/schema/schema.proto:187:14:Field "12" on message "Type" changed name from "parameter" to "optional".
}
}

Expand Down

0 comments on commit b3b57f8

Please sign in to comment.