Code-generation suddenly stopped working #3023
Replies: 1 comment 1 reply
-
I have no idea how it happened, but i solved it in the end by branching out, rerolling to an older version and then returning to the current one. After that the build_runner just worked and generated all classes lke before. Sorry for the weird question and the spam. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
my code-generation all of a sudden stopped working and I have no clue why.
When I run
flutter pub run build_runner watch -d
it starts normal like that:
Resolving dependencies... (1.4s) Downloading packages... Got dependencies. Resolving dependencies... Downloading packages... Got dependencies. [INFO] Generating build script completed, took 539ms [INFO] Setting up file watchers completed, took 16ms [INFO] Waiting for all file watchers to be ready completed, took 486ms [INFO] Reading cached asset graph completed, took 788ms [INFO] Checking for updates since last build completed, took 1.9s [INFO] Running build completed, took 128ms [INFO] Caching finalized dependency graph completed, took 328ms
and then I get the Error:
[SEVERE] drift_dev on lib/src/local_db/domain/db_main.dart (cached): type 'Null' is not a subtype of type 'ClassElement' in type cast
for pretty much every single file in my project. It does not generate my Companions and DataClasses anymore and the project is completely broken. I did not change anything severe as far as I am aware. Does anyone have an idea what could have caused that? Yesterday it worked like a charme and today it completely broke on me. I am out of Ideas atm.
thanks
Beta Was this translation helpful? Give feedback.
All reactions