Commit graph

99986 commits

Author SHA1 Message Date
Jonas Termansen a19d3f3375 [infra] Support testing with RBE on Windows.
Place the windows toolchain in the build root so it can be sent to RBE.

Use relative paths in debug symbols when building with Windows clang,
which is needed for remotely building with RBE.

Set the executable bit when invoking clang-cl remotely as it has not
been set on Windows RBE clients.

Stop including .rst files during build commands as @options-from-file
is not supported by rewrapper at this time.

Forward RBE_cfg into the msvc build environment and rewrite the
INCLUDE, LIB, and LIBPATH environment variables to use relative paths
instead of absolute paths.

Don't download reclient on windows-arm64 where there is no cipd
package and the windows-arm64 python lies and says it's x64 because
they actually packaged a x64 python.

Tune the Windows -j performance to match the historic bot performance
as most casual Windows machines won't handle -j 1000 well.

Bug: b/296994239
Change-Id: I2bd1b4478fca796f0a326c062a5f478f16c2c6ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343440
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-29 10:33:09 +00:00
Chloe Stefantsova 3ef08e1ecd [analyzer][cfe] Expand TypeAnalyzerOperations. Part 1
This CL adds more of the type operations required in the subtype
constraint gathering algorithm into the shared type operation
class. The added operations are used in the constraint gathering
algorithms in the Analyzer and the CFE.

Part of https://github.com/dart-lang/sdk/issues/54902

This is a reland of
https://dart-review.googlesource.com/c/sdk/+/346840

Change-Id: I99086cfc3cd56db40055e9bb8e23acec8bdf830b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354622
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-29 08:14:20 +00:00
Jens Johansen 08a8e93bf1 [CFE] Delete unused code
Change-Id: Ic516edb07cbe5150c58ac03a4633145059ae6b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354022
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-29 07:42:58 +00:00
Srujan Gaddam 2f7bfc404a [dart:js_interop/_unsafe] Clean up API docs
- Rephrase docs on JS types
- JS -> JavaScript where applicable
- “This” and “that” expanded to refer to the thing
- Add docs to undocumented members
- Rephrase some docs to be clearer and more explicit
- Move warnings to format that dartdoc can display specially
- Add warnings to every single member that should have it
- e.g. -> like
- Makes similar docs consistent
- Removes library declarations per style guide. Regenerates
  expectations to handle the change.

CoreLibraryReviewExempt: Backend-specific library. Docs only.
Change-Id: I246f8c20d594741149766e5a76bb186debf54ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352977
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-02-29 04:15:49 +00:00
pq e8952e3977 fix test paths to be windows-safe
Change-Id: I9bf627aa43414b46f7b3e6f12590e63f2cee54e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354971
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-02-29 03:24:57 +00:00
Konstantin Shcheglov 6d0eeae28e Legacy. Remove numStar, stringStar, futureStar(), iterableStar(), listStar()
Change-Id: Ia8b3eb3f0a7d9a823da3f7fa4934a9b956129625
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-29 02:16:56 +00:00
Nate Bosch 6f5a23f150 Expand docs around error zones
Mention error zones in the docs for `runZoned`. We expect most of these
use cases to be handled by `runZonedGuarded`, but specifying an error
handler on the `ZoneSpecification` can still trigger this behavior.
Expand the phrasing from mentioning that some futures might not complete
to describe the specific reason - errors cannot cross zone boundaries
with different error zones, so specifically Futures which complete as
errors are at risk of not completing in the parent zone.

R=lrn@google.com

CoreLibraryReviewExempt: Doc changes only.
Change-Id: I8759dfb6da48463e0bb33a000943d60a4dd3d5ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348043
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2024-02-29 01:49:08 +00:00
pq 95a0ede202 verify that extract_method doesn't modify macro-generated files
Change-Id: If3c73a4e6fcbad97ddcb5c8f78121f80fc580035
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354965
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-29 01:01:32 +00:00
pq c383283edc ensure convert_method_to_getter doesn't modify macro-generated files
Change-Id: I92843c4f6bfcccd534bd9011eea1324b476f3102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354964
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-29 00:59:39 +00:00
pq fddd66f80d ensure convert_getter_to_method doesn't modify macro-generated files
Change-Id: I928f7ac8d31b6036f53f66d2c8e98863d67b1e04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-29 00:21:49 +00:00
Brian Wilkerson 17e833ecbb Convert the OverrideContributor to the new style
This should unblock working on three completion-related issues.

There is one known regression here. There's a TODO in the code and a
failing test to mark the regression. Let me know if you think I should
fix the regression before landing this.

Change-Id: Ide311d4d510f193a1ae60ef400078567ff773159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354781
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-29 00:06:39 +00:00
Dan Chevalier a3401b0c25 Update DevTools rev to 254ea4dfd93d76c6ad5e2016bf34e9057b14d9da
Change-Id: I692e08171b81d7e8db9e11c919f3a4ee11f1b534
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354980
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-28 23:32:02 +00:00
Ben Konyi 0728ffbf53 [ CLI ] Add --write-service-info flag to dart run
This was already a valid VM option, but since it wasn't listed as an
option for the `dart run` command, it was treated as an unexpected
argument when provided after the `run` command.

Change-Id: If05c3e4c8465ab0b5a088a9c5f4cf5386c231f42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354981
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-02-28 21:38:27 +00:00
Kallen Tu 6e04dd49de [analyzer] Find comment references in DocImportScopes.
This CL adds the `DocImportScope` which allows the scope visitor to find elements in libraries imported by a `@docImport`. The resolved elements will eventually be used in Dartdoc to make links for the comment references.

`Scope.lookup` can choose toggle whether or not it needs to look in doc imports for a certain id.

Change-Id: I329152651ea3cb4e3a5e2787a5d91ba1cd397d29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353232
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-02-28 21:16:17 +00:00
Devon Carew e0e6231b9e [deps] rev dartdoc, markdown, mockito, test, tools, web
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (40c470e..eed92d3):
  eed92d3f  2024-02-28  Sam Rawlins  Simplify InheritingContainer.allModelElements and _inheritedElements (dart-lang/dartdoc#3689)
  7b3274a6  2024-02-28  Sam Rawlins  Do not require FLUTTER_ROOT any longer, even for flutter packages (dart-lang/dartdoc#3688)
  d25dfca4  2024-02-27  Kallen Tu  Remove LanguageFeatureRenderer. (dart-lang/dartdoc#3686)
  d8e7f99c  2024-02-27  Sam Rawlins  Display the immediate representation type, not any erasure (dart-lang/dartdoc#3685)
  91c361af  2024-02-27  Kallen Tu  Remove SourceCodeRenderer and TypeParametersRenderer. (dart-lang/dartdoc#3683)

markdown (d735b0b..62e3349):
  62e3349  2024-02-27  Tom Yeh  Fix `#586`: encode image tag's src attribute (dart-lang/markdown#589)

mockito (7d6632f..3ef744f):
  3ef744f  2024-02-27  Ilya Yanok  Bump SDK version using in CI to 3.3
  ecec7c1  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2
  b693ada  2024-02-27  Ilya Yanok  Add basic extension types support

test (a3f05ec..26953ba):
  26953ba4  2024-02-26  Sam Rawlins  Update README.md, remove link to Stream Matchers (dart-lang/test#2187)

tools (c7fbf26..fca993e):
  fca993e  2024-02-28  Elias Yishak  Fix late initialization error for `Analytics.userProperty` (dart-lang/tools#239)
  1a0d7da  2024-02-26  Elias Yishak  Export `testing.dart` with all enums (dart-lang/tools#237)

web (d96c01d..fa4280c):
  fa4280c  2024-02-27  Devon Carew  mention the migration guide in the readme (dart-lang/web#187)

Change-Id: Ib183b4af55146fdeabfb18dc91bf642159e67a1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354963
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-02-28 20:53:21 +00:00
Lasse R.H. Nielsen 1436635d27 Add more information to ParalleWaitError.toString.
Gives the constructor optional parameters for providing
more information that can be used in the `toString` message,
and the `stackTrace` getter.
Makes the `iterable.wait` and `record.wait` extension methods
provide such information, so that the `toString` will always
contain the text of *one* of the errors.

(No issue, problem with logging was brought up in chat.)

Change-Id: I5f9a20ad0af0c64a2e7ff3cdb56f187a5cf5a3ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353080
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-02-28 20:36:58 +00:00
Elliott Brooks 4642c73347 Pin Webdev dep
Bug: https://github.com/flutter/devtools/issues/7231
Change-Id: I26b791e2f71aa8f696c65ff9a84f41f4b01e2a75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354782
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-02-28 20:33:32 +00:00
Derek Xu 098d2f3652 [VM/Compiler] Mark instructions related to late initialization error checks as synthetic
TEST=pkg/vm_service/test/breakpoints_ignore_late_initialization_error_instructions_test.dart

Fixes: https://github.com/dart-lang/sdk/issues/53376
Change-Id: Iab7d2489f29bfc4a586b9de6e3caa0a7c1a35454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355000
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-02-28 20:06:58 +00:00
Danny Tuppeny df72011ac1 [dds/dap] Fix expectation of downloaded macro-generated sources to always have uppercase drive letters
Fixes https://github.com/dart-lang/sdk/issues/55052

Change-Id: I1a48b50e60be6fed74370f269a9fd39c648db4bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354941
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-28 20:00:13 +00:00
Danny Tuppeny b5ae11e64b [analysis_server] Add test for LSP document highlights in generated files
Change-Id: Icb2f268a8e43d1931b10bec4cfc8ef560252e8e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354884
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-28 19:56:41 +00:00
Danny Tuppeny 669514933f [analysis_server] Add tests for document symbols in macro-generated files
Change-Id: Idc1d2e9583c7281e685b14d6dadd5693f66c8678
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-28 19:56:41 +00:00
Erik Ernst ca220074db Add test about "T derives the future type U"
Issue https://github.com/dart-lang/sdk/issues/54628 raised the issue
that the static analysis of `await e` behaves in unexpected ways when
the static type of `e` is a subtype of a future related type, rather
than just a plain `Future<T>` or `FutureOr<T>` for some `T`.

This CL adds a test that assumes the update to the language
specification which is performed by the PR
https://github.com/dart-lang/language/pull/3574. Hence, this CL
should ONLY BE LANDED if and when that PR is landed.

Change-Id: Ib8acb77e24ffbceb0b4034d3b23a0f4fef8e3d1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354020
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-02-28 19:44:45 +00:00
Erik Ernst 3f4f10bd0f Update void usage test to new test runner expectations
The old version of language/void/void_type_usage_test.dart had some
faults (compile-time errors were expected, but they weren't reported
by tools and yet the test run succeeded). The failures were caused by some amount of duplication in the labels (a handful of duplicate labels from a set of about 450 labels, that is, it wasn't immediately obvious). This CL updates the test to use the new test expectation syntax (`//  ^^^^`) and adjusts the expectations to match the currently reported error messages, plus the ones about `void` that are missing.

Note that this test went through a phase where I believed that we had about 260 failures (130 CFE and 130 analyzer), but they turned out to be a consequence of migrating this test incorrectly from being a multi test into a form where it uses the current test expectation comments (`// ^^^` and such). At this point we just have 3 failures (all on expressions of the form `e += 1`), all with the CFE.


Bug: https://github.com/dart-lang/sdk/issues/31883
Change-Id: Ib1ceb56326a5847e3ca23ac0ee655eee65f0d76f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350921
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-02-28 18:30:20 +00:00
Keerti Parthasarathy c17d17153b Add a test for selection range for augmentation.
Change-Id: I59d0c5dbf4a2e388daeb9617774cbdf0b929d2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354706
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-02-28 17:55:34 +00:00
pq 94e37d0b22 Verify that move_top_level_to_file does not change macro generated code
See https://dart-review.googlesource.com/c/sdk/+/353780 for the general approach to adding macro test support.

Open: is there a better way to get macro-generated source?


Change-Id: Ib5cda2f8e48bdbfc639ee3e9513e4d43a482bb85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354705
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-28 17:32:08 +00:00
Tess Strickland 321c45e327 [vm] Update error message for incorrect extracted offsets.
The tool is now written in Dart.

TEST=ci

Change-Id: I343f57bfb008b9423ada22549b37da9c80258688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354882
Auto-Submit: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-28 17:25:33 +00:00
William Hesse 83ba5916b7 [vm] Skip a slow test in aot debug mode (#21708)
The test LibTest/collection/ListBase/ListBase_class_A01_t02 takes
more than 10 minutes to be precompiled in debug mode, due to
a known issue.

Skipping this test on the CI and CQ  because it causes deflaking problems
when timing out. The problem is being tracked already in an issue.

Bug: https://github.com/dart-lang/sdk/issues/54974
Bug: https://github.com/dart-lang/sdk/issues/21708
Change-Id: Ib05e0f18baac684cf3317dbc2171a5a585e04f98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354844
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-28 15:28:39 +00:00
Tess Strickland f4857643e0 [vm/compiler] Restore old definition of BoxLanesInstr::ComputeType().
TEST=lib/typed_data/float32x4 lib/typed_data/int32x4 on RISCV.

Fixes: https://github.com/dart-lang/sdk/issues/55040
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simriscv64-try,vm-linux-debug-simriscv64-try
Change-Id: I445195d12bbb209209d6958dbfcbfc634422ae6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354842
Commit-Queue: Tess Strickland <sstrickl@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-28 12:21:12 +00:00
Johnni Winther 7342d01311 [cfe] Handle library augment in listeners
This allows `library augment` directives in the parser listeners.

Closes #55038

Change-Id: I4d132c347c6b085292362976d89c87c487d7ff40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354860
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-28 10:46:40 +00:00
Martin Kustermann c57ad70588 [gardening] Make test not run in obfuscated/dwarf mode
TEST=Fixes standalone/regress_53519_test in obfuscate/dwarf mode

Change-Id: I6bd87ffbc983e7a429b2c0728a09ac3ccfd6d280
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354840
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-28 10:27:11 +00:00
Jens Johansen 7785799901 [CFE] Only listen to signal if doing coverage
Change-Id: I3eaf4914e8517e643dba092c525fa55e8282401e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354223
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-28 08:28:46 +00:00
Jens Johansen ce0a684c8e [CFE] Add a onError when listening to signal to not throw errors on Windows
Fixes https://github.com/dart-lang/sdk/issues/55020

Change-Id: I04a8de37593e126230d3f32918e0f33faa20c8f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-28 07:38:37 +00:00
Stephen Adams 5bcb545696 [dart2js] Clean up HInstruction.inputs ownership
Ensuring HInstruction.inputs is always a growable list allows ~650
calls to be devirtualized* and makes the output of `dart compile
aot-snapshot dart2js.dart` about 0.1% smaller. I was not able to detect a significant performance difference in the SSA phase time.

* Estimated from indirect indexed addressing mode calls in the disassembly.

Change-Id: I330cd42299d994669bf7a1e2303497b4bbdb827c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-02-28 03:13:29 +00:00
Liam Appelbe 56dcacff5c [test] Weaken regex in regress_53519_test.dart
Apparently in AOT mode there's no column number:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8754902661978664065/+/u/test_results/new_test_failures__logs_

TEST=tests/standalone/regress_53519_test.dart
Change-Id: I06f97d8738d0f1228953fbfbf2006302defec1a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354820
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2024-02-28 02:22:09 +00:00
Ryan Macnak a07cf4202f [test_runner] Fix null assertion failure running on RISC-V.
Bug: https://github.com/dart-lang/sdk/issues/48545
Change-Id: Ic97dab268386423fd74adc0f0cef3ce361dc610e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350684
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-28 00:16:52 +00:00
Jake Macdonald 0bf9ef8076 add 'library augment <uri>'; to augmentation libraries
Bug: https://github.com/dart-lang/sdk/issues/54848
Change-Id: I5ec3cb01a76955e4cbe91a867277c9d91ce5c927
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353322
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-27 23:12:41 +00:00
Lasse R.H. Nielsen f0aeebd0e7 Make all platforms return null from Error.stackTrace until thrown.
The web platforms used to invent a spurious stack trace when reading
`Error.stackTrace` before the object was thrown.
They now return `null` instead, if there is no underlying JS error object,
matching specified behavior.

Fixed bugs in async error throwing in dart2wasm:
* `throw` in an async function did not set the stack trace on an error.
  Now calls `Error._throw` instead of just a direct Wasm "throw".
* `async*` functions did not capture the stack trace of a throw
  that ended the function body, which means it called
  `StreamController.addError` with only one argument.
  That then resused the stack trace from an `Error` throw instead
  of the correct stack trace.

Added tests.

Change-Id: I1d9fa8d9e18076a7fe28254b60b950866cd550a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354021
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-02-27 23:01:06 +00:00
Danny Tuppeny 8ae8ffd9c0 [analysis_server] Move LSP tests over to generic TestMacros class and remove LSP TestMacros class
We had two TestMacros classes for no great reason, so this removes the LSP one and updates the LSP tests to use the more generic one.

I moved `addMacros` to the mixin as part of it so it can be used by LSP, legacy and integration tests without having to duplicate this.

Change-Id: I2566ab1b15e510d2d6b71201a0d4d4eab03d793b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354760
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-27 22:12:22 +00:00
Liam Appelbe 44094abe2f [vm/service]: VM plumbing for Throw.forErrorHandling
Use the new Throw.forErrorHandling AST flag to ignore synthetic error
handling statements in coverage. When the flag is found on a throw node,
all the TokenPositions on the child nodes are set to kNoSource.

Questions for reviewers:
- Are there any VM use cases that need the real TokenPosition here?
- Is there a better way of encoding this flag in the TokenPosition?
- Should we add a new sentinel TokenPosition instead?

Bug: https://github.com/dart-lang/sdk/issues/54005
Fixes: https://github.com/dart-lang/sdk/issues/53519
Fixes: https://github.com/dart-lang/sdk/issues/54941
Change-Id: Ic44fe2fa0359188b890d5ed762e3ff8c593c850d
TEST=SourceReport_Regress53519_Destructuring
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353920
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2024-02-27 21:59:50 +00:00
Konstantin Shcheglov 295caec05f Legacy. Remove boolStart and doubleStar.
Change-Id: Ia12ecb3a0a1995a813f6727430c80045e2841233
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-27 21:57:28 +00:00
Konstantin Shcheglov e8244d3a8a Stop implementing Comparable for enum Modifier.
The order of modifiers is meaningless.

Change-Id: I85838569ef8c4eb1285ca9443117e1f781a718e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354740
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-27 21:20:24 +00:00
Sam Rawlins 7359dedd68 Bump dartdoc to 40c470e050161964ce2c1b566bcdf9be40494eef
Change-Id: I67d78b438e00b2025cde805a338e780596c32a86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354720
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-02-27 20:50:06 +00:00
Konstantin Shcheglov b09404bfb0 Legacy. Remove comparableStar() and futureOrStar()
Change-Id: Ib4800a3f4b4ccf779230e7c16115bc1ba8558612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354704
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-02-27 20:28:48 +00:00
Danny Tuppeny 55fe6b5104 [dds/dap] Add tests for downloading macro sources
With the previous change, macro-generated sources will be downloaded from the VM the same as other sources we cannot map locally (which used to include SDK sources, but since we now map them to the local SDK, was currently nothing - hence the previously-skipped tests).

This just adds a test for this behaviour. In future when we have "full" macro support, this path will still be valid because some DAP clients might not support URIs as "source paths", and we will have to handle them with downloaded source anyway (we might also use this in future if we detect when the sources are different and download from the VM in that case).

Change-Id: Ib3289f9fe8396f3610d51fedd16d831b587afd04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354027
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2024-02-27 20:08:02 +00:00
Danny Tuppeny 7f63f01bbe [dds/dap] Add support for communicating with a DAP client using URIs instead of file paths
Change-Id: I90a623f924dfbeb2e82f090a6d223f080baa7e93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352280
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2024-02-27 19:10:17 +00:00
Konstantin Shcheglov a04f131496 CQ. Remove cast from LibraryOrAugmentationScope, update the comment.
Change-Id: I8c370ef89dda0afe22182d6146edbe92063fbe44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-27 19:03:08 +00:00
Ben Konyi bef3373526 [ package:vm_service ] Prepare for 14.1.0 release
Change-Id: I8661dedd5c7212952a653b54f94f0df04d8de2f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354680
Reviewed-by: Polina Cherkasova <polinach@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-27 18:28:38 +00:00
Devon Carew cad61f9860 [deps] rev http, protobuf, tools, web, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

http (ce0de37..6e0a46f):
  6e0a46f  2024-02-24  Alex Li  [cronet_http] 🏗️ Use dart-define to determine dependency (dart-lang/http#1111)
  d5cab74  2024-02-23  Alex Li  👷 Update configuration related files (dart-lang/http#1091)
  6873731  2024-02-22  Brian Quinlan  Make it possible for `CronetClient` to own the lifetime of an existing `CronetEngine` (dart-lang/http#1137)

protobuf (f085bfd..ef0ab7d):
  ef0ab7d  2024-02-23  Sebastian  Optimize repeated field decoding (dart-lang/protobuf#911)

tools (9f4e6a4..c7fbf26):
  c7fbf26  2024-02-21  Elias Yishak  Fallback to current datetime when failing on parse session json file (dart-lang/tools#235)

web (975e55c..d96c01d):
  d96c01d  2024-02-23  Srujan Gaddam  Use extension types and generics internally (dart-lang/web#184)

yaml_edit (82ab64d..54884db):
  54884db  2024-02-23  Devon Carew  update to the latest sdk; update lints (dart-lang/yaml_edit#68)

Change-Id: Ib2cb7971df05f4501f81fe5c04b7eaf88d0d93a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354381
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-27 18:17:15 +00:00
Sam Rawlins e1a8a61193 linter: Remove deprecated traverseNodesInDFS method
Fixes https://github.com/dart-lang/linter/issues/3745

Change-Id: Icf92f66be7b3e86b731316c2a7702da842f3f9ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354660
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-02-27 17:15:28 +00:00
Konstantin Shcheglov 328bb274c2 Macro. Report MACRO_DEFINITION_APPLICATION_SAME_LIBRARY_CYCLE.
Bug: https://github.com/dart-lang/sdk/issues/54915
Change-Id: I0eb2d56b9fc4ad95c41de5681e22d55923845632
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-27 17:06:10 +00:00