-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add TargetPlatform linux/windows breaking change migration guide. #3746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sfshaza2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from some grammar stuff, we can't merge this PR until we have an actual release #.
src/docs/release/breaking-changes/target-platform-linux-windows.md
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,153 @@ | |||
| --- | |||
| title: Adding `linux` and `windows` to [`TargetPlatform`][] enum | |||
| description: Two new values were added to the [`TargetPlatform`][] enum that could require additional cases in switch statements that switch on a [`TargetPlatform`][]. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The meta data shouldn't have any links. Remove both of these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, done. Can the metadata lines be wrapped, or do they have to be one per line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just seeing this question now! The description: line in the YML meta data needs to be a single line or Travis fails.
src/docs/release/breaking-changes/target-platform-linux-windows.md
Outdated
Show resolved
Hide resolved
src/docs/release/breaking-changes/target-platform-linux-windows.md
Outdated
Show resolved
Hide resolved
| } | ||
| ``` | ||
|
|
||
| And the shim in `main()` is no longer required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what you mean by "shim" but will other devs know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably? I reworded it here and below to not use "shim" anyhow.
src/docs/release/breaking-changes/target-platform-linux-windows.md
Outdated
Show resolved
Hide resolved
| This can cause the Dart analyzer to give the [`missing_enum_constant_in_switch`][] | ||
| warning for switch statements which don't include a `default` case. Writing a | ||
| switch without a `default:` case is the recommended way to handle enums, since | ||
| the analyzer can then help you find any cases which aren't handled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which => that
Guidance on what to use when:
https://www.quickanddirtytips.com/education/grammar/which-versus-that-0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks for the guidance.
src/docs/release/breaking-changes/target-platform-linux-windows.md
Outdated
Show resolved
Hide resolved
|
|
||
| ## Timeline | ||
|
|
||
| This change was made in March 2020. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have the release number? We can't merge this PR until we have an actual release #.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not yet. The PR is not yet committed. Once it is, I'll have a release number.
| Relevant PRs: | ||
| * [Add Windows, and Linux as TargetPlatforms][] | ||
|
|
||
| [`debugDefaultTargetPlatformOverride`]: {{site.api}}/flutter/foundation/debugDefaultTargetPlatformOverride.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer these links to be alphabetical, but that's just a minor nit. I wouldn't hold up merging for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The are alphabetical, it's just that the backtick character sorts before letters. :-)
Re-sorted, ignoring formatting marks.
9cd16e3 to
886c3ae
Compare
|
@sfshaza2, OK, I've added the specific version now that the PR has landed. Is there anything else this needs? |
sfshaza2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This adds a migration guide to go with the flutter/flutter#51519 PR.