From 8c20e55c57c90a1a84ac7cf4de96e65911c8212b Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Fri, 17 Jun 2016 10:31:05 -0400 Subject: Add new generation option for using proto sources from other frameworks. - Better docs in the generator for the different options that can be passed during an invoke of protoc. - Add named_framework_to_proto_path_mappings_path to pass the path to a file containing mappings of frameworks for different proto files. - Update the generation to use the mapping to change the #import directives it creates. Note: the changes in helpers is mostly moving code within the fine, and then a small change to expose the parsing so a passed on class can consume the line. Fixes https://github.com/google/protobuf/issues/1457 --- objectivec/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'objectivec/README.md') diff --git a/objectivec/README.md b/objectivec/README.md index beda2cb6..25355e05 100644 --- a/objectivec/README.md +++ b/objectivec/README.md @@ -146,6 +146,29 @@ supported keys are: of being plain `#import "some/path/file.pbobjc.h"` lines, they will be framework based, i.e. - `#import `. + _NOTE:_ If this is used with `named_framework_to_proto_path_mappings_path`, + then this is effectively the _default_ to use for everything that wasn't + mapped by the other. + + * `named_framework_to_proto_path_mappings_path`: The `value` used for this key + is a path to a file containing the listing of framework names and proto + files. The generator uses this to decide if another proto file referenced + should use a framework style import vs. a user level import + (`#import ` vs `#import "dir/file.pbobjc.h"`). + + The format of the file is: + * An entry is a line of `frameworkName: file.proto, dir/file2.proto`. + * Comments start with `#`. + * A comment can go on a line after an entry. + (i.e. - `frameworkName: file.proto # comment`) + + Any number of files can be listed for a framework, just separate them with + commas. + + There can be multiple lines listing the same frameworkName incase it has a + lot of proto files included in it; and having multiple lines makes things + easier to read. + Contributing ------------ -- cgit v1.2.3