@@ -8,7 +8,7 @@ import 'package:toml/toml.dart';
88@internal
99interface class TomlDocumentWrapperFactory {
1010 const TomlDocumentWrapperFactory (this .logger);
11- final Logger ? logger;
11+ final Logger logger;
1212
1313 TomlDocumentWrapper parseFile (String filePath) =>
1414 TomlDocumentWrapper (logger, filePath, TomlDocument .loadSync (filePath));
@@ -18,7 +18,7 @@ interface class TomlDocumentWrapperFactory {
1818final class TomlDocumentWrapper {
1919 const TomlDocumentWrapper (this .logger, this .filePath, this .document);
2020
21- final Logger ? logger;
21+ final Logger logger;
2222 final String filePath;
2323 final TomlDocument document;
2424
@@ -32,7 +32,7 @@ final class TomlDocumentWrapper {
3232 }
3333 return currNode as T ;
3434 } on Object catch (exception, stackTrace) {
35- logger? .severe (
35+ logger.severe (
3636 'Failed to find $path in $filePath : $document ' ,
3737 exception,
3838 stackTrace,
@@ -50,13 +50,13 @@ The following exception was thrown: $exception''',
5050@internal
5151interface class CargoManifestParser {
5252 const CargoManifestParser (this .logger, this .tomlDocumentFactory);
53- final Logger ? logger;
53+ final Logger logger;
5454 final TomlDocumentWrapperFactory tomlDocumentFactory;
5555
5656 ({String crateName, List <String > libCrateTypes}) parseManifest (
5757 String manifestPath,
5858 ) {
59- logger? .info ('Looking for Cargo.toml' );
59+ logger.info ('Looking for Cargo.toml' );
6060 if (! File (manifestPath).existsSync ()) {
6161 throw RustValidationException ([
6262 '''
@@ -65,12 +65,12 @@ For more information, see https://github.com/GregoryConrad/native_toolchain_rs?t
6565 ]);
6666 }
6767
68- logger? .info ('Parsing Cargo.toml' );
68+ logger.info ('Parsing Cargo.toml' );
6969 final TomlDocumentWrapper manifest;
7070 try {
7171 manifest = tomlDocumentFactory.parseFile (manifestPath);
7272 } on Object catch (exception, stackTrace) {
73- logger? .severe ('Failed to parse Cargo.toml' , exception, stackTrace);
73+ logger.severe ('Failed to parse Cargo.toml' , exception, stackTrace);
7474 throw RustValidationException ([
7575 '''
7676Failed to parse the Cargo.toml file at $manifestPath .
@@ -116,13 +116,13 @@ and https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-
116116@internal
117117interface class ToolchainTomlParser {
118118 const ToolchainTomlParser (this .logger, this .tomlDocumentFactory);
119- final Logger ? logger;
119+ final Logger logger;
120120 final TomlDocumentWrapperFactory tomlDocumentFactory;
121121
122122 ({Set <String > targets, String channel}) parseToolchainToml (
123123 String toolchainTomlPath,
124124 ) {
125- logger? .info ('Looking for rust-toolchain.toml' );
125+ logger.info ('Looking for rust-toolchain.toml' );
126126 if (! File (toolchainTomlPath).existsSync ()) {
127127 throw RustValidationException ([
128128 '''
@@ -131,12 +131,12 @@ For more information, see https://github.com/GregoryConrad/native_toolchain_rs?t
131131 ]);
132132 }
133133
134- logger? .info ('Parsing rust-toolchain.toml' );
134+ logger.info ('Parsing rust-toolchain.toml' );
135135 final TomlDocumentWrapper toolchain;
136136 try {
137137 toolchain = tomlDocumentFactory.parseFile (toolchainTomlPath);
138138 } on Object catch (e, stackTrace) {
139- logger? .severe ('Failed to parse rust-toolchain.toml' , e, stackTrace);
139+ logger.severe ('Failed to parse rust-toolchain.toml' , e, stackTrace);
140140 throw RustValidationException ([
141141 '''
142142Failed to parse the rust-toolchain.toml file at $toolchainTomlPath .
0 commit comments