Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: build broke from last PR but I didn't see it :( #881

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -171,7 +171,7 @@
optional Position pos = 1;
}

message Type {

Check failure on line 174 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:174:1:Previously present field "13" with name "optional" on message "Type" was deleted.
oneof value {
Int int = 1;
Float float = 2;
Expand All @@ -184,8 +184,7 @@
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