-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DateTime.parse() does not strictly include RFC 3339: limited millisecond length #24205
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
Comments
I have this problem as well. Dart fails to parse dates generated by Go, f.e.: |
Is there a reason why Dart refers to "ISO8601" while Go refers to "RFC3339". Could the two teams in Google maybe agree on a standard to follow? :) |
I'm having this issue too. It is really annoying having to chop off some digits of the string I get from Go's time.Time in order for DateTime to parse it correctly. |
I think I solved it by in Go, making a |
@stevenroose I solved it in dart by just taking a substring. But I think the Dart SDK should address this specifically. A default server timestamp from Go should have no issues parsing through Dart. Even if we lose precision. Perhaps the parse could optionally chop off the extra digits? |
@curtiscovington I had a substring thing first, but it broke when using different time zones etc. Yeah Dart should surely solve this. |
See also #1878. |
I have the same issue with creating Dart As you see this format is using nanoseconds ( The quick fix I used: drop the sub-microsecond digits (from between 7th to 9th) // You could add a stricter/looser verification, but for my usecase, this was enough.
// Also, decide what you want to do with an invalid input: return null, return the original string, or throw an exception?
String _ignoreSubMicro(String s) {
if (s.length > 27) return s.substring(0, 26) + s[s.length - 1];
return s;
}
// Example usage
void main() {
const invalidNano = "2019-05-31T10:35:45.347333481Z";
// DateTime.parse(invalidNano); // This would fail:
final date = DateTime.parse(_ignoreSubMicro(invalidNano));
print(date);
} What would be the implications of allowing nanosecond values? Or is it complicated because of the time zones? As I see the |
Same problem with date strings created in C#: For example: DateTimeOffset.Now.ToString("O") outputs: "2019-08-09T06:55:01.8968264+00:00" |
Can we get a response to vargavince91's comment please? |
I created a pub package to address this exact problem for |
* Add nonfunction-type-aliases experimental flag Change-Id: I203af5227ecfee8c9e6b0f4985f68e38a18553c0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125203 Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Dmitry Stefantsov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Updated analyzer error messages in variance_multi_subclass_error_test. Change-Id: If3e85c8cc6a92cdafe146769628ea5c11a5bfcab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125362 Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Kallen Tu <[email protected]> * Temporarily do not enable nnbd when building packages for ddc tests This will make the nnbd-ddc bot green again. To properly support compiling these packages in the future, we need to either migrate them or add to the CFE the machanism to select whether a package is opt-out. Change-Id: Ia8c5fa1a8000e233af20c87e877e2c666cb4354e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125420 Auto-Submit: Sigmund Cherem <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> * [nnbd_migration] Show "exact nullability" in output directory. Change-Id: I29545fe358282aa05dee10ed7ff5e86ea899581e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125222 Commit-Queue: Mike Fairhurst <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Paul Berry <[email protected]> * [fuzzer] Added void functions to the API table Change-Id: I048607903ba15f604a9d0784b75061ac0d0d397c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125305 Commit-Queue: Fizaa Luthra <[email protected]> Reviewed-by: Ben Konyi <[email protected]> Reviewed-by: Aart Bik <[email protected]> * Migration: don't mark fields as nullable due to factory and redirecting constructors. Change-Id: I4b60a2bea125089d86e2368b3e674adf5ef402aa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125460 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Paul Berry <[email protected]> * [analyzer] Modified type inference constraints wrt variance. Change-Id: I0502bad1c57af358453c78d27fe738880beb7b4e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125021 Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Kallen Tu <[email protected]> * nnbd preview tool: Better text when inserting 'required' Helps with #39247 Change-Id: I3bb7b25c73d58fc49260d6e3019b58b2f3f6b80a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125440 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Paul Berry <[email protected]> * Add a failing test case for http://dartbug.com/39401 -- quick fix improvement around angular generated files Change-Id: I784baefaa41db4e45c183335b73e7bb33991070a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125464 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Jaime Wren <[email protected]> * Migration: account for definite assignment. Fixes #38344. Change-Id: I64d17fe1e571fc708632c0e48b6556e2094a91e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125443 Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Paul Berry <[email protected]> * [vm, reload] Guard against field loads that no longer conform to the field's static type. Fix incorrect type arguments when noSuchMethod forwarders allocate Invocation's typeArguments. Change-Id: I0fd2782bc96f500f31dbbdd2aa896c8caf1f0045 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123692 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]> * [vm] Late modifier for non-final local variables. I also added a test for top level late variables (they already worked). Bug: https://github.com/dart-lang/sdk/issues/38841 Change-Id: I6720e6476a067c7f8b21a34b87b23ab14fc866a8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125224 Commit-Queue: Liam Appelbe <[email protected]> Reviewed-by: Alexander Markov <[email protected]> Reviewed-by: Régis Crelier <[email protected]> * [analyzer] Report invalid variance positions in methods of a class. Change-Id: I425f81e7e64a02b29e094dab53f37318a09a3c62 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125228 Commit-Queue: Kallen Tu <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * [dart2js] Fix a few missing and one unneeded `covariant`s Change-Id: Ic5fe4ec2230b233301c628fee8436471a0dbfdb3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125445 Reviewed-by: Mayank Patke <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * [vm, service] Compute allocation stats on demand, instead of during allocation and GC. Removes support for accumulators, which now repeat the current live values. Decreases performance difference between release and product modes. Fixes inaccuracy when counters are queried before the first full GC. Golem geomean x64 4.687% Golem geomean arm64 5.770% Bug: https://github.com/dart-lang/sdk/issues/37678 Change-Id: I12b26a9834b0f0f911ddcc6e8e5ff4573272607d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116885 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> * [ dart:io ] Added timeline events for HttpClient connections and requests Setting the `enableTimelineLogging` property of `HttpClient` to true results in timeline events being created for HTTP connections and HTTP requests. Timeline events contain general connection information, including: - Request type - Status code - Request / response headers - Cookies - Non-sensitive proxy information - Relevent error messages for failed connections Change-Id: Ibe16a312ab5398c9ae886ea07bea5ca70b63e440 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123540 Commit-Queue: Ben Konyi <[email protected]> Reviewed-by: Ryan Macnak <[email protected]> * [test] Explicitly mark streamed_conversion_json_utf8_decode_test as slow in reload test modes. Change-Id: I60777b0fd3a20b340b12225a24529474eb75b2af Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125483 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Ryan Macnak <[email protected]> * [VM/nnbd] Pass NNBD mode to runtime functions whose semantics depend on it. Runtime functions do not yet implement the NNBD semantics. In a next change, generated code will pass NNBD mode to the runtime. Declare one new VM flags: --strong-non-nullable-type-checks Change-Id: I050a468e4a6b665ce46c345bafba04a947cf7cb0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124105 Commit-Queue: Régis Crelier <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> * Add more explaination to existing examples Change-Id: I2f89ef54eb4467d23f7507c1217385a1df2d4a11 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124594 Commit-Queue: Kathy Walrath <[email protected]> Reviewed-by: Kathy Walrath <[email protected]> * Reland "[cfe] Use StaticTypeContext for getStaticType" and more" This relands commits "[cfe] Use StaticTypeContext for getStaticType" 45033c6ad9725be939f2baa019301f702efc694c "[cfe] Move caching of thisType to CoreTypes" fab25cbe0c1a774a7b0adc663373cdb9dc6cd070 "[vm/bytecode] Notify static type context when entering/leaving library" c9f88ae2533af510564154b50f1c5a099a72b342 Change-Id: I407d6b0e3b3df503cedc9fcb2c834d835cf083f8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125343 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Johnni Winther <[email protected]> * Make json.fuse(utf8) work correctly. Change-Id: Ie4d5164759c1d4a8c19e216bfac50b116271f1a1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125342 Reviewed-by: Erik Ernst <[email protected]> Commit-Queue: Lasse R.H. Nielsen <[email protected]> * [dart2js] Address new UNUSED_ELEMENT warnings Change-Id: I391b32a5d0753215773b1849c3a953258d3c435e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125490 Reviewed-by: Stephen Adams <[email protected]> Commit-Queue: Stephen Adams <[email protected]> * [CFE] Clear initializers unconditionally in prepareInitializers There doesn't appear to be any reason to guard the clearing, and in a future CL it makes sense for it to always be cleared. Change-Id: Id75a0ceb51dff474f20ac5aa5a05e56e49c00698 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125401 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Jens Johansen <[email protected]> * [cfe] Use BinaryExpression in compounds Change-Id: I82c420bbc2e6d85eef0d602c3993487b78e91f19 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125409 Reviewed-by: Jens Johansen <[email protected]> * [cfe] Split inferMethodInvocation into invocation variants Change-Id: I4ca0cb419652b4d822d8eb945a77b7243012ed1e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125411 Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Jens Johansen <[email protected]> * [infra] test.dart: Download build results while running the tests Change-Id: Ieb92069e08d9a1df8e0692b27086616b4d71e66e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124329 Commit-Queue: Karl Klose <[email protected]> Reviewed-by: William Hesse <[email protected]> * [SDK] Adds disasm. flags for FORCE_INCLUDE_DISASSEMBLER. This CL enables passing --disassemble to e.g. a product mode gen_snapshot which used to not have the flag even when the disasm. was forcefully included. This CL also: - Fixes numerous typos: marco -> macro. - Reorders the _four_ types of flags in order of strictness. Change-Id: I8e3ef75ea0a748a6af5fa48cf289a57beeb51148 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125404 Commit-Queue: Clement Skau <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> * [kernel] Handle property invocation in MethodInvocation.getStaticType Change-Id: I4a1ecdb9842f4f189be67e5f5d1b99ddb40d41da Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125202 Reviewed-by: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Johnni Winther <[email protected]> * [vm/async] Encode the yield index -> token position in PcDescriptors. Right now `Script::yield_positions()` is an array mapping function start token positions to arrays. Those arrays contain token positions and are indexed by yield index. => This `Script::yield_positions()` is not available in AOT mode. The fast async stack implementation will need to be able to find out where an async closure was suspended. It does so by looking at the ":await_jump_var", which contains the yield index. It then needs to associate the yield index to token position of the yield. This CL adds an entry into the PcDescriptors for every yield in a async/async* function and removes `Script::yield_positions()`. The entry will associate the yield index with the token position. Flutter gallery total size impact for flutter-release: - armv7: +0.016% - armv8: +0.045% Issue https://github.com/dart-lang/sdk/issues/37668 Change-Id: I0b2ce41e85d8f5d590201bf2fb091578d7379890 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125408 Commit-Queue: Martin Kustermann <[email protected]> Reviewed-by: Clement Skau <[email protected]> Reviewed-by: Alexander Markov <[email protected]> * [CFE] Encapsulate 'Stack' and create DebugStack as an option Change-Id: Ib3dd188e3b2c65d6e6824487ae7794fe9214bfbb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125264 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Jens Johansen <[email protected]> * [CFE] getFormal via Identifier (name and offset) and not just String (name) Change-Id: I78059e627edaf8876eee74f878b36cfce990b78f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125265 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]> * [CFE] Mark initializer as inferred and don't redo work No reason to do the same work twice. Change-Id: I8cea469f91dc7087b31bb80352723f0158dcaa6a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125402 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]> * [SDK] Fixes FORCE_INCLUDE_DISASSEMBLER build in PRODUCT. CodeObservers is not available in PRODUCT, but FORCE_INCLUDE_DISASSEMBLER will enable code that uses (but doesn't strictly need) it. This is related to https://dart-review.googlesource.com/c/sdk/+/125404. Tested: ./tools/build.py --arch x64 --mode product dart_precompiled_runtime gen_snapshot Change-Id: I5f0c0765a608b50704045c918b41c71398b89390 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125263 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Clement Skau <[email protected]> * [vm] Set all entrypoints when reading JIT snapshots. Fixes https://github.com/dart-lang/sdk/issues/39397 Change-Id: I328f6707e9f316decb5207cc11872886431fe5f7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125410 Commit-Queue: Samir Jindel <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> * [cfe] Demote inferred type variables when used as type arguments Closes #39346 Change-Id: I997347d04e7a3c3cb9786f31cd6c24513307de92 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125502 Reviewed-by: Dmitry Stefantsov <[email protected]> Commit-Queue: Johnni Winther <[email protected]> * Issue 38551. Fix for reading references to PropertyAccessorElement(s) defined in extensions. [email protected] Bug: https://github.com/dart-lang/sdk/issues/38551 Change-Id: Id93714a2db97ff1ab448fe408f4e86df9988a147 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125520 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Issue 38506. Don't attempt to use LibraryElement.metadata for not the first LibraryDirective. [email protected] Bug: https://github.com/dart-lang/sdk/issues/38506 Change-Id: Ib76b1e81554f061622ec98fae21b4dd9a1280c24 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125521 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Issue 38992. Build annotation elements for type parameter elements on their creation. [email protected] Bug: https://github.com/dart-lang/sdk/issues/38992 Change-Id: I98f7690914ce2acb7074a8333b9a482605bb9afb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125527 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Issue 39028. Guard against mixin constructor in FieldFormalParameter completion. [email protected] Bug: https://github.com/dart-lang/sdk/issues/39028 Change-Id: I78e4df6baa8424231aeb2c8044d9cb5c685dcdbe Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125524 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Issue 39025. ForEachPartsWithIdentifier does not define anything, don't pretend that it is a LocalVariableElement. [email protected] Bug: https://github.com/dart-lang/sdk/issues/39025 Change-Id: Ieda56c73a1928434a29aa947c44fc29b66a79464 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125525 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Issue 39021. Guard against invalid generic type alias, without function type. [email protected] Bug: https://github.com/dart-lang/sdk/issues/39021 Change-Id: I0259ef04f95e1935ca273b5540aafb069c7ad455 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125526 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Support for creating and displaying edits in the preview tool Change-Id: I2284ceeb0229d7111022eb3759e39752264f1bc6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125492 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> * [vm] Enable Dart VM to run in QEMU user-mode emulation for ARM. Normally we consult /proc to determine the host architecture. However, this reports the actual host architecture, not the QEMU-simulated one. Also, GDB cannot debug position-independent executables in QEMU, so we disable PIE when compiling for execution in QEMU. Pass '--use-qemu' to 'gn.py' to build for QEMU. Change-Id: Ib125127ceb0582b66754cfc0da22e09d224ee1e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125267 Commit-Queue: Samir Jindel <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> * Migration: stop creating union edges for inferred types. Fixes #38341. Change-Id: I77e6bebc28ca917a13e5fd9958f5a7b3e0284834 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125448 Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Paul Berry <[email protected]> * Simplify ForEachPartsWithDeclaration case in LocalDeclarationVisitor. These nodes are never null. [email protected] Change-Id: Ia0b073f0816c7ba6243f0a8b47bb8b18b48ef802 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125560 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Issue 38953. Exit the unit element walker on enter into a directive. [email protected] Bug: https://github.com/dart-lang/sdk/issues/38953 Change-Id: I54e84e28f5d576bcd50c8bb10e99aefdae725c25 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125528 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * NNBD preview: Better messaging for non-late uninitialized variable Change-Id: Ica0433154f0f72d6f79159a77e0b784bdb1d6f40 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125561 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> * [nnbd_migration] track causations for substitution nodes Change-Id: I7da4f2923d9b99b0bd6c16644a7adeaeda437340 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125463 Reviewed-by: Paul Berry <[email protected]> * Issue 38878. Update SuperContext for annotations. [email protected] Bug: https://github.com/dart-lang/sdk/issues/38878 Change-Id: Ib2944fd60062fca0ec2899d83656cdc02b0a4a87 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125529 Reviewed-by: Brian Wilkerson <[email protected]> * Fix using interfaceType() without nullability, remove unused class. [email protected] Change-Id: I8c8ab46dc629e9a6895fdd37abc98d86e01590cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125541 Reviewed-by: Brian Wilkerson <[email protected]> * Attempt to work around repeating LinkedBundleContext exceptions. [email protected], [email protected] Change-Id: I4dd52770d2cc128ebfb82f49fe52d7d83ed65a9b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125562 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * [dart/compiler] Loop analysis and BCE improvements Rationale: Loop analysis did not take outer indices used as bounds (triangular loops) into account to enhance analysis. This left some obvious BCE optimizations on the table (mainly AOT). Observed improvements (performance and code size): About 5-15% performance on golem benchmarks: mainly armv7, and TypedData*Bench Minor overall code size reduction on flutter gallery (arm32,arm64) Comparing ./orig32.json (old) to ./new32.json (new) Old : 6614912 bytes. New : 6600336 bytes. Change: -14576 bytes. Comparing ./orig64.json (old) to ./new64.json (new) Old : 6459216 bytes. New : 6458736 bytes. Change: -480 bytes. Similar on velocity_tracker_bench (arm32,arm64) Comparing orig32.json (old) to new32.json (new) Old : 804280 bytes. New : 794552 bytes. Change: -9728 bytes. Comparing orig64.json (old) to new64.json (new) Old : 705520 bytes. New : 705312 bytes. Change: -208 bytes. Change-Id: Ifc3b3a378ae6fd98743c48944a86a9e90ce4da5c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117200 Reviewed-by: Vyacheslav Egorov <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Aart Bik <[email protected]> * [vm] Use a wrapper for bootstrap natives too. -80k (-0.33%) out/ProductX64/exe.stripped/dart -76k (-1.59%) out/ProductX64/exe.stripped/dart_precompiled_runtime Change-Id: Ib19aea40aa7a556ae90852ac30c8c08ce0a8b677 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125306 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Ryan Macnak <[email protected]> * NNBD migrator: Add Locations for each edit made in an NN fix Change-Id: I53342cb43910deea2f59f37d5795ddbb70cb6b0b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125480 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Modify DeclarationsContext.getLibraries to consider the entire context if it is a BazelWorkspace Change-Id: I3d06e46505741f9166acf66f68a9ee1654ac37d1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125564 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Jaime Wren <[email protected]> * Fix for dartbug.com/39401 -- quick fix improvement around angular generated files Change-Id: I363b8f14363a53f01fd170e36752a3f0a9ec8e48 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125412 Commit-Queue: Jaime Wren <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * (ddc) split call to build_pkgs: create packages for dartdevc-legacy and dartdevc separately We still have a single `dartdevc_test` rule that invokes both, but now they can run in parallel and this unblocks a subsequent change to build each pacakge separately under kernel. Depending on the timing of deleting dartdevc-legacy, we may want to consider adding a `dartdevc_legacy_test` vs `dartdevc_kernel_test` to keep the two more separate/siloed. Change-Id: Icc3f8fd21248aa09b553c41df708452d21b39b2f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125500 Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]> * Remove 'visitedTypes' from appendTo(). We don't have recursive types anymore. Change-Id: I3bb67c91d1ba6f277c93495ae77ca5eee2356d5f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125543 Reviewed-by: Brian Wilkerson <[email protected]> * [dartdevc] Migrating dart:async patch files for DDC to be nnbd-compliant. Change-Id: I822fc9db7ddfe95a6f561ef1acfc88f96f2635dd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125060 Commit-Queue: Mark Zhou <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> * [ dart:http ] Fix issue where setting HttpClient.enableTimelineLogging wasn't actually enabling timeline logging Change-Id: I12134eaf1cd79516376d266b9919535987f7703b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125565 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Ben Konyi <[email protected]> * Move type parameter variance tests for LUB to LeastUpperBoundTest. Change-Id: Ia1eda9f0be073043399488af43f9d0485656ceb0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125563 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Migration: Go ahead and generate migration output files even when a port is given Change-Id: I5912834d4cdf53ea3baab0dd15acd2df982ca5a5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125482 Reviewed-by: Brian Wilkerson <[email protected]> * Move TestPluginManager, MockServerChannel, and ServerError into utilities There's no reason these classes need to be in test, and I want to re-use them in a tool for testing NNBD migrations. Change-Id: I43686a44d5f8d83f0d1cc23315746250eb766681 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125485 Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Add a script to analysis_server/tool for testing out NNBD migration. The tool is configured with a .json file so it can access directories specific to the user's machine without needing hardcoded paths. Change-Id: Ifb38e1d0334628b24c50ded3a30fd12822876093 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125501 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Paul Berry <[email protected]> * Fix for OSR assert (debug) or crash (release) Rationale: Rename traverses blocks in DOM order, not in execution order. As a result, blocks that are directly entered from the entry should introduce synthetic phis during OSR with non-empty stack to make sure incoming stack values are merged properly. https://github.com/dart-lang/sdk/issues/39193 Change-Id: Ic35961169aa535657333c2ab14fbd2c4e1f0783f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125489 Reviewed-by: Alexander Markov <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Aart Bik <[email protected]> * [dart:_internal] Fix some analyzer errors in the NNBD fork Change-Id: Ie2ea74469c9308a619a3fb2af381c10dff2e249a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125547 Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * [analyzer] Report invalid variance positions in fields. Change-Id: I51a0e64907569a722fd1df58e098bb92254d53c6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125481 Commit-Queue: Kallen Tu <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Added language test for reified torn-off methods with explicit variance. Change-Id: I51892de84245bc31f442b5b01ab3d03ac869e86f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124913 Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Kallen Tu <[email protected]> * Migrating dart:convert patch files to NNBD. Change-Id: Ib1127853bc50682e674ccc783f958e7865118b6a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125063 Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Mark Zhou <[email protected]> * (ddc) split rule that compiles packages into separate rules for each package This allows us to compile each package in parallel (for those with no deps), and will make it possible to enable nnbd on a subset of them (expect, async_helper, js, meta) Change-Id: I032bafe3e43b14340ee35509d1f228d18571f524 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125484 Commit-Queue: Sigmund Cherem <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> * Change mocks.dart to triple-slash comment style Change-Id: I157e67f3d893058fc00732dc8eda6fe2729fa805 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125548 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Paul Berry <[email protected]> * [dartdevc] Finishing NNBD migration of dart:typed_data. Change-Id: I77a00abbb6e00c1bf1edaae0289b08e9faa1955c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125160 Commit-Queue: Mark Zhou <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> * Fix an import at the top of the analysis server workspace.dart file Change-Id: I39cb68c9e9359df7d39ca23d996d4dc646f7001d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125546 Reviewed-by: Jaime Wren <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Jaime Wren <[email protected]> * [vm] Late modifier for final local variables. Bug: https://github.com/dart-lang/sdk/issues/38841 Change-Id: Ia99a3441b4175bb16097766d57133c6d83a0e3f7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125542 Commit-Queue: Liam Appelbe <[email protected]> Reviewed-by: Régis Crelier <[email protected]> Reviewed-by: Alexander Markov <[email protected]> * [dart:core] Fix analysis error in NNBD fork Use a local variable to get type promotion of the nullable Function. Change-Id: I271a53044afbfb40999706c486dc27b8883190af Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125580 Reviewed-by: Leaf Petersen <[email protected]> Reviewed-by: Bob Nystrom <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * [analyzer] Support AST variance in visitors and cloning methods. Most of the visitor, clone and constructor methods support variance in the AST. Some methods for summary work are missing from this CL, but I have taken note and will change those in an analyzer summary CL in the future. Change-Id: I54a39b9ec44ced26d2bc55966d5938a91ab6a76c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125007 Commit-Queue: Kallen Tu <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * [dartfuzz] Adding fuzzer support for extension methods on core library types Change-Id: Ie0637917db86ca89ace40bba363ee12314c3b459 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125124 Reviewed-by: Aart Bik <[email protected]> Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Fizaa Luthra <[email protected]> * Bump dartfix to 0.1.6 Change-Id: Ia3081edd8094ca2f4ed6541456d639c46ad1e1cb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125544 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> * [dartdevc] Cleanup dynamic calls and downcasts in _BigIntImpl This is some preparation for the NNBD migration where the existing downcasts and possible nullable accesses will be errors. - Downcasts have been replaced with covariant parameters. - Local variables have either been declared with a specific type or given initial values so that they can become non-nullable in the future. - Remove a pointless `is! int` type check. The parameter is an int. Change-Id: I3a0358d83a181eee5576c2062128d89d197ba3e1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125303 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * Set up new test suites for migrating the tests to NNBD. - Copies corelib_2/a* -> corelib/ - Copies language_2/ab* -> language/ - Copies lib_2/math/ -> lib/math/ - Copies standalone_2/a* -> standalone/ And also copies over and renames all of the status files in those directories. Then it migrates those tests to be static error free in NNBD. Finally, adds support to the test_runner for the new suites. Note that this review is split into multiple patchsets. The first patchset is a straight copy of the existing files. Then the later patchsets have the interesting changes. Change-Id: Icec2ff850a3aee30b653066ac184495d1e3814d0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125467 Commit-Queue: Bob Nystrom <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Reviewed-by: Alexander Thomas <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> * Use compile_platform to build the sdk.dill This moves ddc to use the same logic to compile the sdk.dill as all other backends. This will also enable us in a subsequent CL to generate the dart_sdk.js files from a precompiled .dill file, and hence improve overall caching on local rebuilds. Change-Id: I02e178baa5497a5bee2de42e3423176ca97ceaef Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125446 Reviewed-by: Nicholas Shahan <[email protected]> * (ddc) Generate the sdk.js files by reading a dill file directly This is to align how we pipeline each step in the build with other tools. It will also help with caching and incremental rebuilds when doing local development in ddc. Change-Id: I8ff9988927d5632301926fca173c01dd281f923f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125447 Commit-Queue: Sigmund Cherem <[email protected]> Reviewed-by: Vijay Menon <[email protected]> * Add new bot configuration for analyzer NNBD Change-Id: Iadc5d79cf5fb1bbf0d5c8f459770995751616cc0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125540 Commit-Queue: Paul Berry <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Bob Nystrom <[email protected]> * [dartdevc] Cleanup unused optional parameter from NoSuchMethodError Some preparation for NNBD migration. This was not part of the public API and only part of the DDC patch. I could not find any use besides passing null which was the default anyway. Change-Id: Icab2bb3f24e228afd4f0a57c9a2474121f27a67b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125466 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * [dartdevc] Migrating internal_patch to nnbd. Change-Id: I1ec8cde975ca7ea60c2730ca5b3afa113d783e7d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125581 Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Mark Zhou <[email protected]> * Issue 38813. If in a legacy library, use legacy interface types for CONFLICTING_GENERIC_INTERFACES. Bug: https://github.com/dart-lang/sdk/issues/38813 Change-Id: I950bf7bf492e80bc8f12c94252af360158dcb7b9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125549 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Add helper predicates for upper/lower bounds. Change-Id: Icec2315e4a65539861d99c8e10e254d11454cba7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125361 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> * [cfe] Account for invalid type being part of a type in subtype check Bug: http://dartbug.com/39421 Change-Id: I9d70f6722134ece7f567d0aab9b6a0d661ea650e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125268 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Dmitry Stefantsov <[email protected]> * [cfe] Make nullability parameter of SubtypeTester.futureType required Change-Id: I6be7cda9b976e83e2453dfc1c851efa75eb4fb40 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124326 Reviewed-by: Johnni Winther <[email protected]> * [cfe] Create TypeParameterTypes with default nullabilities Change-Id: I85be937240ba5cc39840e78f374902c1e36521a0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124327 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Dmitry Stefantsov <[email protected]> * Simplify IgnoreInfo. * Remove ignoreForFiles and ignores, unused public getters, * Remove add(), unused public method, * Make addAll() and addAllForFile() private. Change-Id: I9d03b5bbae0b1db291c612f142725beb27281731 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125523 Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> * [CFE] Disable colors for incremental compiler test suite Before this change, running the tests via a terminal with colors enabled would result in expectation file mismatches. Change-Id: I958180074e65b4d0530c79be6bac11ba6d849b5e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125602 Reviewed-by: Karl Klose <[email protected]> Commit-Queue: Jens Johansen <[email protected]> * [CFE] Incremental compiler has experimental invalidation strategy (first checkpoint) This CL adds an option to the incremental compiler that enables an experiment invalidation strategy that only rebuilds bodies for changed libraries (if possible). As far as we know, for valid applications this should work fine, although, applications with errors in them (or where the changed libraries have errors in them) might not issue those errors correctly. Known caveats: - Doesn't work on dill library builders (aka if you load from dill we still have to invalidate transitively). - Only body-in-brace-changes --- cannot add new private members for instance, nor changed fields. - It doesn't track which bodies has changed so there's room for improvement in regards to for instance mixin stuff where we bail if a class from an invalidated file is used as a mixin. - Offsets for methods, for instance, isn't updated - Any errors issued at the outline stage won't be issued. Change-Id: I6edf073ec47ea31429479ffe67e2e8b6d2cb80dd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124980 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]> * Added nonfunction-type-alias tests, skipped for non-fasta compiler Change-Id: I89ed80c973c5f2c76d534fcbd0f16d8141869757 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125601 Reviewed-by: Lasse R.H. Nielsen <[email protected]> Commit-Queue: Erik Ernst <[email protected]> * New "general" status file added In order to manage the implementation of nonfunction-type-aliases, this CL adds a new status file for co19_2 (because there was no such file, corresponding to 'language_2.status' in 'language_2', etc.). It skips every test that has the option 'nonfunction-type-aliases', unless the compiler is fasta. Change-Id: Ibfd536f6e47d6e28d6d2fb23a3676e4a5875e4df Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125640 Reviewed-by: Alexander Thomas <[email protected]> Commit-Queue: Erik Ernst <[email protected]> * [co19] Rename status file to co19_2-co19.status Change-Id: Ia5a397825417e2a849367efd92fc06ec682f3d1a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125661 Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Alexander Thomas <[email protected]> * Migration: update edge builder tests to use `pointsToNever` where possible. Previously we were using `neverClosure`, which made the tests very lenient; they accepted any node with an edge pointing to `never` through a sequence of zero or more hard edges to be non-nullable. While it is true that any such edges will be migrated to be non-nullable, in our test cases we nearly always know that we want the node to point to `never` through exactly one edge. So it's worth making the tests verify this. Change-Id: I2783fd41628961e0cd31b95edd396defd0b26593 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125550 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Paul Berry <[email protected]> * [kernel] Align TypeParameterType.hashCode with the equality strategy Since we use a unification strategy for function type type parameter equality, we have to assume they can end up being the same. The implementation of TypeParameterType.hashCode now reflects that. Closes #39409 Change-Id: I5054b591253fb7d17208ffebdc5236a7100974de Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125607 Reviewed-by: Dmitry Stefantsov <[email protected]> Commit-Queue: Johnni Winther <[email protected]> * Migrate some negative tests to static error tests. Note function_type_parameter_negative_test and function_type_parameter2_negative_test were identical as far as I could tell, so I merged them into one. Change-Id: I00d53bf8ec9534b0c2832b0ea2cc4da442bfd683 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125556 Auto-Submit: Bob Nystrom <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Bob Nystrom <[email protected]> * Fix unused elements when setter used Fixes #35677 Change-Id: I2daf8b4e2cc8e1a11ed0dde730d4126154b60910 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125620 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> * Delete standalone_2/io/process_exit_negative_test.dart. I am trying to migrate all of the negative tests to something more precise. As far as I can tell, this test stopped being useful with Dart 2.0. Now that all compilation errors are reported eagerly, the file simply doesn't run at all. It's now just another test of an unresolved identifier. (This is a good example of *why* I want to get rid of negative tests. This test silently went from a desired runtime failure to a compile-time failure.) Change-Id: Iec3cdd32a15612c0760119e92d618e3a5ba1f5ec Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125555 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Bob Nystrom <[email protected]> Auto-Submit: Bob Nystrom <[email protected]> * Convert a compile time error into a parse error (issue 39389) Change-Id: I115c7bb4ab05f8c6e9ddc566985126a1b9a09842 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125621 Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> * Analyzer refactoring Workspace.isBazelWorkspace() to a getter: get isBazel, this is follow up on https://dart-review.googlesource.com/c/sdk/+/125564 Change-Id: I7e1dbc6b695b04a65bbb17761162daece797f238 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125470 Commit-Queue: Jaime Wren <[email protected]> Reviewed-by: Jaime Wren <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Catch exceptions during ranking and disable smart ranking Change-Id: Ib24a5a16da0fdfaf6d8504adab5c087ecec3abf0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125221 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> * [dart:core] Update num `operator ==` parameter type in NNBD fork Should the type agree with operator on Object? Change-Id: I4a0257cec08a92898cb302c34e66a2fda4cfce6f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125728 Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * [dartdevc] Migrating dart:_debugger to nnbd. Change-Id: I5b1d0ff2cef8f6da2256b8d4f9dc88e09e89fb2d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125740 Reviewed-by: Nicholas Shahan <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Mark Zhou <[email protected]> * [analyzer] use the staging url for crash reports Change-Id: I0e706fadac4709a723165beea3446f578c4abd63 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125682 Reviewed-by: Mike Fairhurst <[email protected]> Commit-Queue: Devon Carew <[email protected]> * [cfe] Support statement replacement in inference_visitor Change-Id: Ib4cfbab9478eda43ad9f6271511120c782349440 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125603 Reviewed-by: Jens Johansen <[email protected]> * [cfe] Implement late lowering for local variables. Change-Id: I18f848561f7eca61f662f8083f7ca1451a8a0b3d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125605 Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Jens Johansen <[email protected]> * Add a test suite for "co19", which will be the NNBD-migrated co19 tests. It doesn't do anything useful yet because the forked co19 tests aren't getting pulled into the repo, but once gclient syncs them to tests/co19, this should start doing something. Change-Id: I5ee54f9afc19353c7a7a379178df1084c6f2e8d9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125681 Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Alexander Thomas <[email protected]> Reviewed-by: Alexander Thomas <[email protected]> * Fix typo Closes #39402 https://github.com/dart-lang/sdk/pull/39402 GitOrigin-RevId: 89a3ac03e3fc971e0fcfeb36ddcc1bc6b2ffcb34 Change-Id: Idee225262fbfa1c3dc7acbabd141eb7a275fee87 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125442 Reviewed-by: Michael Thomsen <[email protected]> * Fix typo I believe it should be `dart_tool` Closes #39328 https://github.com/dart-lang/sdk/pull/39328 GitOrigin-RevId: 057e2fd1b72e50894d09c774f15026c9ca4e89a5 Change-Id: I90054ce5ecc8c1b75a25a518d685575d17016ec2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124720 Reviewed-by: Michael Thomsen <[email protected]> * chore(doc): fix typo Closes #39128 https://github.com/dart-lang/sdk/pull/39128 GitOrigin-RevId: f03a58d8dd0a486021eb0d5e51e01383cef48f6e Change-Id: Iedc2caca99963b26c73b43f65e32be59e750bca7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123061 Reviewed-by: Michael Thomsen <[email protected]> * Fix pub.dev URLs throughout SDK repo Change-Id: I5bcb7c40be12ee1dc887620281b4807469d67bbb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125729 Auto-Submit: Kevin Moore <[email protected]> Reviewed-by: Michael Thomsen <[email protected]> Commit-Queue: Michael Thomsen <[email protected]> * Hide dart:cli in api docs This is experimental, and not ready for general consumption, so we shouldn't be advertizing it Closes #39462 https://github.com/dart-lang/sdk/pull/39462 GitOrigin-RevId: f7c88230ed4dfea516ffd4d0ec280ab599f2512e Change-Id: I9db6b20749911c9386a56419765143071c2697e7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125800 Reviewed-by: Vyacheslav Egorov <[email protected]> * Fix syntax error in Symbol doc example Closes #39453 https://github.com/dart-lang/sdk/pull/39453 GitOrigin-RevId: c9c951d74eb12061421854b014a202086388b166 Change-Id: I77435339832e830fc62d0ca3d0cc51065daf67e2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125722 Reviewed-by: Michael Thomsen <[email protected]> * [vm/dart2native] Bundle product-mode vm_platform.dill with the dart-sdk and let dart2native use it Currently we bundle only one platform file, which dart2native uses as well as other tools. Since the platform file has annotations already evaluated, our AOT compiler ends up including service related functionality in the AOT snapshot. This CL bundles the product-mode vm_platform.dill as well, which will reduce dart2native-created apps slightly. Change-Id: I223811b30704cde1739739d97a8ea2d34a681292 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125665 Commit-Queue: Martin Kustermann <[email protected]> Reviewed-by: Clement Skau <[email protected]> * Move nullabilitySuffix to the public interface for DartType. Change-Id: Idb53afaf30312b6423b84baa988ec2bb9ca29c24 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125720 Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Janice Collins <[email protected]> * [dartdevc] rename legacy to ddc The old name is still supported as an arg. Change-Id: I864c54b977f5ef0cc1be4779422efbd539b67a2b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125545 Commit-Queue: Vijay Menon <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> * [dart:core] Update DartTime.parse to support arbitrary precision fractional seconds. Update DartTime.parse to support arbitrary precision fractional seconds. So it now conforms to ISO8901 and RFC3339 standards. Closes #24205 Closes #39350 https://github.com/dart-lang/sdk/pull/39350 GitOrigin-RevId: 66f15b6e646a65b7955c7b617647b8edfd680481 Change-Id: Ife2211e6cce5922b59cdde0d30ed3ef887cffcf9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124903 Reviewed-by: Lasse R.H. Nielsen <[email protected]> Commit-Queue: Alexander Thomas <[email protected]> * Update the comment on parseString to clarify throwIfDiagnostics behavior. Change-Id: I67d5a37bd88f8dc355af6f3d2651a9aa0b037871 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125763 Commit-Queue: Paul Berry <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Auto-Submit: Paul Berry <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * [observatory] Properly wait for Catapult's iframe to load. Give message while fetching timeline. Change-Id: I342c9315fc31021fb1387bc0e409645cd7a99d6a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125468 Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Ryan Macnak <[email protected]> * [vm] Allocate temporaries used by Dart_Invoke etc in new-space. Allocating in new-space allows this objects to be collected quickly during the next scavenge, instead of acculumating in old-space until the next mark-sweep and potentially increasing the process's peak memory footprint. Change-Id: Id73c4c3934f6d84ba7af9e3333a350b809946ebb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125360 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Régis Crelier <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> * [dartdevc] Fix analysis errors in patched dart:core library Change-Id: Iab9efe67cee6f1c7ea9c42120bc08ddcf5ff2086 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125700 Reviewed-by: Mark Zhou <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> * Remove TypeSystem.create() [email protected] Change-Id: Ia916d90b0d33509538851024696665f296d966ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125764 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Migrate all of the negative language_2 tests to not be negative tests. Also, remove the three negative tests under compiler/dart2js_extra. Change-Id: I5d285d1e5ed2016de4e0236ee89fe0399fc008c8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125727 Reviewed-by: Leaf Petersen <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Bob Nystrom <[email protected]> Auto-Submit: Bob Nystrom <[email protected]> * Point analyzer NNBD bot to `language` rather than `language_2` Change-Id: I0672163cb355b06dbd970d744955816b6d43ee0f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125766 Commit-Queue: Paul Berry <[email protected]> Commit-Queue: Bob Nystrom <[email protected]> Auto-Submit: Paul Berry <[email protected]> Reviewed-by: Bob Nystrom <[email protected]> * Oops, meant to commit these changes with: https://dart-review.googlesource.com/c/sdk/+/125727. Change-Id: Id0bc8d8495a011aacd48ca18c845049d87fbfd39 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125768 Auto-Submit: Bob Nystrom <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Bob Nystrom <[email protected]> * Remove XyzElementImpl.forNode() constructors. [email protected] Change-Id: I39332a153b6d13be7b33d3980263eb3c3e952c65 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125802 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Revamp patch_sdk.dart mainly to use libraries.json. This will make it possible to use the script to create a patched sdk for dart2js and the vm (some followup needed), which will be useful to migrate their libraries to nnbd. In the future, we should be able to leverage this new logic to write tests that ensure our sdk is warning-free (there are > 80 real warnings today even on the non-nnbd sdk) In detail, this CL includes: * loading the libraries data from libraries.json, this removes the need for a hand-crafted libraries.dart that replicates the data in libraries.json. * auto-generates a libraries.dart in the patched sdk that can be used to run dartanalyzer or to compile an sdk with dartdevc-legacy. * script simplifications in patch_sdk.dart * removed tracking of modification stamps. This didn't appeared to be used by the ninja rules. I believe it was used to reduce local iteration cycles when we were first developing the sdk itself. * use Uri directly instead of package:path - this simplifies things, especially since the libraries_specification is Uri-based as well. * switch to use package:args for parsing options * added an option to merge part files in a single file. I've noticed that the analyzer provides some false positive errors in part files, but once merged they are no longer shown. In particular, we are clearly hitting limitations of dartanalyzer on the patched sdk. At this time the old patch-script generated an sdk with 1500 warnings, this new script reduces it to 500 (not sure why), with merging of part files it goes down to 80. Change-Id: I6bbaf92ef4554f00c8bf6b38d19bf79d44fb3e94 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125780 Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]> * [analyzer] Add variance to analyzer summaries. Change-Id: Ia1a527eff5a784b2cb6d169c76108c16e6ccfe1a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125554 Commit-Queue: Kallen Tu <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> * Migration: refactor _checkExpressionNotNull. Previously this was based on creating a dummy type pointing to `never` and then trying to assign to it. Since we are trying to get rid of explicit references to `never` outside of the graph logic, that isn't going to work anymore. Refactor to just create the correct edge directly using NullabilityGraph.makeNonNullable. Change-Id: I18683bfe5e02924d2ccfcb0459047568734f975d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125801 Reviewed-by: Brian Wilkerson <[email protected]> * Migration: remove unused variable Change-Id: I0c699bc8723a6eda395b5bf787aca91bd9f7004f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125769 Commit-Queue: Paul Berry <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> * Add script that performs the tasks of creating and checking the nnbd sdk usage: dart pkg/dev_compiler/tool/check_nnbd_sdk.dart Now we no longer need to remember what are the individual commands, this will generate the patched sdk and run analyzer on it. In the future I can see us adding a flag to select the target. Change-Id: I991668743765252411d415de4bdef5a180644afa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125840 Commit-Queue: Sigmund Cherem <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> * [cfe] Inference constraint solving takes contravariance into account. Implements https://github.com/dart-lang/language/issues/658. Change-Id: I28857c40bbc5db76f7312ed540052fed40dac4b4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125552 Commit-Queue: Kallen Tu <[email protected]> Reviewed-by: Dmitry Stefantsov <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> * Stop referencing non-API TypeSystem in analyzer. Replace it with TypeSystem from lib/dart/element/type_system.dart, or (internally) with TypeSystemImpl. We keep the old TypeSystem where its is exposed from API: - ResolveResult.typeSystem - AnalysisSession.typeSystem - AnalysisContext.typeSystem We will make changes to these as a breaking change later. Change-Id: I40ca53ea77e440457c6d0f3832ec3b6286bacdf0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125770 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * [analyzer] Fix format.fbs after summary change for variance. Change-Id: I90379ad24f50e3d8a3d16879a4572529b3d83692 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125900 Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Kallen Tu <[email protected]> * [pkg/vm] Remove usage of Library.isExternal Change-Id: I014184e2324ab0379653cb8c23cb7eed52677aeb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124985 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Alexander Markov <[email protected]> Reviewed-by: Johnni Winther <[email protected]> * [dart2js] Remove unnecessary DartType predicates and replace with is-tests. Change-Id: I520d0893793e291d009e31ff32980194278bb0b5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125923 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Mayank Patke <[email protected]> * [cfe] Eliminate Nullability.legacy in transformers Nullability.legacy is replaced with an appropriate invocation of a method on Library to retrieve the appropriate nullability. Only transformers in pkg/kernel and pkg/front_end are affected. The inference transformers are excluded from the scope of this CL. Change-Id: I691c4343def913388a1277227b760fd7e1aa194c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125666 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Dmitry Stefantsov <[email protected]> * [cfe] Implement lowering for constructor initialization of late fields Change-Id: Ia6187c3eac630a2bd4351868aadfaa8771648830 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125821 Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Jens Johansen <[email protected]> * [dart2js] Add DartTypes for T*, T?, and Never. Type relations to be implemented in a later CL. Also discovered some visitors were missing support for FutureOr. Fixes: https://github.com/dart-lang/sdk/issues/38821 Change-Id: Iee494cfa2eff3b320a3fd1a2e7ffbf3f969b40e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125880 Commit-Queue: Mayank Patke <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> * [co19] Fork the update script for the co19 NNBD tests This will allow creation of the co19 NNBD CIPD package. We'll keep the old variant of the script to create the co19 legacy packages until the non-NNBD tests are no longer needed. The new layout on CIPD will be: dart/third_party/co19 (co19's master branch) dart/third_party/co19/legacy (co19's pre-nnbd branch) Change-Id: I21c61083630de43be10fcead221616a2bc6f9c20 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125962 Reviewed-by: Jonas Termansen <[email protected]> * [SDK] Fixes C++ undef. behaviour in Library::Add*Metadata. - Library::AddFieldMetadata(..) - Library::AddFunctionMetadata(..) - Library::AddTypeParameterMetadata((..) Change-Id: If2ed9a52deddc64aa9780ced74b012fd82f2d1c1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125668 Commit-Queue: Clement Skau <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> * [SDK] Adds --support-disassembler in PRODUCT. This CL also addes CodeSourceMap source positions to the disassembler output. Change-Id: I49f6cb5257394badc8a005167f906e185509a3e7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125663 Commit-Queue: Clement Skau <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> * [co19] Add missing backslash to update script Change-Id: Ia713dc14222a901f1040d2a7254ead21b5049750 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125965 Reviewed-by: Jonas Termansen <[email protected]> * [vm/compiler] ARM64: Block R22 to hold NullObject(). Block R22 to hold a cached version of NullObject(); refresh it in the same way as for BARRIER_MASK register. Alter assembler to avoid emitting load and to use NR register directly instead. This change improves Flutter Gallery code size by: Instr: -1.81%. Total: -1.16%. Change-Id: Ifec654e799737527eec1d8a0e87b4a197ad0298a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125662 Commit-Queue: Vyacheslav Egorov <[email protected]> Reviewed-by: Vyacheslav Egorov <[email protected]> * [cfe] Support null-aware index access Change-Id: I54b58624722845e4b008b90e675516ec274bc2da Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125960 Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Johnni Winther <[email protected]> * Revert "Revamp patch_sdk.dart mainly to use libraries.json." This reverts commit 3c9e924073bafcc20887f7257fc07948323aceaa. This CL was breaking the internal build. Change-Id: Ic4e6df070f2a87ac88ef97f0e6b07d53c13ceadc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125925 Auto-Submit: Vijay Menon <[email protected]> Commit-Queue: Vijay Menon <[email protected]> Commit-Queue: David Morgan <[email protected]> Reviewed-by: David Morgan <[email protected]> * [co19] Add tests/co19_2/co19_2-co19.status to test_matrix.json Change-Id: Ib6f63726dea188114131aae0b406c77c59c8f767 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125966 Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Alexander Thomas <[email protected]> * Migration: remove _notNull* fields from EdgeBuilder. We want to create a separate nullability node for each non-nullable node so that instrumentation can explain to the user where it came from. Change-Id: Id51a3366284e8c51c466458c1c14de963cd0bd05 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125551 Reviewed-by: Mike Fairhurst <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Paul Berry <[email protected]> * Integrate the latest batch of reviewed diagnostic docs This includes a small improvement to the validation tests, but there is also one code whose docs can't be verified without additional work that I will do in a follow-on CL. It also includes splitting one code into two to improve the messages. Change-Id: I52989ca336e42822327e3ac3805b1654d20a479c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125901 Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> * Add 'isNonNullableByDefault' flag to TypeSystemImpl, make all parameters named required. [email protected] Change-Id: I262f86ba964f4970ec570dc9fa4c1a802556fa63 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125924 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> * Adjusted front end to allow non-function type aliases This change does not enable much (because the backends do not support non-function type aliases), but this change makes it possible to work on this feature in dart2js code, without making the changes to the front end and the changes to dart2js part of the same cl. Change-Id: I0d8a27a0e87cf6908f914b2c10d97ef3d02ebec5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125961 Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Johnni Winther <[email protected]> * [cfe] Reuse nullability modifier when creating a copy of a type It's a part of internal cleanup of pkg/kernel and pkg/front_end. The nullability modifier is reused whenever a type object is created as a (potentially modified) copy of another type object. Change-Id: I9d09a744281e33814289a4f4dd65c764a7905eff Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125260 Reviewed-by: Johnni Winther <[email protected]> * [cfe] Use library's non-nullable modifier when creating new types It's a part of internal cleanup of pkg/kernel an…
I did it the following way:
Usage:
Output:
Note: if you dont want to use utc you can use "date.timeZoneOffset" and replace the hardcoded +00:00 |
RFC 3339 defines the "time-secfrac" component of a timestamp to be
"." 1*DIGIT
, which permits second fractions of unlimited length.DateTime.parse()
only accepts a second fraction component of up to length 6.The length limitation on "millis_opt" should be removed, or the documentation should be updated to note that DateTime.parse() does not strictly support RFC 3339.
The text was updated successfully, but these errors were encountered: