-
Notifications
You must be signed in to change notification settings - Fork 189
Remove type check function for repeated fields #198
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
Conversation
49fb4d0
to
e6a1ce8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
// Deprecated, use [pc] instead. | ||
@deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a deprecated constructor that takes the description as an argument https://api.dartlang.org/stable/2.1.0/dart-core/Deprecated-class.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also mention in the docstring that the check is ignored.
@@ -67,7 +67,7 @@ class PbFieldType { | |||
|
|||
// Closures commonly used by initializers. | |||
static String _STRING_EMPTY() => ''; | |||
static List<int> _BYTES_EMPTY() => new PbList<int>(check: _checkInt); | |||
static List<int> _BYTES_EMPTY() => new PbList<int>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should never have been a pblist.
@@ -48,6 +48,7 @@ class PbList<E> extends PbListBase<E> { | |||
|
|||
PbList.from(List from) : super._from(from); | |||
|
|||
@deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here add explanation
cc @mkustermann this removes one of the closures from GeneratedMessage instances. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
13266ae
to
ccb7b5e
Compare
PTAL |
@@ -325,12 +325,4 @@ abstract class PbListBase<E> extends ListBase<E> { | |||
} | |||
_wrappedList.length = newLength; | |||
} | |||
|
|||
void _validate(E val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh...
} else if (type.isEnum) { | ||
out.println(', $_protobufImportPrefix.checkNotNull, null, ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember to make checkNotNull private again.
protoc_plugin/pubspec.yaml
Outdated
@@ -10,7 +10,7 @@ environment: | |||
dependencies: | |||
fixnum: ^0.10.5 | |||
path: ^1.0.0 | |||
protobuf: ^0.13.2 | |||
protobuf: ^0.13.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.13.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #201