Analyzer_plugin somehow only receives plugin.versionCheck

64 views
Skip to first unread message

dark...@gmail.com

unread,
Aug 14, 2024, 2:46:01 PM8/14/24
to Dart Analyzer Discussion
Hello!

I'm facing an issue where an analyzer_plugin only receives the "plugin.versionCheck" request ... and nothing else.
That is, until the analyzer server is about to be shut down. Then, setContextRoot and stuff are sent, right before the shutdown event.

Note that the plugin does answer the versionCheck request.

Analyzer logs are linked in a file.

We can see in there that the versionCheck request is made, and that the answer was received. But nothing else happened after that.
Also, oddly enough, it appears that there are two instances of the plugin running at once? Hence two versionCheck requests are made. This could be related to the issue. I'm not sure why that's the case.


Also, I have a separate project where the same plugin is working normally.

Any clue about what could be happening here?
Thanks!
a.log

Brian Wilkerson

unread,
Aug 14, 2024, 3:51:44 PM8/14/24
to analyzer...@dartlang.org, Samuel Rawlins
Any clue about what could be happening here?

I don't, at least not yet.

Also, I have a separate project where the same plugin is working normally.

I'm guessing that the behavior with these two projects is consistent. That is, it never works for one and it always works for the other.

Can you see any interesting differences between the two projects?

Do you have a minimal reproduction case that we can use to test the behavior?

--
You received this message because you are subscribed to the Google Groups "Dart Analyzer Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to analyzer-discu...@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/analyzer-discuss/65b88872-6e64-451e-9f0f-c0b24441915fn%40dartlang.org.

dark...@gmail.com

unread,
Aug 14, 2024, 4:49:16 PM8/14/24
to Dart Analyzer Discussion, brianwilkerson, sraw...@google.com
Just as I was about to push the failing project, it suddenly started receiving those events. Nothing really change. I'll keep you posted if I reproduce it again.

dark...@gmail.com

unread,
Aug 14, 2024, 4:52:16 PM8/14/24
to Dart Analyzer Discussion, dark...@gmail.com, brianwilkerson, sraw...@google.com
My bad, the problem is still here. I tested on the wrong project. Let me make repo for it.

dark...@gmail.com

unread,
Aug 14, 2024, 5:25:03 PM8/14/24
to Dart Analyzer Discussion, dark...@gmail.com, brianwilkerson, sraw...@google.com
Here's a repro:

Branch: bump-lint
Tested commit hash: c118ae8a2a003911c39508daa0372d86ff9ee751

Opening the project should be enough to see the issue in analyzer logs.

Danny Tuppeny

unread,
Aug 19, 2024, 6:11:37 AM8/19/24
to Dart Analyzer Discussion, dark...@gmail.com, brianwilkerson, sraw...@google.com
I tried to repro this with your branch/commit, but I get errors trying to run pub get for the project (and end up with a large number of diagnostics for the project):

[packages\riverpod_generator\integration\build_yaml] dart pub get --no-example
Resolving dependencies...
Because every version of riverpod_analyzer_utils from path depends on custom_lint_core ^0.7.0 which doesn't match any versions, riverpod_analyzer_utils from path is forbidden.
So, because build_yaml depends on riverpod_analyzer_utils from path, version solving failed.
exit code 1

I didn't know if that was important here, so I checked the server log anyway, but I also see similar errors there (although the errors text is a little odd, and I wonder whether plugins from git refs aren't supported?):

1724061800631:Err:Failed to run pub upgrade
  pluginFolder = C::\Users\danny\AppData\Local\.dartServer\.plugin_manager\3b4cbfd1a7542f5663df52116b694085\analyzer_plugin
  exitCode = 69
  stdout = Resolving dependencies...

  stderr = Because custom_lint_analyzer_plugin_loader depends on custom_lint_builder from git which doesn't exist (Could not find git ref 'upgrade' (fatal:: ambiguous argument 'upgrade':: unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this::
'git <command> [<revision>...] -- [<file>...]')), version solving failed.


Is this  different behaviour to what you see for the same commit? Do you know what might differ between us?

dark...@gmail.com

unread,
Aug 19, 2024, 7:44:37 AM8/19/24
to Dart Analyzer Discussion, da...@tuppeny.com, dark...@gmail.com, brianwilkerson, sraw...@google.com
In the meantime I raised a github issue with a brand new repository as reproduction:

No branch/commit needed nor git dependency inside pubspecs.
This repo has the same shape as the old one, with most of the source removed and only pubspecs remaining.

Danny Tuppeny

unread,
Aug 19, 2024, 9:19:14 AM8/19/24
to Dart Analyzer Discussion, dark...@gmail.com, Danny Tuppeny, brianwilkerson, sraw...@google.com
Thanks! I'll test with that and follow up on the issue.
Reply all
Reply to author
Forward
0 new messages