Description
The Swift Package Manager documentation at /packages-and-plugins/swift-package-manager/for-app-developers uses the deprecated disable-swift-package-manager pubspec.yaml syntax instead of the new config section format.
Current (Outdated) Documentation
The file src/_includes/docs/swift-package-manager/how-to-enable-disable.md shows:
flutter:
disable-swift-package-manager: true
Expected (Correct) Documentation
As documented in src/content/tools/pubspec.md and implemented in flutter/flutter#168433, the configuration has moved to the config section:
flutter:
config:
enable-swift-package-manager: false
Error Message Users See
When using the old syntax, Flutter now displays:
Error detected in pubspec.yaml:
The "disable-swift-package-manager" configuration has moved. In your pubspec.yaml:
# Before
flutter:
disable-swift-package-manager: true
# After
flutter:
config:
enable-swift-package-manager: false
Affected Files
src/_includes/docs/swift-package-manager/how-to-enable-disable.md
Related
- flutter/flutter#167953 - Added
flutter: config: section to pubspec.yaml
- The
src/content/tools/pubspec.md page has already been updated with the correct syntax
Flutter Version
This affects Flutter 3.38.x and later where the old syntax produces an error.
Description
The Swift Package Manager documentation at
/packages-and-plugins/swift-package-manager/for-app-developersuses the deprecateddisable-swift-package-managerpubspec.yaml syntax instead of the newconfigsection format.Current (Outdated) Documentation
The file
src/_includes/docs/swift-package-manager/how-to-enable-disable.mdshows:Expected (Correct) Documentation
As documented in
src/content/tools/pubspec.mdand implemented in flutter/flutter#168433, the configuration has moved to theconfigsection:Error Message Users See
When using the old syntax, Flutter now displays:
Affected Files
src/_includes/docs/swift-package-manager/how-to-enable-disable.mdRelated
flutter: config:section to pubspec.yamlsrc/content/tools/pubspec.mdpage has already been updated with the correct syntaxFlutter Version
This affects Flutter 3.38.x and later where the old syntax produces an error.