File tree Expand file tree Collapse file tree 11 files changed +64
-10
lines changed
platform_tests/alternate_language_test_plugin/android/src/main Expand file tree Collapse file tree 11 files changed +64
-10
lines changed Original file line number Diff line number Diff line change 1+ ## 4.2.6
2+
3+ * Fixes bug with parsing documentation comments that start with '/'.
4+
15## 4.2.5
26
37* [ dart] Fixes enum parameter handling in Dart test API class.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import 'dart:mirrors';
99import 'ast.dart' ;
1010
1111/// The current version of pigeon. This must match the version in pubspec.yaml.
12- const String pigeonVersion = '4.2.5 ' ;
12+ const String pigeonVersion = '4.2.6 ' ;
1313
1414/// Read all the content from [stdin] to a String.
1515String readStdin () {
@@ -474,7 +474,10 @@ void addDocumentationComments(
474474 indent.writeln (commentSpec.openCommentToken);
475475 currentLineOpenToken = commentSpec.blockContinuationToken;
476476 }
477- for (final String line in allComments) {
477+ for (String line in allComments) {
478+ if (line.isNotEmpty && line[0 ] != ' ' ) {
479+ line = ' $line ' ;
480+ }
478481 indent.writeln (
479482 '$currentLineOpenToken $line ' ,
480483 );
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ import 'package:pigeon/pigeon.dart';
2020/// This comment is to test enum documentation comments.
2121///
2222/// This comment also tests multiple line comments.
23+ ///
24+ ///////////////////////////
25+ /// This comment also tests comments that start with '/'
26+ ///////////////////////////
2327enum MessageRequestState {
2428 pending,
2529 success,
Original file line number Diff line number Diff line change 22# changes on generated files. This will need a way to avoid unnecessary churn,
33# such as a flag to suppress version stamp generation.
44* .java
5- ! AlternateLanguageTestPlugin.kt
5+ ! AlternateLanguageTestPlugin.java
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: pigeon
22description : Code generator tool to make communication between Flutter and the host platform type-safe and easier.
33repository : https://github.com/flutter/packages/tree/main/packages/pigeon
44issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apigeon
5- version : 4.2.5 # This must match the version in lib/generator_tools.dart
5+ version : 4.2.6 # This must match the version in lib/generator_tools.dart
66
77environment :
88 sdk : " >=2.12.0 <3.0.0"
Original file line number Diff line number Diff line change @@ -1062,6 +1062,9 @@ void main() {
10621062 ];
10631063 int count = 0 ;
10641064
1065+ final List <String > unspacedComments = < String > ['////////' ];
1066+ int unspacedCount = 0 ;
1067+
10651068 final Root root = Root (
10661069 apis: < Api > [
10671070 Api (
@@ -1107,7 +1110,10 @@ void main() {
11071110 enums: < Enum > [
11081111 Enum (
11091112 name: 'enum' ,
1110- documentationComments: < String > [comments[count++ ]],
1113+ documentationComments: < String > [
1114+ comments[count++ ],
1115+ unspacedComments[unspacedCount++ ]
1116+ ],
11111117 members: < String > [
11121118 'one' ,
11131119 'two' ,
@@ -1121,6 +1127,7 @@ void main() {
11211127 for (final String comment in comments) {
11221128 expect (code, contains ('//$comment ' ));
11231129 }
1130+ expect (code, contains ('// ///' ));
11241131 });
11251132
11261133 test ('doesnt create codecs if no custom datatypes' , () {
Original file line number Diff line number Diff line change @@ -1174,6 +1174,10 @@ name: foobar
11741174 ' enum comment' ,
11751175 ];
11761176 int count = 0 ;
1177+
1178+ final List <String > unspacedComments = < String > ['////////' ];
1179+ int unspacedCount = 0 ;
1180+
11771181 final Root root = Root (
11781182 apis: < Api > [
11791183 Api (
@@ -1219,7 +1223,10 @@ name: foobar
12191223 enums: < Enum > [
12201224 Enum (
12211225 name: 'enum' ,
1222- documentationComments: < String > [comments[count++ ]],
1226+ documentationComments: < String > [
1227+ comments[count++ ],
1228+ unspacedComments[unspacedCount++ ]
1229+ ],
12231230 members: < String > [
12241231 'one' ,
12251232 'two' ,
@@ -1233,6 +1240,7 @@ name: foobar
12331240 for (final String comment in comments) {
12341241 expect (code, contains ('///$comment ' ));
12351242 }
1243+ expect (code, contains ('/// ///' ));
12361244 });
12371245
12381246 test ('doesnt create codecs if no custom datatypes' , () {
Original file line number Diff line number Diff line change @@ -1139,6 +1139,9 @@ void main() {
11391139 ];
11401140 int count = 0 ;
11411141
1142+ final List <String > unspacedComments = < String > ['////////' ];
1143+ int unspacedCount = 0 ;
1144+
11421145 final Root root = Root (
11431146 apis: < Api > [
11441147 Api (
@@ -1185,7 +1188,10 @@ void main() {
11851188 enums: < Enum > [
11861189 Enum (
11871190 name: 'enum' ,
1188- documentationComments: < String > [comments[count++ ]],
1191+ documentationComments: < String > [
1192+ comments[count++ ],
1193+ unspacedComments[unspacedCount++ ]
1194+ ],
11891195 members: < String > [
11901196 'one' ,
11911197 'two' ,
@@ -1204,6 +1210,7 @@ void main() {
12041210 .hasMatch (code),
12051211 true );
12061212 }
1213+ expect (code, isNot (contains ('*//' )));
12071214 });
12081215
12091216 test ('doesnt create codecs if no custom datatypes' , () {
Original file line number Diff line number Diff line change @@ -1019,6 +1019,9 @@ void main() {
10191019 ];
10201020 int count = 0 ;
10211021
1022+ final List <String > unspacedComments = < String > ['////////' ];
1023+ int unspacedCount = 0 ;
1024+
10221025 final Root root = Root (
10231026 apis: < Api > [
10241027 Api (
@@ -1065,7 +1068,10 @@ void main() {
10651068 enums: < Enum > [
10661069 Enum (
10671070 name: 'enum' ,
1068- documentationComments: < String > [comments[count++ ]],
1071+ documentationComments: < String > [
1072+ comments[count++ ],
1073+ unspacedComments[unspacedCount++ ]
1074+ ],
10691075 members: < String > [
10701076 'one' ,
10711077 'two' ,
@@ -1084,6 +1090,7 @@ void main() {
10841090 .hasMatch (code),
10851091 true );
10861092 }
1093+ expect (code, isNot (contains ('*//' )));
10871094 });
10881095
10891096 test ('doesnt create codecs if no custom datatypes' , () {
Original file line number Diff line number Diff line change @@ -1751,6 +1751,9 @@ void main() {
17511751 ];
17521752 int count = 0 ;
17531753
1754+ final List <String > unspacedComments = < String > ['////////' ];
1755+ int unspacedCount = 0 ;
1756+
17541757 final Root root = Root (
17551758 apis: < Api > [
17561759 Api (
@@ -1797,7 +1800,10 @@ void main() {
17971800 enums: < Enum > [
17981801 Enum (
17991802 name: 'enum' ,
1800- documentationComments: < String > [comments[count++ ]],
1803+ documentationComments: < String > [
1804+ comments[count++ ],
1805+ unspacedComments[unspacedCount++ ]
1806+ ],
18011807 members: < String > [
18021808 'one' ,
18031809 'two' ,
@@ -1811,6 +1817,7 @@ void main() {
18111817 for (final String comment in comments) {
18121818 expect (code, contains ('///$comment ' ));
18131819 }
1820+ expect (code, contains ('/// ///' ));
18141821 });
18151822
18161823 test ('doesnt create codecs if no custom datatypes' , () {
You can’t perform that action at this time.
0 commit comments