From 10fdb182b08065554ee60f441618c4bad49722d2 Mon Sep 17 00:00:00 2001 From: Julian Roussieau Date: Sun, 1 Aug 2021 22:18:39 +0200 Subject: [PATCH] [FIX] authorize null safety --- bin/tags.dart | 5 ++++- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/tags.dart b/bin/tags.dart index 904d8d4..e0e913e 100644 --- a/bin/tags.dart +++ b/bin/tags.dart @@ -7,6 +7,9 @@ import 'package:analyzer/dart/analysis/features.dart'; import 'package:analyzer/dart/analysis/utilities.dart' as an; import 'package:path/path.dart' as path; import 'package:args/args.dart'; +import 'package:pub_semver/pub_semver.dart'; + + class Ctags { ArgResults options; @@ -115,7 +118,7 @@ class Ctags { CompilationUnit unit; try { result = - an.parseFile(path: file.path, featureSet: FeatureSet.fromEnableFlags([])); + an.parseFile(path: file.path, featureSet: FeatureSet.fromEnableFlags2(sdkLanguageVersion: Version(2, 10, 0), flags: ['non-nullable'])); unit = result.unit; } catch (e) { print('ERROR: unable to generate tags for ${file.path}'); diff --git a/pubspec.yaml b/pubspec.yaml index 0f0e8d8..87ce057 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: executables: dart_ctags: tags dependencies: - analyzer: ^0.40.0 + analyzer: ^2.0.0 path: ^1.7.0 quiver: ^2.1.3 args: ^1.6.0