@@ -134,19 +134,19 @@ final class EntrypointBuilderOptions {
134134 /// If not provided, defaults to "lib/libraries.json" in the sdk directory.
135135 final String ? librariesPath;
136136
137- /// Whether or not to silence unsupported modules warnings .
137+ /// Whether or not to allow unsupported modules.
138138 ///
139139 /// If `true` then native core library imports that are not officially
140140 /// supported by the current platform will be silently allowed.
141- final bool silenceUnsupportedModulesWarnings ;
141+ final bool unsafeAllowUnsupportedModules ;
142142
143143 EntrypointBuilderOptions ({
144144 required this .compilers,
145145 this .nativeNullAssertions,
146146 this .loaderExtension,
147147 this .usesWebHotReload = false ,
148148 this .librariesPath,
149- this .silenceUnsupportedModulesWarnings = false ,
149+ this .unsafeAllowUnsupportedModules = false ,
150150 });
151151
152152 factory EntrypointBuilderOptions .fromOptions (BuilderOptions options) {
@@ -160,8 +160,8 @@ final class EntrypointBuilderOptions {
160160 const loaderOption = 'loader' ;
161161 const webHotReloadOption = 'web-hot-reload' ;
162162 const librariesPathOption = 'libraries_path' ;
163- const silenceUnsupportedModulesWarningsOption =
164- 'silence_unsupported_modules_warnings ' ;
163+ const unsafeAllowUnsupportedModulesOption =
164+ 'unsafe_allow_unsupported_modules ' ;
165165 String ? defaultLoaderOption;
166166
167167 const supportedOptions = [
@@ -173,7 +173,7 @@ final class EntrypointBuilderOptions {
173173 loaderOption,
174174 webHotReloadOption,
175175 librariesPathOption,
176- silenceUnsupportedModulesWarningsOption ,
176+ unsafeAllowUnsupportedModulesOption ,
177177 'use-ui-libraries' ,
178178 ];
179179
@@ -182,8 +182,8 @@ final class EntrypointBuilderOptions {
182182 options.config[nativeNullAssertionsOption] as bool ? ;
183183 final usesWebHotReload = options.config[webHotReloadOption] as bool ? ;
184184 final librariesPath = options.config[librariesPathOption] as String ? ;
185- final silenceUnsupportedModulesWarnings =
186- options.config[silenceUnsupportedModulesWarningsOption ] as bool ? ;
185+ final unsafeAllowUnsupportedModules =
186+ options.config[unsafeAllowUnsupportedModulesOption ] as bool ? ;
187187 final compilers = < EnabledEntrypointCompiler > [];
188188
189189 validateOptions (
@@ -272,8 +272,7 @@ final class EntrypointBuilderOptions {
272272 : defaultLoaderOption,
273273 usesWebHotReload: usesWebHotReload ?? false ,
274274 librariesPath: librariesPath,
275- silenceUnsupportedModulesWarnings:
276- silenceUnsupportedModulesWarnings ?? false ,
275+ unsafeAllowUnsupportedModules: unsafeAllowUnsupportedModules ?? false ,
277276 );
278277 }
279278
@@ -363,8 +362,8 @@ class WebEntrypointBuilder implements Builder {
363362 ? _ddcLibraryBundleSdkResources
364363 : _ddcSdkResources,
365364 usesWebHotReload: usesWebHotReload,
366- silenceUnsupportedModulesWarnings :
367- options.silenceUnsupportedModulesWarnings ,
365+ unsafeAllowUnsupportedModules :
366+ options.unsafeAllowUnsupportedModules ,
368367 );
369368 } on MissingModulesException catch (e) {
370369 log.severe ('$e ' );
@@ -380,8 +379,8 @@ class WebEntrypointBuilder implements Builder {
380379 onlyCompiler: options.compilers.length == 1 ,
381380 entrypointExtension: compiler.extension ,
382381 librariesPath: options.librariesPath,
383- silenceUnsupportedModulesWarnings :
384- options.silenceUnsupportedModulesWarnings ,
382+ unsafeAllowUnsupportedModules :
383+ options.unsafeAllowUnsupportedModules ,
385384 ),
386385 );
387386 case WebCompiler .Dart2Wasm :
@@ -391,8 +390,8 @@ class WebEntrypointBuilder implements Builder {
391390 buildStep,
392391 compiler.compilerArguments,
393392 compiler.extension ,
394- silenceUnsupportedModulesWarnings :
395- options.silenceUnsupportedModulesWarnings ,
393+ unsafeAllowUnsupportedModules :
394+ options.unsafeAllowUnsupportedModules ,
396395 );
397396 }),
398397 );
0 commit comments