google / built_value.dart

Immutable value types, enum classes, and serialization.
https://pub.dev/packages/built_value
BSD 3-Clause "New" or "Revised" License
870 stars 184 forks source link

Failed to precompile build script .dart_tool/build/entrypoint/build.dart #1203

Open celvinren opened 1 year ago

celvinren commented 1 year ago

flutter pub run build_runner build --delete-conflicting-outputs I ran the above cmd to generate .g file 1 months ago, but now it reporting this error message. Try to do flutter clean and pub get again, but it doesn't resolve the issue.

Can anyone help me to fix this issue?

Thanks

`[INFO] Generating build script completed, took 351ms [WARNING] /Users/calvin/.pub-cache/hosted/pub.dartlang.org/built_value_generator-8.4.2/lib/src/serializer_source_library.dart:125:43: Error: The getter 'element' isn't defined for the class 'DartType'.

dave26199 commented 1 year ago

This could relate to the analyzer version ... could you post the output of "dart pub get" and "dart pub upgrade"? Possibly, upgrade will fix it.

Petri-Oosthuizen commented 1 year ago

I encountered the same error. Overriding the analyzer works in the meantime.

dependency_overrides:
  analyzer: 5.2.0