Skip to content
Draft
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: 2 additions & 0 deletions protobuf/lib/meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

/// Provides metadata about GeneratedMessage and ProtobufEnum to
/// dart-protoc-plugin. (Experimental API; subject to change.)
/// @nodoc
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/protobuf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

/// Runtime library for Dart implementation of [protobufs][1].
///
/// [1]: https://developers.google.com/protocol-buffers
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/annotations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

/// Annotation for marking accessors that belong together.
class TagNumber {
final int tagNumber;
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/builder_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// Per-message type setup.
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/coded_buffer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

void _writeToCodedBufferWriter(FieldSet fs, CodedBufferWriter out) {
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/coded_buffer_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// Reader used for converting binary-encoded protobufs into
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/coded_buffer_writer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

// ignore_for_file: constant_identifier_names

part of 'internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/consts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

/// Constant string value of `double.infinity.toString()` and the infinity
/// value recognized by `double.parse(..)`.
const infinity = 'Infinity';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/exceptions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

const _truncatedMessageText = '''
While parsing a protocol message, the input ended unexpectedly
in the middle of a field. This could either mean that the input
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// An object representing an extension field.
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/extension_field_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

class ExtensionFieldSet {
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/extension_registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// A collection of [Extension] objects, organized by the message type they
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/field_error.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// Returns the error message for an invalid field value,
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/field_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// An object representing a protobuf message field.
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/field_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

@pragma('vm:never-inline')
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/field_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

// ignore_for_file: constant_identifier_names,non_constant_identifier_names
part of 'internal.dart';

Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/generated_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

// ignore_for_file: non_constant_identifier_names

part of 'internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/generated_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// Server side context.
Expand Down
4 changes: 3 additions & 1 deletion protobuf/lib/src/protobuf/internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

/// Runtime library for Dart implementation of [protobufs][1].
///
/// [1]: https://developers.google.com/protocol-buffers
Expand All @@ -26,7 +28,7 @@ import 'permissive_compare.dart';
import 'type_registry.dart';
import 'utils.dart';

export 'annotations.dart' show TagNumber, GrpcServiceName;
export 'annotations.dart' show GrpcServiceName, TagNumber;
export 'exceptions.dart' show InvalidProtocolBufferException;
export 'pb_list.dart' show PbList;
export 'pb_map.dart' show PbMap;
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/json/json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:convert' show base64Decode, base64Encode;

import 'package:fixnum/fixnum.dart' show Int64;
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/json/json_vm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:convert' show jsonDecode, jsonEncode;

import '../internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/json/json_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:convert' show base64Decode, base64Encode;
import 'dart:js_interop';
import 'dart:js_interop_unsafe';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/json_parsing_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

class JsonParsingContext {
// A list of indices into maps and lists pointing to the current root.
final List<String> _path = <String>[];
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/message_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

const _messageSetItemsTag = 1;
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/mixins/map_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import '../../../protobuf.dart' show BuilderInfo;

/// Note that this class does not claim to implement [Map]. Instead, this needs
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/mixins/well_known.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:convert';

import 'package:fixnum/fixnum.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/pb_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:collection' show ListBase;
import 'dart:math' as math;

Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/pb_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:collection' show MapBase;

import 'internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/permissive_compare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

/// Returns true if [a] and [b] are the same ignoring case and all instances of
/// `-` and `_`.
///
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/proto3_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

// Public because this is called from the mixins library.
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/protobuf_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

// ignore_for_file: non_constant_identifier_names

part of 'internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/rpc_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// Client side context for [RpcClient]s.
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/type_registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import '../../protobuf.dart';

/// A TypeRegistry is used to resolve Any messages in the proto3 JSON conversion.
Expand Down
4 changes: 3 additions & 1 deletion protobuf/lib/src/protobuf/unknown_field_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// A set of unknown fields in a [GeneratedMessage].
Expand Down Expand Up @@ -265,7 +267,7 @@ class UnknownFieldSet {
}

UnknownFieldSet _deepCopy() {
Map<int, UnknownFieldSetField> newFields = {};
final newFields = <int, UnknownFieldSetField>{};
for (final entry in _fields.entries) {
final key = entry.key;
final value = entry.value;
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/unpack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

part of 'internal.dart';

/// Unpacks the message in [value] into [instance].
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'package:fixnum/fixnum.dart' show Int64;

import 'internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/lib/src/protobuf/wire_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

// ignore_for_file: constant_identifier_names

part of 'internal.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/test/builder_info_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'package:protobuf/protobuf.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 2 additions & 0 deletions protobuf/test/codec_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:typed_data';

import 'package:protobuf/protobuf.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/test/coded_buffer_reader_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'dart:typed_data';

import 'package:protobuf/protobuf.dart';
Expand Down
2 changes: 2 additions & 0 deletions protobuf/test/dummy_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

import 'package:protobuf/protobuf.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 2 additions & 0 deletions protobuf/test/json_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=3.7

// Basic smoke tests for the GeneratedMessage JSON API.
//
// There are more JSON tests in the dart-protoc-plugin package.
Expand Down
Loading