Skip to content

Swift Package Manager docs use deprecated pubspec.yaml syntax #12924

@dbebawy

Description

@dbebawy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-mediumNecessary but not urgent concern. Resolve when possible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions