Improve 'flutter downgrade' error message#154434
Merged
auto-submit[bot] merged 1 commit intoflutter:masterfrom Sep 4, 2024
Merged
Improve 'flutter downgrade' error message#154434auto-submit[bot] merged 1 commit intoflutter:masterfrom
auto-submit[bot] merged 1 commit intoflutter:masterfrom
Conversation
4 tasks
andrewkolos
reviewed
Aug 30, 2024
Comment on lines
+211
to
+213
| if (buffer.isEmpty) { | ||
| buffer.writeln(); | ||
| } |
Contributor
There was a problem hiding this comment.
Why is this extra writeln call necessary? Is the condition meant to be negated here (I don't know this code).
Member
Author
There was a problem hiding this comment.
This adds an extra line between the help text and the list of channel last versions:
To switch to a specific Flutter version, see: https://flutter.dev/to/switch-flutter-version
Channel "master" was previously on: v1.2.3.
Channel "beta" was previously on: v1.0.0.
Without this, the output would be:
To switch to a specific Flutter version, see: https://flutter.dev/to/switch-flutter-version
Channel "master" was previously on: v1.2.3.
Channel "beta" was previously on: v1.0.0.
Is the condition meant to be negated here (I don't know this code).
This condition is intentional. We only want to add this extra new line on the first channel we output, and only if we output at least one channel.
Contributor
There was a problem hiding this comment.
ah. understood—thanks!
sfshaza2
pushed a commit
to flutter/website
that referenced
this pull request
Aug 30, 2024
Explains how to switch to a specific Flutter version. This will be used by the Flutter tool's error message when a user attempts to `flutter downgrade` but has never used the `flutter upgrade` command: flutter/flutter#154434 ## Presubmit checklist - [x] This PR is marked as draft with an explanation if not meant to land until a future stable release. - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
Member
|
autosubmit didn't merge?! CI is green 👀 |
Member
Author
|
Let's try the good ol' turn it off and on again! |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Sep 5, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Sep 5, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Sep 5, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Sep 5, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Sep 5, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 11, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flutter downgradefails if you haven't usedflutter upgrade:It's not clear what actions a user should take from this error message. Here's the new error message:
Depends on flutter/website#11098
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.