Description
This issue has also been filed in the dart SDK repository as it maybe an analyser issue. It is also filed here for good measure are it is disrupting develop workflow in a significant manner.
There was a previous defect with identical behaviour, which appeared to resolve itself.
The core of the issue is as follows:
The IDE (intelliJ) does not recognise (red squeakily line) newly created BuiltValue abstract classes or existing BuiltValue abstract classes that have been edited, until "Invalidate Cache / Restart..." from the File menu of intellij has restarted the IDE and reindexed the whole project (this is very time consuming).
Reproduction Steps:
- create a BuiltValue abstract class.
abstract class PersistEvent
implements Built<PersistEvent, PersistEventBuilder> {
PersistEvent._();
factory PersistEvent([void Function(PersistEventBuilder) updates]) =
_$PersistEvent;
}
- execute the generator.
flutter pub run build_runner build
orflutter pub run build_runner build --delete-conflicting-outputs
then:- confirm the
PersistEventBuilder
has been created in the *.g.dart file.
-
Observe red squeakily lines in IDE.
-
Select invalidate Cache / Restart... for the file menu.
-
Wait Wait Wait.
-
Observe the IDE now recognises the
PersistEvent
Environment:
IntelliJ IDEA 2020.1.2 (Ultimate Edition)
Build #IU-201.7846.76, built on June 1, 2020
Runtime version: 11.0.7+10-b765.53 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.5
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: dart.server.additional.arguments=--enable-completion-model, debugger.watches.in.variables=false
Non-Bundled Plugins: BrowseWordAtCaret, BunyanConsole, Dummy Text Generator, Key Promoter X, Shifter, String Manipulation, TabSwitch, awesome.console, com.fwdekker.randomness, com.giancarlocode.built-value-snippets, com.github.leomillon.uuidgenerator, com.github.lppedd.idea-conventional-commit, com.github.novotnyr.jwt-intellij-plugin, Time Convertor Plugin, com.dubreuia, com.godwin.json.parser, com.herbert.george.flutter-snippets, com.marlboro.gitbar, io.github.xusida.idea.plugins.formatyaml, launch-url-from-string, com.ivanovych666.intellij.plugin.jsonsorter, com.intellij.plugins.watcher, com.wix.scss.lint, com.mallowigi, com.paperetto.dash, com.potterhsu.jsonviewer, com.shenyong.flutter.refgenerator, com.sonnk.iterm, com.wakatime.intellij.plugin, mobi.hsz.idea.gitignore, io.github.qeesung.component.HighlightBracketPair, krasa.CpuUsageIndicator, lermitage.intellij.extra.icons, com.dmarcotte.handlebars, Dart, andrasferenczi.dart-data-plugin, com.localizely.flutter-intl, io.flutter, org.bdshadow.json.serialization.generator, cz.daku.intellij.extraActions, org.jetbrains.kotlin, de.endrullis.idea.postfixtemplates, izhangzhihao.rainbow.brackets, zielu.gittoolbox, com.intellij.lang.jsgraphql, com.wix.eslint, intellij.prettierJS, org.sylfra.idea.plugins.linessorter, org.turbanov.commits.message.checker, socrates.tabshifter, zjhmale.rainbow
and
Flutter 1.18.0-11.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 2738a1148b (3 weeks ago) • 2020-05-13 15:24:36 -0700
Engine • revision ef9215ceb2
Tools • Dart 2.9.0 (build 2.9.0-8.2.beta)
References:
@davidmorgan (BuiltValue)
initial issue - over a year old
cross file issue
@aaronlademann-wf (Also impacted by pervious issue)