Skip to content

Commit

Permalink
Wrong output path with manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkoutso committed Aug 14, 2023
1 parent a551023 commit 9f92767
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wire-runtime-swift/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ val generateTestProtos by tasks.creating(JavaExec::class) {
mainClass.set("com.squareup.wire.WireCompiler")
args = listOf(
"--proto_path=$protoPath",
"--swift_out=$swiftOut"
"--swift_out=$swiftOut",
"--experimental-module-manifest=$protoPath/manifest.yml"
)
}

Expand Down
14 changes: 14 additions & 0 deletions wire-runtime-swift/src/test/proto/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
squareup_protos_rpc:
roots:
- squareup.protos.rpc.Response
prunes:
- google.protobuf.*
squareup_protos_sync:
roots:
- squareup.protos.sync.GetResponse
- squareup.protos.sync.SyncErrorCode
dependencies:
- squareup_protos_rpc
prunes:
- google.protobuf.*
22 changes: 22 additions & 0 deletions wire-runtime-swift/src/test/proto/rpc/rpc.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2023 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";

package squareup.protos.rpc;

message Response {
optional string something = 1;
}
34 changes: 34 additions & 0 deletions wire-runtime-swift/src/test/proto/rpc/sync.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2023 Square Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";

package squareup.protos.sync;

import "rpc/rpc.proto";

enum SyncErrorCode {
SESSION_EXPIRED = 1;
UNAUTHORIZED = 2;
}

message GetResponse {
optional string name = 1;
optional SyncErrorCode sync_error_code = 2;
}

extend squareup.protos.rpc.Response {
optional SyncErrorCode sync_error_code = 3;
}

0 comments on commit 9f92767

Please sign in to comment.