Reland of https://dart-review.googlesource.com/c/sdk/+/29160
Adds a 'severity' field to diagnostic messages and replaces all
addWarning and addNit functions by a generic addProblem, which uses
the intrinsic severity of the message. Eventually, errors should
also be reported this way.
A special severity value maps into either warning or error for Dart 1
and Dart 2, respectively. Most Dart 1 warnings are in this category.
Fixes some 320 failures of DDK test expecting a compile-time error.
These were previously masked by a workaround in the DDC error handler
which has now been removed.
Closes https://github.com/dart-lang/sdk/issues/31286
Change-Id: Id3b3b7f1fc6a101639fc908c90f3ec7d304a7b4b
Reviewed-on: https://dart-review.googlesource.com/32580
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Note that the annotation "/*@target=C::aField*/" is duplicated in the
test due to #31790.
Change-Id: Ie3cf2dea7efb9ae46310ee069a588feb37855201
Reviewed-on: https://dart-review.googlesource.com/32862
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This required some changes to analysis_server, since analysis_server
used to have its own version of pumpEventQueue(). Since
pumpEventQueue() is now provided by the test package, I've removed
analysis_server's version, and I've updated some of the call sites to
pass in "times: 5000" to replicate the old analysis_server behavior.
This also required some changes to analyzer, since the fail() method
is now marked as @alwaysThrows, so no code may follow it without
producing a dead code hint.
Change-Id: Ie5ef3a5cc685c18da02de699e59f63f3bb8865f7
Reviewed-on: https://dart-review.googlesource.com/32683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit ab229b30ef.
Reason for revert: Failing co19 test
Original change's description:
> Improve fasta field recovery
>
> In addition to improving field recovery, this CL
> fixes class field recovery to include an endMember event event
> and cleans up missing class body recovery.
>
> Change-Id: I53afe5aef55452108803388de9245f7e14f97833
> Reviewed-on: https://dart-review.googlesource.com/32820
> Commit-Queue: Dan Rubel <danrubel@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
TBR=brianwilkerson@google.com,danrubel@google.com
Change-Id: Id2976bfe67b410875a912bbfd6bfcbbe3d3c8c75
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/32840
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
In addition to improving field recovery, this CL
fixes class field recovery to include an endMember event event
and cleans up missing class body recovery.
Change-Id: I53afe5aef55452108803388de9245f7e14f97833
Reviewed-on: https://dart-review.googlesource.com/32820
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 8ee7a97651.
Reason for revert: lld optimization level -Wl,-O1 appears to either
have a regression or to confuse Golem binary comparison tool.
Original change's description:
> [infra] Roll clang toolchain forward
>
> Change-Id: I41afe48f2fdc056436b58dc8158c62e9207cc43f
> Reviewed-on: https://dart-review.googlesource.com/32140
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
TBR=whesse@google.com,rmacnak@google.com,zra@google.com,athom@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I36ec03150a22f89c4cb5371dd1bf43df8a6f16f6
Reviewed-on: https://dart-review.googlesource.com/32800
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
The constant collector was inconsistent with the old frontend: we were
skipping primitives and we were not going into the body of closures.
Change-Id: I3321426da7e684d203f0ac7a2a2c7028f3138a7b
Reviewed-on: https://dart-review.googlesource.com/32663
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
This removes scheduled_test which is important for rolling other
packages. In return, it brings in two new packages, test_descriptor and
test_process.
There are no changes in the formatter's actual output. All of the
differences are in tests or internal dependencies, so I don't think we
need to worry about coordinating this with the PRESUBMIT version of
dartfmt as in https://github.com/dart-lang/sdk/issues/30164.
Change-Id: I1c81e157c32326801985615abc353f2239fe2470
Reviewed-on: https://dart-review.googlesource.com/32664
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
'Normalize' the data used for loading deferred libraries. Replace
URIs and SHA1 hashes with indexes so that the URIs and hashes occur
once.
Bug: https://github.com/dart-lang/sdk/issues/29635
Change-Id: I3ac8791ad44ca588cbb1bd7d86f18243c956a04a
Reviewed-on: https://dart-review.googlesource.com/32505
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Also adds this to the build script, so we can eventually replace the existing SDK compile step with this new one.
Change-Id: Iba0720df5bbab302d2fdd0b5aeeb182de152cc98
Reviewed-on: https://dart-review.googlesource.com/32504
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This reverts commit 8b8d9b08e1.
Reason for revert: Github mirrors need to be created *before* landing.
Original change's description:
> Update dart_style to 1.0.9 and bring in its new dependencies.
>
> This removes the dependency on scheduled_test which is important for
> rolling other packages. In return, it brings in two new packages,
> test_descriptor and test_process.
>
> There are no changes in the formatter's actual output. All of the
> differences are in tests or internal dependencies, so I don't think we
> need to worry about coordinating this with the PRESUBMIT version of
> dartfmt as in https://github.com/dart-lang/sdk/issues/30164.
>
> Change-Id: I1d6426303055a4400a0ca3d16965a3e05ab39cf7
> Reviewed-on: https://dart-review.googlesource.com/32445
> Reviewed-by: Kevin Moore <kevmoo@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
TBR=kevmoo@google.com,rnystrom@google.com
Change-Id: I3af883a6f41339e3cc79096e0f61639c11af1e20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/32640
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This removes the dependency on scheduled_test which is important for
rolling other packages. In return, it brings in two new packages,
test_descriptor and test_process.
There are no changes in the formatter's actual output. All of the
differences are in tests or internal dependencies, so I don't think we
need to worry about coordinating this with the PRESUBMIT version of
dartfmt as in https://github.com/dart-lang/sdk/issues/30164.
Change-Id: I1d6426303055a4400a0ca3d16965a3e05ab39cf7
Reviewed-on: https://dart-review.googlesource.com/32445
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>