Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2020-10-19 11:24:55 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2020-10-19 11:24:55 +0300
commit9f57cc871d8a025039019c2d2fde217591f4e30d (patch)
tree07518c81082f5c0c17e5eb91259366eea15066a1
parent8e2f6e8bfb0fabc1ea452506afa1ba74cab9e3b5 (diff)
Remove outdated transitional generator/nanopb/options.proto.
This was originally introduced as part of trying to merge pull request #241, but I later had to abandon the effort. This file was forgotten and is just confusing. Added a migration note in case someone was using it.
-rw-r--r--docs/migration.md16
-rw-r--r--generator/nanopb/options.proto123
2 files changed, 16 insertions, 123 deletions
diff --git a/docs/migration.md b/docs/migration.md
index a4a14a4..d72ae9b 100644
--- a/docs/migration.md
+++ b/docs/migration.md
@@ -6,6 +6,22 @@ required modifications of user applications are explained. Also any
error indications are included, in order to make it easier to find this
document.
+Nanopb-0.4.4 (2020-xx-xx)
+-------------------------
+
+### Remove outdated generator/nanopb/options.proto
+
+**Changes:** Back in 2018, it was considered in pull request #241 to
+move nanopb generator options to a separate namespace. For this reason,
+a transitional file was added. It was later abandoned and is now removed
+to avoid confusion.
+
+**Required actions:** Most nanopb users probably never used that transitional
+file at all. If your `.proto` files import it, change to using `generator/proto/nanopb.proto`.
+
+**Error indications:** Errors about missing file `options.proto` when running
+the generator.
+
Nanopb-0.4.3 (2020-09-21)
-------------------------
diff --git a/generator/nanopb/options.proto b/generator/nanopb/options.proto
deleted file mode 100644
index b94dca2..0000000
--- a/generator/nanopb/options.proto
+++ /dev/null
@@ -1,123 +0,0 @@
-// This is a transitional file, to provide parallel support between the old
-// nanopb.proto and new options.proto files. Eventually nanopb.proto will
-// be left only for legacy code, but for now the generator is still also
-// using it. However, your new code can start using this file already now.
-// See pull request #241 for details:
-// https://github.com/nanopb/nanopb/pull/241
-
-// Custom options for defining:
-// - Maximum size of string/bytes
-// - Maximum number of elements in array
-//
-// These are used by nanopb to generate statically allocable structures
-// for memory-limited environments.
-
-syntax = "proto2";
-import "google/protobuf/descriptor.proto";
-
-package nanopb;
-option java_package = "fi.kapsi.koti.jpa.nanopb";
-
-enum FieldType {
- FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
- FT_CALLBACK = 1; // Always generate a callback field.
- FT_POINTER = 4; // Always generate a dynamically allocated field.
- FT_STATIC = 2; // Generate a static field or raise an exception if not possible.
- FT_IGNORE = 3; // Ignore the field completely.
- FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead
-}
-
-enum IntSize {
- IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
- IS_8 = 8;
- IS_16 = 16;
- IS_32 = 32;
- IS_64 = 64;
-}
-
-// This is the inner options message, which basically defines options for
-// a field. When it is used in message or file scope, it applies to all
-// fields.
-message Options {
- // Allocated size for 'bytes' and 'string' fields.
- // For string fields, this should include the space for null terminator.
- optional int32 max_size = 1;
-
- // Maximum length for 'string' fields. Setting this is equivalent
- // to setting max_size to a value of length+1.
- optional int32 max_length = 14;
-
- // Allocated number of entries in arrays ('repeated' fields)
- optional int32 max_count = 2;
-
- // Size of integer fields. Can save some memory if you don't need
- // full 32 bits for the value.
- optional IntSize int_size = 7 [default = IS_DEFAULT];
-
- // Force type of field (callback or static allocation)
- optional FieldType type = 3 [default = FT_DEFAULT];
-
- // Use long names for enums, i.e. EnumName_EnumValue.
- optional bool long_names = 4 [default = true];
-
- // Add 'packed' attribute to generated structs.
- // Note: this cannot be used on CPUs that break on unaligned
- // accesses to variables.
- optional bool packed_struct = 5 [default = false];
-
- // Add 'packed' attribute to generated enums.
- optional bool packed_enum = 10 [default = false];
-
- // Skip this message
- optional bool skip_message = 6 [default = false];
-
- // Generate oneof fields as normal optional fields instead of union.
- optional bool no_unions = 8 [default = false];
-
- // integer type tag for a message
- optional uint32 msgid = 9;
-
- // decode oneof as anonymous union
- optional bool anonymous_oneof = 11 [default = false];
-
- // Proto3 singular field does not generate a "has_" flag
- optional bool proto3 = 12 [default = false];
-
- // Generate an enum->string mapping function (can take up lots of space).
- optional bool enum_to_string = 13 [default = false];
-
- // Generate bytes arrays with fixed length
- optional bool fixed_length = 15 [default = false];
-
- // Generate repeated field with fixed count
- optional bool fixed_count = 16 [default = false];
-}
-
-// Extensions to protoc 'Descriptor' type in order to define options
-// inside a .proto file.
-//
-// Protocol Buffers extension number registry
-// --------------------------------
-// Project: Nanopb
-// Contact: Petteri Aimonen <jpa@kapsi.fi>
-// Web site: http://kapsi.fi/~jpa/nanopb
-// Extensions: 1010 (all types)
-// --------------------------------
-
-extend google.protobuf.FileOptions {
- optional Options fileopt = 1010;
-}
-
-extend google.protobuf.MessageOptions {
- optional Options msgopt = 1010;
-}
-
-extend google.protobuf.EnumOptions {
- optional Options enumopt = 1010;
-}
-
-extend google.protobuf.FieldOptions {
- optional Options fieldopt = 1010;
-}
-
-