2

Since this morning, the generation step of built value (pub run build_runner build) is failing with

[SEVERE] built_value_generator:built_value on lib/client.dart (cached):
Unknown error in BuiltValueGenerator for myproject|lib/client.dart.
NoSuchMethodError: The method 'getParsedLibraryByElement' was called on null.
Receiver: null
Tried calling: getParsedLibraryByElement(Instance of 'LibraryElementImpl')

I tried upgrading to built value 6.6.0 (from 6.3.2), but it didn't help

Dart version is 2.1.0-dev.9.4

Any suggestions are welcome

Jorn
  • 20,612
  • 18
  • 79
  • 126
  • Try a `pub upgrade` to get the latest versions of all packages. What `build_runner` version are you on? Can you run the build with `--verbose` to get a stack trace? – Nate Bosch Jun 11 '19 at 15:54
  • 1
    I temp-fixed the problem by fixing the version to `6.3.2` (down from `^6.3.2`). I'm guessing the problem was some incompatibility introduced with dart 2.3 – Jorn Jun 11 '19 at 16:38
  • It could be something changed in the analyzer package that broke this. I'd file an issue at https://github.com/google/built_value.dart – Nate Bosch Jun 11 '19 at 17:47

0 Answers0