From ff616d978ae02794be86dfea6d20f2298c98c499 Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Sat, 26 Oct 2024 16:19:59 +0900 Subject: [PATCH] fixing analysis errors (#1021) * fixing analysis errors --- mobx_codegen/CHANGELOG.md | 4 ++++ mobx_codegen/lib/src/type_names.dart | 6 ++++-- mobx_codegen/lib/version.dart | 2 +- mobx_codegen/pubspec.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mobx_codegen/CHANGELOG.md b/mobx_codegen/CHANGELOG.md index bfa7313c..eb21dd37 100644 --- a/mobx_codegen/CHANGELOG.md +++ b/mobx_codegen/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.6.1+1 + +- Fixing some analyzer errors related to deprecated types. + ## 2.6.1 - Upgrading packages and sdk diff --git a/mobx_codegen/lib/src/type_names.dart b/mobx_codegen/lib/src/type_names.dart index 4992928c..179c71af 100644 --- a/mobx_codegen/lib/src/type_names.dart +++ b/mobx_codegen/lib/src/type_names.dart @@ -35,6 +35,7 @@ class LibraryScopedNameFinder { // Reverse each import's export namespace so we can map elements to their // library-local names. Note that the definedNames include a prefix if there // is one. + // ignore: deprecated_member_use for (final import in library.libraryImports) { for (final entry in import.namespace.definedNames.entries) { _namesByElement[entry.value] = entry.key; @@ -79,6 +80,7 @@ class LibraryScopedNameFinder { // If we're dealing with a typedef, we let it undergo the standard name // lookup. Otherwise, we special case the function naming. if (type.alias?.element is TypeAliasElement) { + // ignore: deprecated_member_use typeElement = type.alias!.element.aliasedElement?.enclosingElement; } else { return _getFunctionTypeName(type); @@ -88,8 +90,8 @@ class LibraryScopedNameFinder { typeElement == null || // This is a bare type param, like "T" type is TypeParameterType) { - // ignore: deprecated_member_use_from_same_package - return type.getDisplayString(); + // ignore: deprecated_member_use + return type.getDisplayString(withNullability: true); } return _getNamedElementTypeName(typeElement!, type); diff --git a/mobx_codegen/lib/version.dart b/mobx_codegen/lib/version.dart index 2bae6d5c..9fa5fbca 100644 --- a/mobx_codegen/lib/version.dart +++ b/mobx_codegen/lib/version.dart @@ -1,4 +1,4 @@ // Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!! /// The current version as per `pubspec.yaml`. -const version = '2.6.1'; +const version = '2.6.1+1'; diff --git a/mobx_codegen/pubspec.yaml b/mobx_codegen/pubspec.yaml index a1dc4479..22ced730 100644 --- a/mobx_codegen/pubspec.yaml +++ b/mobx_codegen/pubspec.yaml @@ -1,6 +1,6 @@ name: mobx_codegen description: Code generator for MobX that adds support for annotating your code with @observable, @computed, @action and also creating Store classes. -version: 2.6.1 +version: 2.6.1+1 repository: https://github.com/mobxjs/mobx.dart issue_tracker: https://github.com/mobxjs/mobx.dart/issues