Skip to content

Add docs on bumping Dart#187540

Open
Piinks wants to merge 2 commits into
flutter:masterfrom
Piinks:bumpDartDocs
Open

Add docs on bumping Dart#187540
Piinks wants to merge 2 commits into
flutter:masterfrom
Piinks:bumpDartDocs

Conversation

@Piinks
Copy link
Copy Markdown
Contributor

@Piinks Piinks commented Jun 3, 2026

Adds documentation on how we should update the Dart SDK in flutter/flutter.
I have also wrapped this process up in a skill, but in following the instructions for adding skills to the repo, I want to test it out first. I'll be bumping Dart next to take it for a test drive. 😎

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 3, 2026
@github-actions github-actions Bot added team-infra Owned by Infrastructure team d: docs/ flutter/flutter/docs, for contributors labels Jun 3, 2026
@Piinks Piinks requested review from bkonyi, justinmc and reidbaker June 3, 2026 22:27
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new documentation file, Bumping-the-Dart-SDK-version.md, which outlines the process, policy, and instructions for bumping the minimum Dart SDK version constraint across the repository. Additionally, docs/infra/README.md is updated to include links to this new document and other related guides. The review feedback suggests replacing a platform-specific sed command in the documentation with a portable perl command to ensure compatibility across both macOS and Linux environments.

Comment on lines +59 to +60
# Example using find and sed to bump from ^3.10.0-0 to ^3.13.0-0
find . -name "pubspec.yaml" -not -path "*/.dart_tool/*" -exec sed -i '' 's/sdk: \^3.10.0-0/sdk: \^3.13.0-0/g' {} +
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The sed -i '' command is platform-specific and only works on macOS (BSD sed). On Linux (GNU sed), this command will fail because it interprets '' as an input file. Using perl -pi -e is a highly portable alternative that works identically on both macOS and Linux.

Additionally, the caret (^) does not need to be escaped in the replacement portion of the s/pattern/replacement/ command, as it has no special meaning there. Escaping it can lead to an unwanted literal backslash being written to the files.

Suggested change
# Example using find and sed to bump from ^3.10.0-0 to ^3.13.0-0
find . -name "pubspec.yaml" -not -path "*/.dart_tool/*" -exec sed -i '' 's/sdk: \^3.10.0-0/sdk: \^3.13.0-0/g' {} +
# Example using find and perl to bump from ^3.10.0-0 to ^3.13.0-0
find . -name "pubspec.yaml" -not -path "*/.dart_tool/*" -exec perl -pi -e 's/sdk: \^3.10.0-0/sdk: ^3.13.0-0/g' {} +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD d: docs/ flutter/flutter/docs, for contributors team-infra Owned by Infrastructure team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant