Commit Graph

103529 Commits

Author SHA1 Message Date
asiva 9fec00aeed [SDK] Reland : Switch dart2js to an AOT snapshot.
TESTS=ci

Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-08 17:49:34 +00:00
Danny Tuppeny 75d15bbfa3 [analysis_server] Support formatter page width from analysis_options in legacy protocol
This adds the same support previously added to LSP to the legacy protocol.

As with LSP, the value in analysis_options overrides the explicit argument (since the expectation is that the user has not specifically chosen this value for this file, but rather as a default for the project/globally).

See https://github.com/dart-lang/sdk/issues/56864


[analyzer] Add support for "formatter" in analysis_options + use page_width in LSP

This adds support for validation + completion for `formatter/page_width` in analysis_options, and uses this value in preference to the client-supplied value in the LSP server.

It does not yet add support for the legacy protocol, and there are a few questions in https://github.com/dart-lang/sdk/issues/56864#issuecomment-2399289974.

See https://github.com/dart-lang/sdk/issues/56864

Change-Id: Ic2be00087f78eb62c409dbc8f558d2f24b521f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-10-08 17:31:46 +00:00
Ryan Macnak 262b759e06 [vm] Place regexp sources in their own directory.
This makes it easier to see their cost in binary size tools.

TEST=ci
Change-Id: I6079ad9fb9b7c9450bb8d255e9a794a38ec9ae62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388641
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-10-08 17:28:49 +00:00
Derek Xu bdff12304d [VM/Debugger] Delete a TODO
I didn't mean to commit this TODO, it was just a reminder I left as I was working on a CL.

TEST=CI

Change-Id: I5e3f7592bd4d7d92f85b92ef44c6adf26465c772
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388380
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-10-08 17:23:43 +00:00
Konstantin Shcheglov 6655f50989 Prepare to publish analyzer 6.10.0 and _fe_analyzer_shared 75.0.0
Change-Id: I05c4b308b8ca8f700cd4e135a999041db6271de8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388941
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-10-08 17:19:40 +00:00
Nicholas Shahan ebd0b2ee16 [ddc] Merge the command libraries into one
Copy all of compiler/shared_command.dart into command/command.dart

Change-Id: Id8fb363b2800fe5fd60fae75f7dc557b33a806ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388051
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-10-08 16:51:12 +00:00
Danny Tuppeny 5d84439f5d [analyzer] Add support for "formatter" in analysis_options + use page_width in LSP
This adds support for validation + completion for `formatter/page_width` in analysis_options, and uses this value in preference to the client-supplied value in the LSP server.

It does not yet add support for the legacy protocol, and there are a few questions in https://github.com/dart-lang/sdk/issues/56864#issuecomment-2399289974.

See https://github.com/dart-lang/sdk/issues/56864

Change-Id: I7844e3abd1191beb9cc24197bbc8aa7c9e9ad4fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388822
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-10-08 16:37:54 +00:00
Kallen Tu c8ee0e78a5 [flow] Pipe the language feature flag inference-update-4 through flow analysis.
Weaves the flag `inference-update-4` through to `FlowAnalysis` and updating both the analyzer and CFE point-of-entry to include the flag.

This flag will be used in `flow_analysis.dart` to hide upcoming bug fixes to flow analysis.

Change-Id: Ib0004eb4bcf0b6e579116632b5973fe969e51e90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388582
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-10-08 16:32:24 +00:00
Paul Berry be17dc6d7a Remove unnecessary state restoring logic from analyzer constraint generation.
The `TypeConstraintGatherer` methods `trySubtypeMatch`,
`_functionType`, `_functionType0`, and `_recordType` have the
convention that if they do not find a match, they leave the set of
gathered constraints in the same state it was in at the time of the
call. The shared methods they invoke
(`performSubtypeConstraintGenerationForFutureOr`,
`performSubtypeConstraintGenerationForTypeDeclarationTypes`, and
`performSubtypeConstraintGenerationForFunctionTypes`) all follow the
same convention.

Because of this convention, much of the logic in `trySubtypeMatch` for
restoring the state of gathered constraints was actually redundant;
this CL removes the redundant logic. It also adds some comments to try
to clarify the calling conventions.

Change-Id: Ie11e4bc3edd3249191a09d9b93ae5844d5bf511c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-10-08 16:26:28 +00:00
Devon Carew 7d506c0f4d [deps] rev async, collection, convert, crypto, http_parser, json_rpc_2, pool, typed_data, web_socket_channel, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/c0d81f8..5f70a99):
  5f70a99  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/async#286)

collection (https://github.com/dart-lang/collection/compare/24b75d8..887b826):
  887b826  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/collection#361)

convert (https://github.com/dart-lang/convert/compare/9035caf..d361833):
  d361833  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/convert#109)

crypto (https://github.com/dart-lang/crypto/compare/eede7d6..3d26ef4):
  3d26ef4  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/crypto#183)

http_parser (https://github.com/dart-lang/http_parser/compare/ce528cf..23d7758):
  23d7758  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/http_parser#102)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/b4810dc..c9b616b):
  c9b616b  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/json_rpc_2#118)

pool (https://github.com/dart-lang/pool/compare/924fb04..7bfc71b):
  7bfc71b  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/pool#91)

typed_data (https://github.com/dart-lang/typed_data/compare/2bb9e6e..6abfafd):
  6abfafd  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/typed_data#93)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/0e1d6e2..40aa29f):
  40aa29f  2024-10-04  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/web_socket_channel#382)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/5c54d45..35f4248):
  35f4248  2024-10-07  Kevin Moore  fix lints (dart-lang/yaml_edit#97)

Change-Id: Ia87d8906470c5ac3e3fd95839275c11cc2032052
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2024-10-08 16:24:22 +00:00
Derek Xu 652242f3cf [package:vm_service] Fix wildcard_test
Fixes: https://github.com/dart-lang/sdk/issues/56868
Change-Id: Ie1ae0ad6f872fe7f4fc330d7e4c564ac10804d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388880
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-10-08 15:42:21 +00:00
Alexander Thomas d4aa30a3ba Revert "analyzer: Write out qualified extension names in error messages"
This reverts commit 10c1d883df.

Reason for revert: g/dart-sdk-rolls/MOLCzv4S-kQ

Original change's description:
> analyzer: Write out qualified extension names in error messages
>
> Fixes https://github.com/dart-lang/sdk/issues/56269
>
> Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: I613695e90c96e5ffdb4dc56e729dc34be385f5fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388823
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-10-08 15:07:38 +00:00
Vyacheslav Egorov 284e9e91c8 [vm] Allocation profiling via uprobes
This CL adds basic infrastructure and tooling to perform allocation
profiling using uprobes.

See runtime/tools/profiling/README.md for more details.

TEST=manually tested, requires root access

Cq-Include-Trybots: luci.dart.try:vm-aot-mac-release-arm64-try
Change-Id: Id68d181740dbf227a12d8cdba84b11a9518e75a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382405
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-10-08 13:56:45 +00:00
Reid Baker e1dc36994a Bump dart version to 3.7
Change-Id: I9fec9765abfb46b2a3753367c20ac807fbdd487e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388600
Commit-Queue: Reid Baker <reidbaker@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-10-08 13:17:47 +00:00
Nate Biggs 963c28a114 [dart2wasm] Allow tests to override jscm mode.
This allows tests that would fail in JS compatibility mode (e.g. tests that do a lot of string manipulation) to disable the mode for their own execution.

Also ensure dart2wasm-*-jscm-* builds do a "create_sdk" so that the dart2js platform dill is available for the test.

The alternative I considered was skipping the test but "--js-compatibility" is a dart2wasm-specific flag and the test infra is unaware of it so we can't skip the test via a status file.

Bug: https://github.com/dart-lang/sdk/issues/56858
Change-Id: I60179eaab2e4522acf1fe0b47c7c02ccb1ca957b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388644
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-10-08 13:16:19 +00:00
Florin 55540e64a4 Update the fastestMarathon to 2023 human standards.
Closes https://github.com/dart-lang/sdk/pull/56857

GitOrigin-RevId: 59a15556091ea2e1fc07346a3a067189d49cabfc
Change-Id: Ib233ee1f5231cd7773799ff9f8814168aaa04854
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388423
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2024-10-08 12:19:23 +00:00
dependabot[bot] 2c5a992514 Bump github/codeql-action from 3.26.9 to 3.26.11
Closes https://github.com/dart-lang/sdk/pull/56861

GitOrigin-RevId: d0f9e54cc61238d9bdfd8a927ab493582d5b0da8
Change-Id: I8179e30a85f8f06620b65e333380a32b8e80e865
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388520
Reviewed-by: Alexander Thomas <athom@google.com>
2024-10-08 11:58:38 +00:00
Tess Strickland 2b1e82b4fe [gardening] Satisfy UBSAN for possibly negative left shifts.
TEST=vm/cc/Assembler_LslImmediate on ubsan trybots

Fixes: https://github.com/dart-lang/sdk/issues/56860
Cq-Include-Trybots: luci.dart.try:vm-ubsan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-aot-ubsan-linux-release-x64-try
Change-Id: Iad1332d638af633373bbb588ea554e6a0da71c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388840
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-10-08 09:47:59 +00:00
Martin Kustermann f3bce39727 [tools] Hide cursor while drawing prompt in heapsnapshot analysis tool to avoid flickering cursor
Change-Id: I544bfd16a1fc5f4bbb243d66d73526995037e9bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388821
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-10-08 08:24:12 +00:00
Paul Berry 5eacff3ab8 Make type variable constraint generation conventions uniform.
This CL changes the CFE's
TypeConstraintGatherer._isNullabilityAwareSubtypeMatch method so that
it is responsible for restoring the constraint state if there is no
match, making it consistent with the contraint gathering methods in
the analyzer and _fe_analyzer_shared.

This made it possible to remove much of the calls to state restoring
logic that _isNullabilityAwareSubtypeMatch previously had to do after
making recursive calls to itself, as well as a lot of state restoring
logic in _fe_analyzer_shared. It also made it possible to eliminate
_tryNullabilityAwareSubtypeMatch from the CFE (since
_isNullabilityAwareSubtypeMatch now has the same behavior).

Making this change now should hopefully simplify the remaining steps
in sharing type variable constraint generation logic, since it will no
longer be necessary to adjust state restoring logic when moving code
between the CFE and _fe_analyzer_shared.

I also took the liberty of rewriting some of the documentation
comments to try to clarify the new conventions.

In the process I also discovered several instances of unnecessary
state restoring logic in the analyzer; I'll make a separate CL to
clean those up (and adjust the analyzer documentation too).

Change-Id: If74c8be06f1d53f61d109e5ea2a8526d5cbcd347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388265
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2024-10-08 05:44:20 +00:00
Nicholas Shahan b4d5272d99 [ddc] Move command.dart library
From: lib/src/kernel/command.dart
To: lib/src/command/command.dart

This is a step towards organizing the code from shared_command.dart and
eventually deleting it.

Change-Id: I1ca9fcfd3d7d74511957d516c01544f4a68e4e89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388050
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-10-08 00:47:01 +00:00
Nicholas Shahan 45b1612064 [ddc] Delete generic class table
The generic class table is no longer used since changing to the
new representation for generic classes.

Change-Id: I836e0ee9e4b291dab68397554adbbd1a67376b9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388740
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2024-10-08 00:08:18 +00:00
Ryan Macnak 2142d8e148 Search in more locations for the system's root certificates.
TEST=access pub under wolfi
Bug: https://github.com/dart-lang/sdk/issues/56734
Change-Id: Ie2033d3551966180dfdf3eff1b5ef39ac0b79ce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388080
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-10-07 23:33:09 +00:00
Brian Wilkerson 5fab16aca2 Fix two tests in InheritanceManger3
There are still two failing tests, but I wanted to get these in before
some code started depending on the broken behavior.

Change-Id: I50f0e282293e756409064491e74c64311fbdf707
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388666
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 22:57:21 +00:00
Nicholas Shahan 085deb8bc4 [ddc] Create new result.dart library
This is a step towards organizing the code from shared_command.dart and
eventually deleting it.

- Move `CompilerResult` from shared_command.dart.

Change-Id: Ibe4b8bbd5c6deb2558392255f3818773fa4ea80e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388049
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-10-07 22:54:09 +00:00
Ryan Macnak 26ce00d68c [tools] Add binary size tool.
Compared to (Chromium's) third_party/binary_size, this tool better simplifies paths and can handle `dart:` and `package:` "paths".

Cf. e32d98cd06.

Change-Id: I9e757d9ba8422024584586899481279f7fd6542d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387840
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-10-07 22:32:26 +00:00
Ryan Macnak 0ab55451f4 [vm] Cleanup reload debugging code.
TEST=ci
Change-Id: I840fc1a614186e0f330f4b2313a6706452af6998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388665
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-10-07 22:29:49 +00:00
Ryan Macnak fa75e88591 [vm] Avoid massive vtables for IL instructions.
Implement type checks for leaf IL instructions using the instruction tag
 instead of per-type virtual functions, which scale quadratically with the number of IL instructions.

out/ReleaseX64/exe.stripped/gen_snapshot 7601248 -> 6890640 (-9.3%)

TEST=ci
Change-Id: I3d9c84c67e6ab0f3020ebb02068451e6f1c150f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388043
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-10-07 22:14:29 +00:00
Keerti Parthasarathy b2e74ab9da [Element model] Migrate edit_import_elements.dart
Change-Id: If81e7081207960b3a55bc6d6dc0b5488b50e35a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-10-07 22:12:39 +00:00
Parker Lougheed 223a2db056 [linter] Expand on migrated avoid_returning_null_for_void tests
Also adjusts the lint implementation to avoid a few nullable types and non-null assertions.

Change-Id: I4199b8ebe94842613c7d8fb322c109c28f194f21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388500
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
2024-10-07 22:02:32 +00:00
Konstantin Shcheglov a17969b5c2 Parts. Deprecate also LibraryOrAugmentationElementImpl.scope
Missed it in the previous CL.

Change-Id: Ib887b8423ead76907c7302036a3d2089ba85dbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 22:02:13 +00:00
Nicholas Shahan 807660f323 [ddc] Create new options.dart library
This is a step towards organizing the code from shared_command.dart and
eventually deleting it.

- Move `SharedCompilerOptions` and rename to `Options` from
shared_command.dart along with helpers.

Change-Id: Ic9edfb47fc2425a28b1e948d94fad96a2f594108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388048
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-10-07 21:21:30 +00:00
Konstantin Shcheglov 164777e2cd Part. Deprecate LibraryElement.scope
Change-Id: I85a24d0f1d0b4251415644fe1438503e41710436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-10-07 20:43:10 +00:00
Nicholas Shahan 9b7f5a0af6 [ddc] Create new arguments.dart library
This is a step towards organizing the code from shared_command.dart and
eventually deleting it.

- Move `ParsedArguments` and helpers from shared_command.dart.

Change-Id: I10a05f9595e5421b6d5498e2fd1138d0acfd5e35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388047
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-10-07 19:27:19 +00:00
Mayank Patke 626932a192 [DEPS] Update Chrome to 130.0.6723.31
Change-Id: I9a8e519e2e85e670de610d3dd2001d153341789a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388663
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-10-07 18:38:14 +00:00
Konstantin Shcheglov bfaf99ad93 Parts. Stop using LibraryOrAugmentationElement in analyzer_plugin/.
Change-Id: Ie6cef4384699d8b5ca8b6877d6cfe7881d554d44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388662
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-10-07 18:21:40 +00:00
Sam Rawlins 2c2c9ff3ef lint rules: Move tests for two rules:
* avoid_returning_null_for_void
* await_only_futures

Change-Id: Ic5665a7928cca64ec3e33c54c995ccbb67e954b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388640
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-10-07 18:13:59 +00:00
Konstantin Shcheglov 1dde650e9e Pull new dartdoc
Change-Id: Ib07ccd03b60a53814d2bc1a00716ffdfaa4dd698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388661
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-10-07 18:12:01 +00:00
Sam Rawlins 10c1d883df analyzer: Write out qualified extension names in error messages
Fixes https://github.com/dart-lang/sdk/issues/56269

Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 18:01:54 +00:00
Kevin Moore 07fd58715c pkg-compiler: drop Pair class, use Record
Change-Id: I19b05ffc6bd8e87e58990a62a21b8a2986fe9f54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382760
Commit-Queue: Nate Biggs <natebiggs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-10-07 17:55:44 +00:00
pq 6d72e53696 [element model] migrate prefer_final_in_for_each
Bug: https://github.com/dart-lang/linter/issues/5099
Change-Id: I172356e3db5d2f145e6e91596de018018ea57f1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388583
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 17:43:53 +00:00
FMorschel 3dc879f166 [DAS] Fix go to type definition for formal parameter
R=paulberry@google.com

Fixes https://github.com/dart-lang/sdk/issues/56844

Change-Id: Idb5c9420ecd9fda1d961c7211758721c4c4c7522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388660
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-10-07 17:38:19 +00:00
Danny Tuppeny 0bd1bffa84 [analysis_server] Show analysis driver scheduler timings in the diagnostic pages
The `AnalysisDriverScheduler` already keeps timings of all of its operations (in `accumulatedPerformance`), but they're not easily accessible to users and might help track down some kinds of performance issues.

This adds a new page to the diagnostics server that shows the timings, as well as a reset button to clear them so they can collect numbers just for a specific operation(s).

It involves some tweaks to the server to handle `POST` (because we shouldn't really use `GET` to mutate anything).

Change-Id: Ia49d471aaa1637a0c978f75569556b26982367d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388561
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 17:10:16 +00:00
Konstantin Shcheglov 49e6c6da96 Parts. Inline LibraryOrAugmentationElementImpl.children into LibraryElementImpl
Change-Id: I52c6a6eb31ba8b01a3b1c0bdb1b545346bb7d8ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388581
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 17:08:22 +00:00
Parker Lougheed 1a40c0473c [linter] Enable strict-raw-types to match analysis_server
Change-Id: I68cd94dd9fb123d6a36a78d40c475f20c165a716
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388445
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 16:46:35 +00:00
Konstantin Shcheglov 54c244b936 Test also search for CompilationUnitElement referenced in 'export' and 'part'.
Change-Id: I272de045d5e8d3287c568c108cf559955d32a091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-10-07 16:28:59 +00:00
pq 5572529e19 [element model] migrate prefer_function_declarations_over_variables
Bug: https://github.com/dart-lang/linter/issues/5099
Change-Id: Ifcbf62a09b8b77ecde4d5a16738faf5f0b8e1832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-10-07 16:22:21 +00:00
pq 420d213904 [element model] migrate avoid_type_to_string
Bug: https://github.com/dart-lang/linter/issues/5099
Change-Id: Id13597e0e0bc09f9486b663b0f3337fa6314867a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388070
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-07 16:16:30 +00:00
Lasse R.H. Nielsen 8d66e204f3 Change the type of nullFuture to Future<void>.
Was `Future<Null>` even though it was returned as `Future<void>`,
making `.timeout` fail due to contravariance when its callbacks is
a `void`-function.

Fixes #56846

CoreLibraryReviewExempt: Trivial change with no platform specific behavior.
Change-Id: I80c93c16efbb1f3d5219922dc1f30db039c88364
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388400
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-07 16:03:53 +00:00
Martin Kustermann 26eeeaa245 [deps] Roll dart-lang/native to new version
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Change-Id: I08f3d07571f1f9733cb177be326ec99acc5d68ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388540
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-10-07 15:57:33 +00:00