-
Notifications
You must be signed in to change notification settings - Fork 65
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
Error from the analysis server: Couldn't resolve the package 'custom_lint_builder' #228
Comments
I can't help with the limited information given. I'd need a complete example But it sounds to me like you're missing a |
@rrousselGit Fair. For what it's worth, here is the full error log: issue228_full_log.txt It looks to me that the dependency resolution works, but somehow something is different in the environment on the build server and it does not get passed to the analysis server. BTW, downgrading to this version shows the same issue:
But downgrading these version fixes the issue:
|
FYI, to narrow it down, I converted the pubspec dependencies to ones pointing to git commits - including some dependencyOverrides - in this style:
This commit still does work: c5fccae |
My hack: Because I don't want to do without the Riverpod lints locally, I remove the custom_lint plugin on the build server.
|
Could you share a small repository to reproduce the issue? I assume your project, with all sources deleted, should be enough |
@rrousselGit I have the same problem in my project. Here is a repository that showcases the issue. re-ckart/dart_custom_lint_gh_action_error#1 The Github Action fails in the PR with the following error
|
@re-ckart You need to run |
@rrousselGit
But nevertheless, I updated my workflow to |
Hey @rrousselGit
With workaround it passes: https://github.com/gbassisp/flutter_dev_toys/actions/runs/7998286873/job/21844214242 |
@rrousselGit Are there any updates regarding this issue? |
As a note to this workaround: For my workflows using Nevertheless, I am really thankful for the workaround! Having same issue as people above. |
I ran into the same issue, this is my github workflow, I bumped Flutter stable to 3.19 from the previous stable release and pulled Dart to 3.3 - my guess is that this is where the issue is coming from.
|
I am experiencing the same issue in my GitHub Action when running |
I'm having the same issue after bumping flutter from 3.19 to 3.24.1
Nothing else changed in the project except the flutter version. The dart analyze command fails now with:
|
I just started to experience this too after upgrading to custom_lint 0.6.6: nextcloud/neon#2398 (review) |
This should be fixed in 0.6.7. |
Just tried it, still the same error. Please re-open the issue |
The fact that it only started with ^0.6.6 and I can consistently reproduce it and fix it by downgrading to 0.6.5 strongly indicates to me that the changes of 0.6.6 cause the problem or make it happen more often/in more cases than before. |
0.6.6 most likely has nothing to do with it. It's instead likely caused by some transitive dependency But regardless, I doubt that custom_lint is the problem here in its current state. |
Checkout this: diff --git a/packages/neon_framework/example/pubspec.lock b/packages/neon_framework/example/pubspec.lock
index da7d9765b..638c34b89 100644
--- a/packages/neon_framework/example/pubspec.lock
+++ b/packages/neon_framework/example/pubspec.lock
@@ -241,18 +241,18 @@ packages:
dependency: "direct dev"
description:
name: custom_lint
- sha256: "4939d89e580c36215e48a7de8fd92f22c79dcc3eb11fda84f3402b3b45aec663"
+ sha256: "6e1ec47427ca968f22bce734d00028ae7084361999b41673291138945c5baca0"
url: "https://pub.dev"
source: hosted
- version: "0.6.5"
+ version: "0.6.7"
custom_lint_builder:
dependency: transitive
description:
name: custom_lint_builder
- sha256: d9e5bb63ed52c1d006f5a1828992ba6de124c27a531e8fba0a31afffa81621b3
+ sha256: ba2f90fff4eff71d202d097eb14b14f87087eaaef742e956208c0eb9d3a40a21
url: "https://pub.dev"
source: hosted
- version: "0.6.5"
+ version: "0.6.7"
custom_lint_core:
dependency: transitive
description:
diff --git a/packages/neon_framework/example/pubspec.yaml b/packages/neon_framework/example/pubspec.yaml
index 8f77c7b9f..8fee3ed80 100644
--- a/packages/neon_framework/example/pubspec.yaml
+++ b/packages/neon_framework/example/pubspec.yaml
@@ -41,7 +41,7 @@ dependencies:
vector_graphics: any
dev_dependencies:
- custom_lint: 0.6.5
+ custom_lint: 0.6.7
neon_lints:
git:
url: https://github.com/nextcloud/neon I first pinned custom_lint to 0.6.5 and ran pub upgrade in the package. So no transitive dependency can be the cause for it as nothing changed. |
Your pubspec.lock has no impact on this error. Plugins are ran in a different context, and the analyzer server manually calls And this isn't a new issue by any means. The problem is caused by a race condition in Downgrading custom_lint only changes how slow/fast custom_lint is, which may change whether the race condition happens on your computer or not. That doesn't really solve the issue for everyone. |
I'd suggest upvoting dart-lang/sdk#56667 (comment). |
Ok, thank you for your explanation! |
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
andcustom_lint
to version 0.6.0.Running locally,
dart analyze lib
runs fine.Running on codemagic CI, however, I get the following error message:
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
Flutter version (on stable channel)
The text was updated successfully, but these errors were encountered: