Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update analyzer uses to work with 5.13 and 6 #940

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/builder/codegen/typed_map_impl_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ class _TypedMapImplGenerator extends TypedMapImplGenerator {
for (var i = 0; i < mixins.length; i++) {
final mixin = mixins[i];
final typeArguments = mixin.typeArguments?.toSource() ?? '';
final names = TypedMapNames(mixin.name.name);
final names = TypedMapNames(mixin.name2.name);
header.write('${names.consumerName}$typeArguments');
header.write(',');
// Add a space at the beginning of the line so that dartfmt indents it
Expand Down
2 changes: 1 addition & 1 deletion lib/src/builder/parsing/ast_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension TypeAnnotationNameHelper on TypeAnnotation {
/// field of [Identifier]s.
extension TypeNameHelper on NamedType {
/// The type name without any namespace prefixes.
String get nameWithoutPrefix => name.nameWithoutPrefix;
String get nameWithoutPrefix => importPrefix != null ? name2.name.replaceFirst(importPrefix.toString(), '') : name2.name;
}

/// Utilities related to simplifying access to node identifier fields.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/builder/parsing/declarations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ mixin _TypedMapMixinShorthandDeclaration {
.toList();

if (badConstraints != null && badConstraints.isNotEmpty) {
final badConstraintsString = badConstraints.map((c) => c.name.name).join(', ');
final badConstraintsString = badConstraints.map((c) => c.name2.name).join(', ');

final suggestedImplName = mixin.name.name.endsWith('Mixin')
? mixin.name.name.replaceFirst(RegExp(r'Mixin$'), '')
Expand All @@ -229,7 +229,7 @@ extension on Union<BoilerplateProps, BoilerplatePropsMixin> {
/// This is the safest way to retrieve that information because it takes
/// into account the nature of the [Union] typing of `props`.
List<String> get allPropsMixins => this.switchCase(
(a) => a.nodeHelper.mixins.map((name) => name.name.name).toList(),
(a) => a.nodeHelper.mixins.map((name) => name.name2.name).toList(),
(b) => [b.name.name],
);
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:

dependencies:
collection: ^1.15.0
analyzer: ^5.13.0
analyzer: '>=5.13.0 <7.0.0'
build: ^2.0.0
dart_style: ^2.0.0
js: ^0.6.1+1
Expand All @@ -30,7 +30,7 @@ dev_dependencies:
build_resolvers: ^2.0.0
build_runner: ^2.0.0
build_test: ^2.0.0
build_web_compilers: ^3.0.0
build_web_compilers: '>=3.0.0 <5.0.0'
built_value_generator: ^8.0.0
dart_dev: ^4.0.1
dependency_validator: ^3.0.0
Expand Down
Loading