Closed zgramming closed 2 years ago
The option has been removed and always defaults to true
now. So you can just remove it from your build.yaml
file without any changes.
Thanks for pointing out the missing changelog entries and the outdated documentation! I have updated them to mention this as well.
I had the same issue migrating from 1.7.1 to 2.1.0. I got the following error:
[SEVERE]
CheckedFromJsonException
Could not create `DriftOptions`.
Unrecognized keys: [compact_query_methods, new_sql_code_generation]; supported keys: [write_from_json_string_constructor, override_hash_and_equals_in_result_sets, skip_verification_code, use_data_class_name_for_companions, use_column_name_as_json_key_when_defined_in_moor_file, generate_connect_constructor, sqlite_modules, sqlite, sql, data_class_to_companions, mutable_classes, raw_result_set_data, apply_converters_on_variables, generate_values_in_copy_with, named_parameters, named_parameters_always_required, scoped_dart_components, store_date_time_values_as_text]
pub finished with exit code 78
Removed compact_query_methods
and new_sql_code_generation
from build.yaml and it worked.
Describe the bug
Upgrade package from 1.7.1 to 2.1.0, then re-generate code using
flutter pub run build_runner build --delete-conflicting-outputs
then get error :When I analyze the error, this error is directed at the build.yaml file. This is my
build.yaml
Already see the changelog for breaking change for upgrade Version 1.X into 2.X but the changelog not notice this, because when i generate in version 1.X is totally fine. And in documentation about Builder Option still in available options.
To solve problem, i comment the option
compact_query_methods
.