-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
dartc should ignore leading newline in multi-line strings, like VM #398
Comments
This comment was originally written by [email protected] Added Area-Compiler, Triaged labels. |
Set owner to @scheglov. |
Yes, but what is NEWLINE? NEWLINE: So, NEWLINE is '\n' or '\r' However 03_3_Strings_A03_t01.dart and all co19/src/LangGuideTest/03_Values tests use Windows style newline "\r\n". JFYI, DartC right now skips leading '\n' (and only it). |
This comment was originally written by [email protected] Not an issue for dartc anymore, but possibly a co19 or spec issue. Removed the owner. |
Peter/Gilad, not sure if this is still an issue and if so whether it is a co19 or spec issue. cc @peter-ahe-google. |
I don't see a definition of NEWLINE in the spec any more. I think it is important that we explain exactly what is done with newline sequences in all situations, and that \r\n and \n are accepted as newlines. Is there ever a case in which we want to emit a \r\n without writing it explicitly? If there was a text-mode file write for Windows, we might. |
If you search for NEWLINE, you get this hit on page 43: NEWLINE: This definition is not good enough. I think we should just adopt the convention from XML http://www.w3.org/TR/REC-xml/#sec-line-ends This means that all newlines are normalized to \n. Notice that it is not good enough to simply say that \r is translated to \n. |
Added this to the M1 milestone. |
Allow disabling named param destructuring with --destructure-named-params (issue #396)
…watcher, yaml, yaml_edit Revisions updated by `dart tools/rev_sdk_deps.dart`. crypto (https://github.com/dart-lang/crypto/compare/63e9a90..f2efb98): f2efb98 2024-01-02 Kevin Moore Require Dart 3.2, update and fix lints (#158) logging (https://github.com/dart-lang/logging/compare/324a0b5..4d35a4e): 4d35a4e 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#152) mime (https://github.com/dart-lang/mime/compare/56359b0..ca9f059): ca9f059 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#111) path (https://github.com/dart-lang/path/compare/115ea2a..57a049c): 57a049c 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#157) 5b6aac7 2023-12-20 Kevin Moore blast_repo fixes (#156) pool (https://github.com/dart-lang/pool/compare/3c1bd42..4c49000): 4c49000 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#79) 7e03d80 2023-12-20 Kevin Moore blast_repo fixes (#78) shelf (https://github.com/dart-lang/shelf/compare/b3adc7c..733588f): 733588f 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#401) 1eab426 2024-01-01 dependabot[bot] Bump actions/labeler from 4.3.0 to 5.0.0 (#402) 10cbffe 2023-12-14 Kevin Moore Run web tests with wasm with dev Dart sdk (#398) stack_trace (https://github.com/dart-lang/stack_trace/compare/4abff44..0f4710c): 0f4710c 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#148) tools (https://github.com/dart-lang/tools/compare/ed81684..2f59ab4): 2f59ab4 2024-01-02 Daco Harkes [graphs] Clean up lints for Dart 3.3 (#221) 01fa883 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#223) 9d4fe2f 2024-01-01 dependabot[bot] Bump actions/labeler from 4.3.0 to 5.0.0 (#222) 6d260b8 2023-12-14 Elias Yishak Update USAGE_GUIDE to update the `flutterChannelCount` key in `LogFileStats` (#219) 56a30ce 2023-12-11 Elias Yishak Add `enabledFeatures` key to `Analytics` constructors (#217) watcher (https://github.com/dart-lang/watcher/compare/dc45f19..66cd694): 66cd694 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#161) 679d308 2023-12-20 Kevin Moore blast_repo fixes (#160) yaml (https://github.com/dart-lang/yaml/compare/98a3aab..509fd72): 509fd72 2023-12-11 Kevin Moore update lints, require Dart 3.0 (#156) yaml_edit (https://github.com/dart-lang/yaml_edit/compare/9b9d33c..47eb20e): 47eb20e 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#63) a39ec39 2023-12-20 Kevin Moore blast_repo fixes (#62) Change-Id: I8009f4957a0eb751f36c2ec1be8aacbfc44ca586 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344400 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Devon Carew <[email protected]>
This issue was originally filed by [email protected]
main() {
var str = """
hello
""";
Expect.equals("h", str[0], "str should begin with h (no leading newline)");
}
Background in issue #240: <http://code.google.com/p/dart/issues/detail?id=240>.
The text was updated successfully, but these errors were encountered: