@@ -10,7 +10,6 @@ import 'package:meta/meta.dart';
1010import 'package:path/path.dart' as p;
1111import 'package:sass_api/sass_api.dart' ;
1212import 'package:source_span/source_span.dart' ;
13- import 'package:stack_trace/stack_trace.dart' ;
1413
1514import 'exception.dart' ;
1615import 'io.dart' ;
@@ -58,10 +57,6 @@ abstract class Migrator extends Command<Map<Uri, String>> {
5857 Map <Uri , String > migrateFile (
5958 ImportCache importCache, Stylesheet stylesheet, Importer importer);
6059
61- /// This is called whenever a deprecation warning is emitted during parsing.
62- @protected
63- void handleDeprecation (String message, FileSpan ? span) {}
64-
6560 /// Runs this migrator.
6661 ///
6762 /// Each entrypoint is migrated separately. If a stylesheet is migrated more
@@ -75,8 +70,7 @@ abstract class Migrator extends Command<Map<Uri, String>> {
7570 var importer = FilesystemImporter ('.' );
7671 var importCache = ImportCache (
7772 importers: [NodeModulesImporter ()],
78- loadPaths: globalResults! ['load-path' ],
79- logger: _DeprecationLogger (this ));
73+ loadPaths: globalResults! ['load-path' ]);
8074
8175 var entrypoints = [
8276 for (var argument in argResults! .rest)
@@ -132,22 +126,3 @@ abstract class Migrator extends Command<Map<Uri, String>> {
132126 }
133127 }
134128}
135-
136- /// A silent logger that calls [Migrator.handleDeprecation] when it receives a
137- /// deprecation warning
138- class _DeprecationLogger implements Logger {
139- final Migrator migrator;
140-
141- _DeprecationLogger (this .migrator);
142-
143- @override
144- void debug (String message, SourceSpan span) {}
145-
146- @override
147- void warn (String message,
148- {FileSpan ? span, Trace ? trace, bool deprecation = false }) {
149- if (deprecation) {
150- migrator.handleDeprecation (message, span);
151- }
152- }
153- }
0 commit comments