Upgrading code_builder 2 to 3
Breaking2.4.0 → 3.7.0Breaking4Platform2Deprecated1New18Changed11Fixed7Other2
BreakingUpgrade verdict
4 breaking changes and 2 platform requirement changes.
In plain terms
- The package no longer reads the old .packages file format; only the newer configuration file is supported.
- Two functions get new names and lose an option that is no longer needed; the old names still work but are deprecated.
- Two old classes that were already marked deprecated are gone, so code still using them will not compile.
- Whether a method is written as a lambda is now worked out from its body when possible, and the setting starts out unset instead of having a default value.
Must act Top 5 of 7 that need code or config changes
Dart SDK requirement changed in 3.4.0: >=2.0.0-dev <2.0.0 → >=2.7.0 <3.0.0.
What you must change
Breaking4
Removes support for the .packages file, which the Dart SDK no longer supports or generates.
.packagesRenames readAnyConfigFile to readConfigFile and readAnyConfigFileUri to readConfigFileUri, removing the preferNewest parameter.
readAnyConfigFilereadConfigFilereadAnyConfigFileUrireadConfigFileUripreferNewestRemoves the deprecated
Annotation and File classes.AnnotationFileMethod.lambda is now inferred from Method.body where possible and defaults to null.Method.lambdaMethod.bodyPlatform2
Requires Dart 3.4.
Requires Dart 3.0.
Deprecations to plan for
Deprecated1
Deprecates readAnyConfigFile and readAnyConfigFileUri, which forward to the new functions without preferNewest.
readAnyConfigFilereadAnyConfigFileUri