Skip to content

Analyzer not picking up changes after BuiltValue generation in IntelliJ #42191

Open
@rayk

Description

@rayk

This maybe a regression issue.

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:

  1. create a BuiltValue abstract class.
abstract class PersistEvent
    implements Built<PersistEvent, PersistEventBuilder> {
  PersistEvent._();
  factory PersistEvent([void Function(PersistEventBuilder) updates]) =
      _$PersistEvent;
}
  1. execute the generator.
  • flutter pub run build_runner build or
  • flutter pub run build_runner build --delete-conflicting-outputs
    then:
  • confirm the PersistEventBuilder has been created in the *.g.dart file.
  1. Observe red squeakily lines in IDE.

  2. Select invalidate Cache / Restart... for the file menu.

  3. Wait Wait Wait.

  4. 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
@aaronlademann-wf (Also impacted by pervious issue)
cross filed in flutter plugin repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis servertype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions