Description
Freezed wont generate files after 1.22 release and gets into an infinite processing loop.
Also, multiple errors on non-nullable feature are shown.
Bad state: Unexpected diagnostics:
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:152:17 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:119:41 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:133:32 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:186:51 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:88:62 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:153:38 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:64:4 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:154:25 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:18:17 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:118:48 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:132:37 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:19:11 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:159:38 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:168:32 - This requires the 'non-nullable' language feature to be enabled.
C:\src\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:47:14 - This requires the 'non-nullable' language feature to be enabled.
To Reproduce
Update to 1.22 and try to run freezed build
The build is passing on stable https://github.com/rrousselGit/freezed/runs/1208517431?check_suite_focus=true
Make sure to run flutter pub upgrade
Thanks for the quick response.
The link you provided was useful to notice that I should not use the most recent build_runner (1.10.3), but 1.10.2.
I still dont know why when I downgraded flutter to 1.20.4, freezed generator worked propperly, but nevermind, this solved it.
I post this for anyone having my same issue.
Thank you!
I am having the same issue with Flutter 1.22.0 as well.
I am using build_runner 1.10.2
[SEVERE] freezed:freezed on lib/main_prod.dart:
Bad state: Unexpected diagnostics:
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:152:17 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:119:41 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:133:32 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:186:51 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:88:62 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:153:38 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:64:4 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:154:25 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:18:17 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:118:48 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:132:37 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:19:11 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:159:38 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:168:32 - This requires the 'non-nullable' language feature to be enabled.
/Users/danilo.fuchs/flutter/bin/cache/pkg/sky_engine/lib/ui/channel_buffers.dart:47:14 - This requires the 'non-nullable' language feature to be enabled.
The build hangs after a while:
[INFO] 1m 44s elapsed, 2/18 actions completed.
[INFO] 1m 45s elapsed, 2/18 actions completed.
[INFO] 1m 46s elapsed, 2/18 actions completed.
[INFO] 1m 47s elapsed, 2/18 actions completed.
[WARNING] No actions completed for 15.1s, waiting on:
- freezed:freezed on lib/main_stg.dart
- freezed:freezed on lib/main.dart
- freezed:freezed on lib/env/env_staging.g.dart
- freezed:freezed on lib/env/config_stg.dart
- freezed:freezed on lib/env/env_prod.g.dart
.. and 11 more
[INFO] 1m 48s elapsed, 2/18 actions completed.
[INFO] 1m 49s elapsed, 2/18 actions completed.
[INFO] 1m 50s elapsed, 2/18 actions completed.
[INFO] 1m 51s elapsed, 2/18 actions completed.
Same issue, but solved by fixing analyzer version to 0.39.17.
dev_dependencies:
build_runner: 1.10.2
analyzer: ^0.39.17
Most helpful comment
Same issue, but solved by fixing
analyzerversion to 0.39.17.