Skip to content

Commit

Permalink
Include the source file name in the generated header (google#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdm authored Sep 7, 2018
1 parent ed85e03 commit 8c22ab8
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
## 0.10.2

* Add link to source file in generated code.

## 0.10.1

* Breaking change: Prefix generated Dart proto imports by proto file path instead of by package.
* Prefix generated Dart proto imports by proto file path instead of by package.
Tighten up member name checks for generated enum classes.
Requires package:protobuf version 0.10.2 or newer.

## 0.10.0

Expand Down
1 change: 1 addition & 0 deletions lib/file_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ import 'package:grpc/grpc.dart';
out.println('''
///
// Generated code. Do not modify.
// source: ${descriptor.name}
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
''');
Expand Down
1 change: 1 addition & 0 deletions lib/src/dart_options.pb.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: dart_options.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions lib/src/descriptor.pb.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: descriptor.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions lib/src/descriptor.pbenum.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: descriptor.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions lib/src/plugin.pb.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: plugin.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: protoc_plugin
version: 0.10.1
version: 0.10.2
author: Dart Team <[email protected]>
description: Protoc compiler plugin to generate Dart code
homepage: https://github.com/dart-lang/dart-protoc-plugin
Expand Down
1 change: 1 addition & 0 deletions test/goldens/grpc_service.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/grpc_service.pbgrpc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/header_in_package.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/header_with_fixnum.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/imports.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/imports.pbjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

1 change: 1 addition & 0 deletions test/goldens/oneMessage.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/oneMessage.pbjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/service.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/service.pbserver
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/topLevelEnum.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/topLevelEnum.pbenum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down
1 change: 1 addition & 0 deletions test/goldens/topLevelEnum.pbjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///
// Generated code. Do not modify.
// source: test
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import

Expand Down

0 comments on commit 8c22ab8

Please sign in to comment.