Skip to content

Rebuild proto artifacts from existing sources and update README.md instructions. #1058

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

Merged
merged 1 commit into from
Apr 11, 2018
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 Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
10 changes: 8 additions & 2 deletions Firestore/Protos/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## Usage

First, build protobuf and nanopb
First, make sure you have necessary prereqs for building:
```
brew install automake libtool protobuf
```

Take a nap while that completes. Then, build protobuf and nanopb:
```
cd firebase-ios-sdk
mkdir -p build
Expand All @@ -15,7 +20,8 @@ cd firebase-ios-sdk/Firestore/Protos
./build-protos.sh
```

Verify diffs, tests and make PR
Verify diffs (you'll likely need to re-add copyright notices, etc.), make sure
tests still pass, and create a PR.

### Script Details

Expand Down
5 changes: 3 additions & 2 deletions Firestore/Protos/nanopb/firestore/local/target.pb.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
/* Generated by nanopb-0.3.8 at Mon Apr 9 15:08:47 2018. */

#include "target.pb.h"

Expand All @@ -36,10 +36,11 @@ const pb_field_t firestore_client_Target_fields[7] = {
PB_LAST_FIELD
};

const pb_field_t firestore_client_TargetGlobal_fields[4] = {
const pb_field_t firestore_client_TargetGlobal_fields[5] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_TargetGlobal, highest_target_id, highest_target_id, 0),
PB_FIELD( 2, INT64 , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, highest_listen_sequence_number, highest_target_id, 0),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, last_remote_snapshot_version, highest_listen_sequence_number, &google_protobuf_Timestamp_fields),
PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, target_count, last_remote_snapshot_version, 0),
PB_LAST_FIELD
};

Expand Down
12 changes: 7 additions & 5 deletions Firestore/Protos/nanopb/firestore/local/target.pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
/* Generated by nanopb-0.3.8 at Mon Apr 9 15:08:47 2018. */

#ifndef PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED
Expand Down Expand Up @@ -52,16 +52,17 @@ typedef struct _firestore_client_TargetGlobal {
int32_t highest_target_id;
int64_t highest_listen_sequence_number;
google_protobuf_Timestamp last_remote_snapshot_version;
int32_t target_count;
/* @@protoc_insertion_point(struct:firestore_client_TargetGlobal) */
} firestore_client_TargetGlobal;

/* Default values for struct fields */

/* Initializer values for message structs */
#define firestore_client_Target_init_default {0, google_protobuf_Timestamp_init_default, {{NULL}, NULL}, 0, 0, {google_firestore_v1beta1_Target_QueryTarget_init_default}}
#define firestore_client_TargetGlobal_init_default {0, 0, google_protobuf_Timestamp_init_default}
#define firestore_client_TargetGlobal_init_default {0, 0, google_protobuf_Timestamp_init_default, 0}
#define firestore_client_Target_init_zero {0, google_protobuf_Timestamp_init_zero, {{NULL}, NULL}, 0, 0, {google_firestore_v1beta1_Target_QueryTarget_init_zero}}
#define firestore_client_TargetGlobal_init_zero {0, 0, google_protobuf_Timestamp_init_zero}
#define firestore_client_TargetGlobal_init_zero {0, 0, google_protobuf_Timestamp_init_zero, 0}

/* Field tags (for use in manual encoding/decoding) */
#define firestore_client_Target_query_tag 5
Expand All @@ -73,14 +74,15 @@ typedef struct _firestore_client_TargetGlobal {
#define firestore_client_TargetGlobal_highest_target_id_tag 1
#define firestore_client_TargetGlobal_highest_listen_sequence_number_tag 2
#define firestore_client_TargetGlobal_last_remote_snapshot_version_tag 3
#define firestore_client_TargetGlobal_target_count_tag 4

/* Struct field encoding specification for nanopb */
extern const pb_field_t firestore_client_Target_fields[7];
extern const pb_field_t firestore_client_TargetGlobal_fields[4];
extern const pb_field_t firestore_client_TargetGlobal_fields[5];

/* Maximum encoded size of messages (where known) */
/* firestore_client_Target_size depends on runtime parameters */
#define firestore_client_TargetGlobal_size 46
#define firestore_client_TargetGlobal_size 57

/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
Expand Down
58 changes: 43 additions & 15 deletions Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,57 @@
* limitations under the License.
*/

#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h"
#if !GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO
#import "Firestore.pbobjc.h"
#endif

#import <ProtoRPC/ProtoService.h>
#import <ProtoRPC/ProtoRPC.h>
#import <RxLibrary/GRXWriteable.h>
#import <RxLibrary/GRXWriter.h>

#import "Firestore/Protos/objc/google/api/Annotations.pbobjc.h"
#import "Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h"
#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h"
#import "Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h"
#import "Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h"
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/Empty.pbobjc.h>
#else
#import "Empty.pbobjc.h"
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/Timestamp.pbobjc.h>
#if GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO
@class GCFSBatchGetDocumentsRequest;
@class GCFSBatchGetDocumentsResponse;
@class GCFSBeginTransactionRequest;
@class GCFSBeginTransactionResponse;
@class GCFSCommitRequest;
@class GCFSCommitResponse;
@class GCFSCreateDocumentRequest;
@class GCFSDeleteDocumentRequest;
@class GCFSDocument;
@class GCFSGetDocumentRequest;
@class GCFSListCollectionIdsRequest;
@class GCFSListCollectionIdsResponse;
@class GCFSListDocumentsRequest;
@class GCFSListDocumentsResponse;
@class GCFSListenRequest;
@class GCFSListenResponse;
@class GCFSRollbackRequest;
@class GCFSRunQueryRequest;
@class GCFSRunQueryResponse;
@class GCFSUpdateDocumentRequest;
@class GCFSWriteRequest;
@class GCFSWriteResponse;
@class GPBEmpty;
#else
#import "Timestamp.pbobjc.h"
#import "Annotations.pbobjc.h"
#import "Common.pbobjc.h"
#import "Document.pbobjc.h"
#import "Query.pbobjc.h"
#import "Write.pbobjc.h"
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/Empty.pbobjc.h>
#else
#import "Empty.pbobjc.h"
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/Timestamp.pbobjc.h>
#else
#import "Timestamp.pbobjc.h"
#endif
#import "Status.pbobjc.h"
#endif
#import "Firestore/Protos/objc/google/rpc/Status.pbobjc.h"


NS_ASSUME_NONNULL_BEGIN
Expand Down
19 changes: 18 additions & 1 deletion Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,27 @@
* limitations under the License.
*/

#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h"
#import "Firestore.pbrpc.h"
#import "Firestore.pbobjc.h"

#import <ProtoRPC/ProtoRPC.h>
#import <RxLibrary/GRXWriter+Immediate.h>
#import "Annotations.pbobjc.h"
#import "Common.pbobjc.h"
#import "Document.pbobjc.h"
#import "Query.pbobjc.h"
#import "Write.pbobjc.h"
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/Empty.pbobjc.h>
#else
#import "Empty.pbobjc.h"
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/Timestamp.pbobjc.h>
#else
#import "Timestamp.pbobjc.h"
#endif
#import "Status.pbobjc.h"

@implementation GCFSFirestore

Expand Down