Open
Description
Describe the bug
My projects is using riverpod and has a custom lint sub-package.
The issue started to occur after updating custom_lint_builder
and custom_lint
to version 0.6.0.
Running locally, dart analyze lib
runs fine.
Running on codemagic CI, however, I get the following error message:
Error from the analysis server: Error: Couldn't resolve the package 'custom_lint_builder' in 'package:custom_lint_builder/src/channel.dart'.
- Remove the my custom lint package does not make a difference
- Clearing the pub cache locally does not reproduce the issue
I'd appreciate any hint in which direction to investigate
This is (part of) the verbose output. The ~5.5K output contains the resolution of the packages which all come up to
...
+389 ms] dart --disable-dart-dev /Users/builder/programs/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --disable-server-feature-completion --disable-server-feature-search --sdk /Users/builder/programs/flutter/bin/cache/dart-sdk
[ +9 ms] ==> {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]}}
[ ] ==> {"id":"2","method":"analysis.setAnalysisRoots","params":{"included":["/Users/builder/clone/lib"],"excluded":[]}}
[ ] Analyzing lib...
[ +140 ms] <== {"event":"server.connected","params":{"version":"1.34.0","pid":1727}}
[ +10 ms] <== {"id":"1"}
[+9508 ms] <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[+6157 ms] <== {"event":"analysis.errors","params":{"file":"/Users/builder/clone/lib/ui/settings/settings_section.dart","errors":[]}}
...
[ ] <== {"event":"server.error","params":{"isFatal":false,"message":"Error: Couldn't resolve the package 'custom_lint_builder' in 'package:custom_lint_builder/src/channel.dart'.\nError: Couldn't resolve the package 'pp_custom_lint' in 'package:pp_custom_lint/pp_custom_lint.dart'.\nError: Couldn't resolve the package 'riverpod_lint' in 'package:riverpod_lint/riverpod_lint.dart'.\nlib/custom_lint_client.dart:3:8: Error: Not found: 'package:custom_lint_builder/src/channel.dart'\nimport 'package:custom_lint_builder/src/channel.dart';\n ^\nlib/custom_lint_client.dart:4:8: Error: Not found: 'package:pp_custom_lint/pp_custom_lint.dart'\nimport 'package:pp_custom_lint/pp_custom_lint.dart' as pp_custom_lint;\n ^\nlib/custom_lint_client.dart:5:8: Error: Not found: 'package:riverpod_lint/riverpod_lint.dart'\nimport 'package:riverpod_lint/riverpod_lint.dart' as riverpod_lint;\n ^\nlib/custom_lint_client.dart:17:39: Error: Undefined name 'createPlugin'.\n {'pp_custom_lint': pp_custom_lint.createPlugin,\n ^^^^^^^^^^^^\nlib/custom_lint_client.dart:18:32: Error: Undefined name 'createPlugin'.\n'riverpod_lint': riverpod_lint.createPlugin,\n ^^^^^^^^^^^^\nlib/custom_lint_client.dart:12:3: Error: Method not found: 'runSocket'.\n runSocket(\n ^^^^^^^^^\n","stackTrace":""}}
[ +2 ms] Error from the analysis server: Error: Couldn't resolve the package 'custom_lint_builder' in 'package:custom_lint_builder/src/channel.dart'.
Error: Couldn't resolve the package 'pp_custom_lint' in 'package:pp_custom_lint/pp_custom_lint.dart'.
Error: Couldn't resolve the package 'riverpod_lint' in 'package:riverpod_lint/riverpod_lint.dart'.
lib/custom_lint_client.dart:3:8: Error: Not found: 'package:custom_lint_builder/src/channel.dart'
import 'package:custom_lint_builder/src/channel.dart';
^
lib/custom_lint_client.dart:4:8: Error: Not found: 'package:pp_custom_lint/pp_custom_lint.dart'
import 'package:pp_custom_lint/pp_custom_lint.dart' as pp_custom_lint;
^
lib/custom_lint_client.dart:5:8: Error: Not found: 'package:riverpod_lint/riverpod_lint.dart'
import 'package:riverpod_lint/riverpod_lint.dart' as riverpod_lint;
^
lib/custom_lint_client.dart:17:39: Error: Undefined name 'createPlugin'.
{'pp_custom_lint': pp_custom_lint.createPlugin,
^^^^^^^^^^^^
lib/custom_lint_client.dart:18:32: Error: Undefined name 'createPlugin'.
'riverpod_lint': riverpod_lint.createPlugin,
^^^^^^^^^^^^
lib/custom_lint_client.dart:12:3: Error: Method not found: 'runSocket'.
runSocket(
^^^^^^^^^
Flutter version (on stable channel)
flutter --version
Flutter 3.16.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 41456452f2 (3 weeks ago) • 2024-01-25 10:06:23 -0800
Engine • revision f40e976bed
Tools • Dart 3.2.6 • DevTools 2.28.5