File tree 3 files changed +15
-10
lines changed
java/src/main/java/com/github/dart_lang/jnigen/apisummarizer
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- ** Breaking Change** ([ #660 ] ( https://github.com/dart-lang/native/issues/660 ) ):
4
4
Removed C-based bindings. Now all bindings are Dart-only.
5
- - Expand constraint on ` package:cli_config ` to allow ` ^0.2.0 ` .
6
- - Ignore ` use_super_parameters ` lint in generated files.
5
+ - Expanded constraint on ` package:cli_config ` to allow ` ^0.2.0 ` .
6
+ - Ignored ` use_super_parameters ` lint in generated files.
7
+ - Fixed a bug in summarizer and improved the display of errors.
7
8
8
9
## 0.8.0
9
10
Original file line number Diff line number Diff line change 1
1
package com .github .dart_lang .jnigen .apisummarizer ;
2
2
3
+ import java .io .PrintWriter ;
3
4
import java .util .Arrays ;
4
5
import org .apache .commons .cli .*;
5
6
@@ -63,15 +64,22 @@ public static SummarizerOptions parseArgs(String[] args) {
63
64
try {
64
65
cmd = parser .parse (options , args );
65
66
if (cmd .getArgs ().length < 1 ) {
66
- throw new ParseException ("Need to specify paths to source files " );
67
+ throw new ParseException ("Need to specify the package or class names " );
67
68
}
68
69
} catch (ParseException e ) {
69
- System .out .println (e .getMessage ());
70
+ System .err .println (e .getMessage ());
70
71
help .printHelp (
72
+ new PrintWriter (System .err , true ),
73
+ help .getWidth (),
71
74
"java -jar <JAR> [-s <SOURCE_DIR=.>] "
72
75
+ "[-c <CLASSES_JAR>] <CLASS_OR_PACKAGE_NAMES>\n "
73
76
+ "Class or package names should be fully qualified.\n \n " ,
74
- options );
77
+ null ,
78
+ options ,
79
+ help .getLeftPadding (),
80
+ help .getDescPadding (),
81
+ null ,
82
+ false );
75
83
System .exit (1 );
76
84
throw new RuntimeException ("Unreachable code" );
77
85
}
Original file line number Diff line number Diff line change @@ -71,11 +71,7 @@ class SummarizerCommand {
71
71
final joined = paths
72
72
.map ((uri) => uri.toFilePath ())
73
73
.join (Platform .isWindows ? ';' : ':' );
74
- if (option.endsWith ("=" )) {
75
- args.add (option + joined);
76
- } else {
77
- args.addAll ([option, joined]);
78
- }
74
+ args.addAll ([option, '"$joined "' ]);
79
75
}
80
76
}
81
77
You can’t perform that action at this time.
0 commit comments