You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using the freezed package in Flutter, if the part directive is not annotated with the .freezed.dart file name, Dart starts consuming a significant amount of RAM. The memory usage keeps increasing with each passing second. The freezed process in the console becomes unresponsive, and even after stopping the file generation process, Dart continues to consume more RAM. The only way to stop this is by manually killing the Dart process.
Note
I want to note that this is not a critical bug, since it comes from developer wrong usage of the package, but I think that this scenario should be handled somehow to prevent such resource consumption issues.
To Reproduce
Create a new Flutter project.
Add the freezed package to pubspec.yaml.
Create a Dart file with a freezed class but forget to add the part directive with the .freezed file name. eg. part 'x.dart';
Run the build runner to generate the code.
Expected behavior
An error should be thrown or the process should stop without consuming excessive RAM.
Actural behavior
The Dart process starts consuming more RAM continuously, and the freezed process gets stuck. The RAM usage keeps increasing until the Dart process is manually killed.
Description
When using the freezed package in Flutter, if the part directive is not annotated with the .freezed.dart file name, Dart starts consuming a significant amount of RAM. The memory usage keeps increasing with each passing second. The freezed process in the console becomes unresponsive, and even after stopping the file generation process, Dart continues to consume more RAM. The only way to stop this is by manually killing the Dart process.
Note
I want to note that this is not a critical bug, since it comes from developer wrong usage of the package, but I think that this scenario should be handled somehow to prevent such resource consumption issues.
To Reproduce
Expected behavior
An error should be thrown or the process should stop without consuming excessive RAM.
Actural behavior
The Dart process starts consuming more RAM continuously, and the freezed process gets stuck. The RAM usage keeps increasing until the Dart process is manually killed.
Environment
Dart SDK version: 3.4.4
Flutter version: 3.22.3 stable
freezed version: 2.4.7
freezed annotation version: 2.4.1
Operating System: Windows 10
The text was updated successfully, but these errors were encountered: