Closed SunlightBro closed 4 months ago
Latest commit: d5fffe754fe7eca2b651946107f2adb8fc724985
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
using stable or beta flutter analyze .
has no issues.
but on master the main issue (I think) is in custom_lint_core/lib/src/lint_codes.dart,
because analyzer/src/dart/error/lint_codes.dart now also defines LintCode
.
Analyzing freezed_lint...
error • The argument type 'dynamic' can't be assigned to the parameter type 'ErrorCode'. • lib/src/missing_mixin.dart:30:37 • argument_type_not_assignable
error • The argument type 'dynamic' can't be assigned to the parameter type 'ErrorCode'. • lib/src/missing_mixin.dart:36:35 • argument_type_not_assignable
error • The argument type 'dynamic' can't be assigned to the parameter type 'ErrorCode'. • lib/src/missing_private_empty_ctor.dart:44:35 • argument_type_not_assignable
Do you mind adding the necessary import alias or show/hide
?
Requires one change in custom_lint_core/lib/src/lint_rule.dart
import 'package:analyzer/dart/ast/ast.dart';
- import 'package:analyzer/error/error.dart';
+ import 'package:analyzer/error/error.dart' show AnalysisError;
import 'package:analyzer/error/listener.dart';
TY!
@rrousselGit, can you publish this? Running custom_lint
in one of my projects errors with [path-to-freezed_lint] 'LintCode' is imported from both [path-to-custom_lint_core] [path-to-analyzer]. Failed to start plugins The request analysis.setContextRoots failed with the following error: RequestErrorCode.PLUGIN_ERROR Bad state: Failed to start the plugins.
without this PR, but pulling it in as a git dependency works fine. I'm as up-to-date as one can be on the stable channel.
(I'm not sure why this fixes it, I have another project on the stable channel that also depends on analyzer@6.7.0
, custom_lint_core@0.6.5
and freezed_lint@0.0.5
which works fine, but 🤷♂️)