Skip to content
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

IDE not picking up changes after BuiltValue generation (Also filed in SDK repo) #4601

Closed
rayk opened this issue Jun 5, 2020 · 1 comment
Closed

Comments

@rayk
Copy link

rayk commented Jun 5, 2020

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:

  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
cross file issue
@aaronlademann-wf (Also impacted by pervious issue)

@devoncarew
Copy link
Member

@rayk, thanks for opening these issues. It is likely related to an interaction between the analyzer and built_value / code gen, so not an IDE specific issue (even if the problem surfaces in IDEs). I'm going to close this issue in favor of dart-lang/sdk#42191; people following allow can monitor the dart-lang/sdk issue for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants