@@ -131,55 +131,57 @@ class Options {
131131 this .dynamicModule = false ,
132132 this .precompiledMacros = const [],
133133 this .macroSerializationMode,
134- }) : emitLibraryBundle = canaryFeatures &&
135- moduleFormats.length == 1 &&
136- moduleFormats.single == ModuleFormat .ddc;
134+ }) : emitLibraryBundle =
135+ canaryFeatures &&
136+ moduleFormats.length == 1 &&
137+ moduleFormats.single == ModuleFormat .ddc;
137138
138139 Options .fromArguments (ArgResults args)
139- : this (
140- sourceMap: args['source-map' ] as bool ,
141- inlineSourceMap: args['inline-source-map' ] as bool ,
142- summarizeApi: args['summarize' ] as bool ,
143- enableAsserts: args['enable-asserts' ] as bool ,
144- replCompile: args['repl-compile' ] as bool ,
145- emitDebugMetadata: args['experimental-emit-debug-metadata' ] as bool ,
146- emitDebugSymbols: args['emit-debug-symbols' ] as bool ,
147- emitFullCompiledKernel:
148- args['experimental-output-compiled-kernel' ] as bool ,
149- reloadLastAcceptedKernel:
150- args['reload-last-accepted-kernel' ] as String ? ,
151- reloadDeltaKernel: args['reload-delta-kernel' ] as String ? ,
152- summaryModules: _parseCustomSummaryModules (
153- args['summary' ] as List <String >,
154- ),
155- moduleFormats: parseModuleFormatOption (args),
156- moduleName: _getModuleName (args),
157- multiRootScheme: args['multi-root-scheme' ] as String ,
158- multiRootOutputPath: args['multi-root-output-path' ] as String ? ,
159- experiments: parseExperimentalArguments (
160- args['enable-experiment' ] as List <String >,
161- ),
162- canaryFeatures: args['canary' ] as bool ,
163- dynamicModule: args['dynamic-module' ] as bool ,
164- precompiledMacros: args['precompiled-macro' ] as List <String >,
165- macroSerializationMode: args['macro-serialization-mode' ] as String ? ,
166- );
140+ : this (
141+ sourceMap: args['source-map' ] as bool ,
142+ inlineSourceMap: args['inline-source-map' ] as bool ,
143+ summarizeApi: args['summarize' ] as bool ,
144+ enableAsserts: args['enable-asserts' ] as bool ,
145+ replCompile: args['repl-compile' ] as bool ,
146+ emitDebugMetadata: args['experimental-emit-debug-metadata' ] as bool ,
147+ emitDebugSymbols: args['emit-debug-symbols' ] as bool ,
148+ emitFullCompiledKernel:
149+ args['experimental-output-compiled-kernel' ] as bool ,
150+ reloadLastAcceptedKernel:
151+ args['reload-last-accepted-kernel' ] as String ? ,
152+ reloadDeltaKernel: args['reload-delta-kernel' ] as String ? ,
153+ summaryModules: _parseCustomSummaryModules (
154+ args['summary' ] as List <String >,
155+ ),
156+ moduleFormats: parseModuleFormatOption (args),
157+ moduleName: _getModuleName (args),
158+ multiRootScheme: args['multi-root-scheme' ] as String ,
159+ multiRootOutputPath: args['multi-root-output-path' ] as String ? ,
160+ experiments: parseExperimentalArguments (
161+ args['enable-experiment' ] as List <String >,
162+ ),
163+ canaryFeatures: args['canary' ] as bool ,
164+ dynamicModule: args['dynamic-module' ] as bool ,
165+ precompiledMacros: args['precompiled-macro' ] as List <String >,
166+ macroSerializationMode: args['macro-serialization-mode' ] as String ? ,
167+ );
167168
168169 Options .fromSdkRequiredArguments (ArgResults args)
169- : this (
170- summarizeApi: false ,
171- moduleFormats: parseModuleFormatOption (args),
172- // When compiling the SDK use dart_sdk as the default. This is the
173- // assumed name in various places around the build systems.
174- moduleName:
175- args['module-name' ] != null ? _getModuleName (args) : 'dart_sdk' ,
176- multiRootScheme: args['multi-root-scheme' ] as String ,
177- multiRootOutputPath: args['multi-root-output-path' ] as String ? ,
178- experiments: parseExperimentalArguments (
179- args['enable-experiment' ] as List <String >,
180- ),
181- canaryFeatures: args['canary' ] as bool ,
182- );
170+ : this (
171+ summarizeApi: false ,
172+ moduleFormats: parseModuleFormatOption (args),
173+ // When compiling the SDK use dart_sdk as the default. This is the
174+ // assumed name in various places around the build systems.
175+ moduleName: args['module-name' ] != null
176+ ? _getModuleName (args)
177+ : 'dart_sdk' ,
178+ multiRootScheme: args['multi-root-scheme' ] as String ,
179+ multiRootOutputPath: args['multi-root-output-path' ] as String ? ,
180+ experiments: parseExperimentalArguments (
181+ args['enable-experiment' ] as List <String >,
182+ ),
183+ canaryFeatures: args['canary' ] as bool ,
184+ );
183185
184186 static void addArguments (ArgParser parser, {bool hide = true }) {
185187 addSdkRequiredArguments (parser, hide: hide);
@@ -188,7 +190,8 @@ class Options {
188190 ..addMultiOption (
189191 'summary' ,
190192 abbr: 's' ,
191- help: 'API summary file(s) of imported libraries, optionally\n '
193+ help:
194+ 'API summary file(s) of imported libraries, optionally\n '
192195 'with module import path: -s path.dill=js/import/path' ,
193196 )
194197 ..addFlag (
@@ -217,7 +220,8 @@ class Options {
217220 )
218221 ..addFlag (
219222 'repl-compile' ,
220- help: 'Compile in a more permissive REPL mode, allowing access'
223+ help:
224+ 'Compile in a more permissive REPL mode, allowing access'
221225 ' to private members across library boundaries. This should'
222226 ' only be used by debugging tools.' ,
223227 defaultsTo: false ,
@@ -227,44 +231,50 @@ class Options {
227231 // from experimental.
228232 ..addFlag (
229233 'experimental-emit-debug-metadata' ,
230- help: 'Experimental option for compiler development.\n '
234+ help:
235+ 'Experimental option for compiler development.\n '
231236 'Output a metadata file for debug tools next to the .js output.' ,
232237 defaultsTo: false ,
233238 hide: true ,
234239 )
235240 ..addFlag (
236241 'emit-debug-symbols' ,
237- help: 'Experimental option for compiler development.\n '
242+ help:
243+ 'Experimental option for compiler development.\n '
238244 'Output a symbols file for debug tools next to the .js output.' ,
239245 defaultsTo: false ,
240246 hide: true ,
241247 )
242248 ..addFlag (
243249 'experimental-output-compiled-kernel' ,
244- help: 'Experimental option for compiler development.\n '
250+ help:
251+ 'Experimental option for compiler development.\n '
245252 'Output a full kernel file for currently compiled module next to '
246253 'the .js output.' ,
247254 defaultsTo: false ,
248255 hide: true ,
249256 )
250257 ..addOption (
251258 'reload-last-accepted-kernel' ,
252- help: 'Provides a file path to read a dill file. The enclosed kernel '
259+ help:
260+ 'Provides a file path to read a dill file. The enclosed kernel '
253261 'will be diffed against the kernel produced by this compilation '
254262 'as an incremental hot reload step.' ,
255263 hide: true ,
256264 )
257265 ..addOption (
258266 'reload-delta-kernel' ,
259- help: 'Provides a file path to write a dill file to. The resulting '
267+ help:
268+ 'Provides a file path to write a dill file to. The resulting '
260269 'kernel can be passed to future compilations via '
261270 '`reload-last-accepted-kernel` to get incremental hot reload '
262271 'checks.' ,
263272 hide: true ,
264273 )
265274 ..addMultiOption (
266275 'precompiled-macro' ,
267- help: 'Configuration for precompiled macro binaries or kernel files.\n '
276+ help:
277+ 'Configuration for precompiled macro binaries or kernel files.\n '
268278 'The expected format of this option is as follows: '
269279 '<absolute-path-to-binary>;<macro-library-uri>\n For example: '
270280 '--precompiled-macro="/path/to/compiled/macro;'
@@ -297,7 +307,8 @@ class Options {
297307 ..addMultiOption ('out' , abbr: 'o' , help: 'Output file (required).' )
298308 ..addOption (
299309 'module-name' ,
300- help: 'The output module name, used in some JS module formats.\n '
310+ help:
311+ 'The output module name, used in some JS module formats.\n '
301312 'Defaults to the output file name (without .js).' ,
302313 )
303314 ..addOption (
@@ -307,7 +318,8 @@ class Options {
307318 )
308319 ..addOption (
309320 'multi-root-output-path' ,
310- help: 'Path to set multi-root files relative to when generating'
321+ help:
322+ 'Path to set multi-root files relative to when generating'
311323 ' source-maps.' ,
312324 hide: true ,
313325 )
@@ -318,14 +330,16 @@ class Options {
318330 )
319331 ..addFlag (
320332 'sound-null-safety' ,
321- help: 'Ignored and will be removed in a future version. '
333+ help:
334+ 'Ignored and will be removed in a future version. '
322335 'Sound null safety is always used.' ,
323336 negatable: false ,
324337 defaultsTo: true ,
325338 )
326339 ..addFlag (
327340 'canary' ,
328- help: 'Enable all compiler features under active development. '
341+ help:
342+ 'Enable all compiler features under active development. '
329343 'This option is intended for compiler development only. '
330344 'Canary features are likely to be unstable and can be removed '
331345 'without warning.' ,
0 commit comments