Skip to content

Commit

Permalink
Revert "Promote google/protobuf/api.proto as a runtime proto"
Browse files Browse the repository at this point in the history
This reverts commit a9e7316.
  • Loading branch information
oldergod committed Dec 10, 2024
1 parent 6faf06c commit a250440
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 480 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1811,14 +1811,6 @@ class WireRunTest {
|message Any {}
""".trimMargin(),
)
fs.add(
"google/src/main/proto/google/protobuf/api.proto",
"""
|syntax = "proto2";
|package google.protobuf;
|message Api {}
""".trimMargin(),
)
fs.add(
"google/src/main/proto/google/protobuf/duration.proto",
"""
Expand All @@ -1835,14 +1827,6 @@ class WireRunTest {
|message Empty {}
""".trimMargin(),
)
fs.add(
"google/src/main/proto/google/protobuf/source_context.proto",
"""
|syntax = "proto2";
|package google.protobuf;
|message SourceContext {}
""".trimMargin(),
)
fs.add(
"google/src/main/proto/google/protobuf/struct.proto",
"""
Expand All @@ -1859,14 +1843,6 @@ class WireRunTest {
|message Timestamp {}
""".trimMargin(),
)
fs.add(
"google/src/main/proto/google/protobuf/type.proto",
"""
|syntax = "proto2";
|package google.protobuf;
|message Type {}
""".trimMargin(),
)
fs.add(
"google/src/main/proto/google/protobuf/wrappers.proto",
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,23 @@ fun isWireRuntimeProto(location: Location): Boolean {
/** Returns true if [path] is bundled in the wire runtime. */
fun isWireRuntimeProto(path: String): Boolean {
return path == ANY_PROTO ||
path == API_PROTO ||
path == DESCRIPTOR_PROTO ||
path == DURATION_PROTO ||
path == EMPTY_PROTO ||
path == SOURCE_CONTEXT_PROTO ||
path == STRUCT_PROTO ||
path == TIMESTAMP_PROTO ||
path == TYPE_PROTO ||
path == WIRE_EXTENSIONS_PROTO ||
path == WRAPPERS_PROTO
path == WRAPPERS_PROTO ||
path == WIRE_EXTENSIONS_PROTO
}

internal const val DESCRIPTOR_PROTO = "google/protobuf/descriptor.proto"
internal const val WIRE_EXTENSIONS_PROTO = "wire/extensions.proto"

private const val ANY_PROTO = "google/protobuf/any.proto"
private const val API_PROTO = "google/protobuf/api.proto"
private const val DURATION_PROTO = "google/protobuf/duration.proto"
private const val EMPTY_PROTO = "google/protobuf/empty.proto"
private const val SOURCE_CONTEXT_PROTO = "google/protobuf/source_context.proto"
private const val STRUCT_PROTO = "google/protobuf/struct.proto"
private const val TIMESTAMP_PROTO = "google/protobuf/timestamp.proto"
private const val TYPE_PROTO = "google/protobuf/type.proto"
private const val WRAPPERS_PROTO = "google/protobuf/wrappers.proto"

/** A special base directory used for Wire's built-in .proto files. */
Expand Down
207 changes: 0 additions & 207 deletions wire-schema/src/jvmMain/resources/google/protobuf/api.proto

This file was deleted.

This file was deleted.

Loading

0 comments on commit a250440

Please sign in to comment.