Skip to content

Commit

Permalink
Update protobuf github url (#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k authored Aug 6, 2024
1 parent 8603a96 commit 6291978
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/markdown/customizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ In proto 3, unlike proto 2, primitives are not wrapped in an option by default.
The standard technique to obtain an optional primitive is to wrap it inside a
message (since messages are provided inside an `Option`). Google provides
standard wrappers to the primitive types in
[wrappers.proto](https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto).
[wrappers.proto](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto).

`primitive_wrappers` is enabled by default for ScalaPB>=0.6.0. Whenever one
of the standard wrappers is used, it will be mapped to `Option[X]` where `X`
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/main/protobuf/issue286_flat.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto2";

// We can't have the flat_package file in the main e2e protobuf directory
// due to https://github.com/google/protobuf/issues/3114
// due to https://github.com/protocolbuffers/protobuf/issues/3114
import "scalapb/scalapb.proto";

option (scalapb.options).flat_package = true;
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/main/protobuf/issue286_flat2.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto2";

// We can't have the flat_package file in the main e2e protobuf directory
// due to https://github.com/google/protobuf/issues/3114
// due to https://github.com/protocolbuffers/protobuf/issues/3114
import "scalapb/scalapb.proto";

option (scalapb.options).flat_package = true;
Expand Down
2 changes: 1 addition & 1 deletion protobuf/scalapb/scalapb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message ScalaPbOptions {
optional bool single_file = 5;

// By default, wrappers defined at
// https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto,
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto,
// are mapped to an Option[T] where T is a primitive type. When this field
// is set to true, we do not perform this transformation.
optional bool no_primitive_wrappers = 7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class EnumDescriptor private[descriptors] (
def findValueByNumber(number: Int): Option[EnumValueDescriptor] = values.find(_.number == number)

// We port the trick described here to Scala:
// https://github.com/google/protobuf/blob/d36c0c538a545fac5d9db6ba65c525246d4efa95/java/core/src/main/java/com/google/protobuf/Descriptors.java#L1600
// https://github.com/protocolbuffers/protobuf/blob/d36c0c538a545fac5d9db6ba65c525246d4efa95/java/core/src/main/java/com/google/protobuf/Descriptors.java#L1600
// With one difference that we use an Option[Int] as key instead of java.lang.Integer. We need to have the key
// reachable from the EnumValueDescriptor, so we take advantage of enumValueDescriptor.proto.number which happens
// to be Option[Int].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package scalapb.options
* to a single Scala file.
* @param noPrimitiveWrappers
* By default, wrappers defined at
* https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto,
* https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto,
* are mapped to an Option[T] where T is a primitive type. When this field
* is set to true, we do not perform this transformation.
* @param primitiveWrappers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import org.scalacheck.Prop._

class FieldMaskUtilPropSpec extends ScalaCheckSuite {
// protobuf-java use guava
// https://github.com/google/protobuf/blob/v3.6.0/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java#L175
// https://github.com/google/protobuf/blob/v3.6.0/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java#L159
// https://github.com/protocolbuffers/protobuf/blob/v3.6.0/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java#L175
// https://github.com/protocolbuffers/protobuf/blob/v3.6.0/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java#L159

// protobuf-java convert only ASCII characters
// e.g. `'\u00E0'.toUpper == '\u00C0'` but protobuf-java does not convert these characters
Expand Down

0 comments on commit 6291978

Please sign in to comment.