-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Analyzer: Flaky results in IDE #47567
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
Comments
I continued investigating this and I'm actually seeing the same when importing the package from pub.dev, but I think this is still worth leaving here as it may point to something wrong with how the analysis server invokes the plugin. Furthermore, my question at the bottom of this comment still stands, which is:
|
Hi there, just checking in. Been exploring what it might look like to build out our analyzer plugin, and I haven't seen any traction here or in #57588. I'm guessing this isn't much of a priority for the team? I have found dart-code-metrics which successfully (at least in my playing around with it) adds an IDE integration, but doesn't support custom lint rules and doesn't plan to, so before I go and build out our own, I was hoping to hear if there were any plans to make this easier for developers or if rolling your own is the only solution for the time being. |
@btrautmann do you have steps to reproduce the issue with diagnostics disappearing when you change files? There seemed to be some version mismatches when I tried in flutter/devtools#3585, if you have something that works on the latest code I can try to debug what's happening. I don't know the answer to the question about using relative paths or if there are any changes in this area - @bwilkerson may have more knowledge about those. |
It's been a while since I've looked at the plugin implementation, but I wouldn't be at all surprised to find that it doesn't support having relative paths in the bootstrap package's pubspec.
I think we're very interested in making it possible for the community to provide enhancements to the development experience. We value community involvement and even if we didn't, we don't have the resources to do everything. The analyzer plugin support was an experiment to see how well a plugin approach might work to satisfy the need to make it easier for the community to provide enhancements. The current implementation seems promising to me, but there are some issues that we need to resolve before it can reasonably be considered to be production quality. It's true that this hasn't yet been a higher priority that some other projects, but that doesn't mean that it has a low priority, only that we have limited resources and a lot of work to do. Unfortunately, several important tasks have not been fully addresses, and this is one of them.
Rolling your own plugin is the only approach that's currently been implemented. We've certainly discussed other options, but there are lots of advantages to the plugin approach and lots of UX and technical challenges to some of the other options that have been suggested. We haven't entirely ruled out other options, but plugins still seem, to me, to be the best option available to us. |
Wanted to leave an update here:
I believe this ended up being the case. We ended up using a
Thanks for highlighting the team's current thoughts. Our team is interested in possibly finding a solution such that makes writing analyzer plugins trivial. From our perspective this is really the only path forward, since there's no way to basically ship a reusable analyzer plugin capable of querying a consumer for its custom lint rules (otherwise y'all would've just done this with If y'all end up working on this, it would be great if you could keep the community posted here or on #57588 so we avoid duplicate efforts 😄 I am going to close this issue, though, because I believe it was the relative path of the bootstrap package that was causing flakiness. |
dart --version
)Dart SDK version: 2.13.3 (stable) (Wed Jun 9 12:44:44 2021 +0200) on "macos_x64"
MacOS 11.6
This issue is a follow-up to discussion occurring in #57588, starting with this comment.
During my attempts at developing a custom analyzer plugin, I've found the IDE feedback to be very flaky. I figured it was just my own implementation (even though it was mostly based off the same approach as string_literal_finder), but once I actually pulled down
string_literal_finder
and pointed to it from source, I saw similar results, shown below. You can find the source for my reproduction here.Screen.Recording.2021-10-28.at.10.34.07.AM.mov
At the time the above was recorded, this was what analyzer diagnostics was telling me. Unfortunately I did not capture instrumentation logs (well I did, but have since restarted the analyzer server which wiped those logs out).
Please let me know if I can provide any more helpful information.
The text was updated successfully, but these errors were encountered: