Add TargetPlatform linux/windows breaking change migration guide.#3746
Add TargetPlatform linux/windows breaking change migration guide.#3746sfshaza2 merged 3 commits intoflutter:masterfrom
Conversation
sfshaza2
left a comment
There was a problem hiding this comment.
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.
The meta data shouldn't have any links. Remove both of these
There was a problem hiding this comment.
OK, done. Can the metadata lines be wrapped, or do they have to be one per line?
There was a problem hiding this comment.
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.
I don't know what you mean by "shim" but will other devs know?
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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? |
This adds a migration guide to go with the flutter/flutter#51519 PR.