-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Use platform specific line separator in gen-l10n #130090
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
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
@@ -2,6 +2,8 @@ | |||
// Use of this source code is governed by a BSD-style license that can be | |||
// found in the LICENSE file. | |||
|
|||
import 'dart:io'; |
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.
Don't import dart:io
into the tool. Instead you can use: https://github.com/christopherfujino/flutter/blob/re-enable-packages-autoroller/packages/flutter_tools/lib/src/base/platform.dart#L38
One thing we should consider is whether the repo (if it's version-controlled by Git) is configured as CRLF or LF, because there are multiple options when checking out files on Windows, such as "Checkout as-is, Commit as-is" and "Checkout Windows-style, Commit Unix-style". |
Yeah, it seems to me like there isn't one universally correct solution for all Windows users. Apparently the command However, on my windows machine, where I'm pretty sure I have git configured to "Checkout Windows-style, Commit Unix-style", I have a mixture of One thing we could do is add a flag, and let this be user configurable. |
@AlexV525 @christopherfujino I changed it so that the generated files uses the same line terminator as that of |
Should be great enough IMO. +1. Could we document it somewhere? |
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
flutter/flutter@544d30d...c40173f 2023-07-13 [email protected] Revert "Roll Flutter Engine from 16e2ab7e986c to 1b1ccdd1f527 (13 revisions)" (flutter/flutter#130479) 2023-07-13 [email protected] Roll Flutter Engine from 16e2ab7e986c to 1b1ccdd1f527 (13 revisions) (flutter/flutter#130458) 2023-07-13 [email protected] Exclude `Tooltip`'s overlay child from SelectableRegion (flutter/flutter#130181) 2023-07-12 [email protected] Update `Checkbox` tests for M2/M3 (flutter/flutter#130351) 2023-07-12 [email protected] Refactor JSNumber.toDart and Object.toJS (flutter/flutter#129436) 2023-07-12 [email protected] Reland [a11y] CupertinoSwitch On/Off labels (flutter/flutter#130173) 2023-07-12 [email protected] Add missing links to examples that aren't linked anywhere (flutter/flutter#130422) 2023-07-12 [email protected] Use platform specific line separator in gen-l10n (flutter/flutter#130090) 2023-07-12 [email protected] Update `Divider`/`VerticalDivider` and theme tests for M2/M3 (flutter/flutter#130415) 2023-07-12 [email protected] Roll Flutter Engine from 5c887028810d to 16e2ab7e986c (2 revisions) (flutter/flutter#130421) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Currently files are not generated with `\r\n` in windows. This PR should fix the issue. Fixes flutter#109761.
Currently files are not generated with
\r\n
in windows. This PR should fix the issue.Fixes #109761.