You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dart analyser need to be manually run too often #3334
each time I'm running flutter pub pub run build_runner build --delete-conflicting-outputs (or whatch equivalent) the IDE doesn't get what as been updated so I need to manually run the dart analyzer for the changes to be taken into consideration. Same when I flutter packages get I need to run the dart analyzer for the changes to be in the IDE.
Would be nice to run dart analyzer automatically on package get (or having a checkbox on settings to enable that).
For the build_runner I don't have any solution except implementing #3137 that will allow the IDE to run dart analyzer when needed.
How do you do that?
Ho it's what you call restart in fact, but as it's a refresh button I was thinking it just run the analysis again :)
I have a simple case working for me which is I'm running build_runner on my terminal, so new fields are available on my classes that are not visible yet on the IDE, I'm trying to click packages get to run the analysis but nothing append, field still unknown to the IDE. Then restart the analysis server and all good it's visible. But look like a lot of manual steps when you deal a lot with code generation ^^
all my generated file are "excluded" as I don't want them analyzed or under source versioning
Are those the files that require you to manually run analysis? When you exclude files in IntelliJ you're telling the virtual file system to ignore them. Normally the VFS sends the analysis server a signal that a file has changed and it gets reanalyzed. But if you're telling the VFS to ignore the files then that signal won't get sent.
Are those the files that require you to manually run analysis?
Yes that why I mention it because I think the problem might be here. Excluded in the sens that they are under my .gitignore as I don't want then in versioning control. I tried to remove them from it but no more luck...
But I think I found the problem !
On my analysis_options I have this:
Meaning that I don't want to have lint for generated file as they don't follow my conventions. But by doing that the analysis server is totally ignoring my changes ! I tried to remove the exclude rules and then it works ! So not sure if it's a problem on the plugin or on the analysis server :/ but at least we know the reasons ^^
@bwilkerson Is there a way for generated files to be treated differently from source files by the analyzer? It sounds like he wants the files to be analyzed but not to have any problems listed in the problems view.
Activity
jaumard commentedon Mar 29, 2019
another details I forget to mention, all my generated file are "excluded" as I don't want them analyzed or under source versioning
stevemessick commentedon Apr 1, 2019
How many dart processes are running? Have you tried restarting the analysis server?
For me, it works as you expect it should after Tools > Flutter > Flutter Packages Get from the menu. Is that what you're doing?
jaumard commentedon Apr 2, 2019
Have you tried restarting the analysis server?How do we do that ?Tools > Flutter > Flutter Packages Getdidn't know that one, I open the pubspec and clickpackages geton my side ^^devoncarew commentedon Apr 2, 2019
There's a 'restart' button in the Dart Analysis tool window.
stevemessick commentedon Apr 2, 2019
@jaumard
How many dart processes are running?
The banner button in the pubspec.yaml editor does the same thing as the menu I mentioned earlier. I don't need to manually run the dart analyzer.
How do you do that?
jaumard commentedon Apr 2, 2019
I have a simple case working for me which is I'm running build_runner on my terminal, so new fields are available on my classes that are not visible yet on the IDE, I'm trying to click
packages getto run the analysis but nothing append, field still unknown to the IDE. Then restart the analysis server and all good it's visible. But look like a lot of manual steps when you deal a lot with code generation ^^stevemessick commentedon Apr 2, 2019
Are those the files that require you to manually run analysis? When you exclude files in IntelliJ you're telling the virtual file system to ignore them. Normally the VFS sends the analysis server a signal that a file has changed and it gets reanalyzed. But if you're telling the VFS to ignore the files then that signal won't get sent.
Your dart processes look good; thanks.
jaumard commentedon Apr 2, 2019
Yes that why I mention it because I think the problem might be here. Excluded in the sens that they are under my
.gitignoreas I don't want then in versioning control. I tried to remove them from it but no more luck...But I think I found the problem !
On my analysis_options I have this:
Meaning that I don't want to have lint for generated file as they don't follow my conventions. But by doing that the analysis server is totally ignoring my changes ! I tried to remove the exclude rules and then it works ! So not sure if it's a problem on the plugin or on the analysis server :/ but at least we know the reasons ^^
stevemessick commentedon Apr 2, 2019
Glad you tracked down the problem.
@bwilkerson Is there a way for generated files to be treated differently from source files by the analyzer? It sounds like he wants the files to be analyzed but not to have any problems listed in the problems view.