Commit Graph

272 Commits

Author SHA1 Message Date
Danny Tuppeny c0b424f28f [analysis_server] Update interactive forms for latest spec changes
This updates the interactive forms classes to reflect recent changes.

Previously, we would only send back the outstanding fields to the client, and it would only provide answers for the same.

Now, the server will always send all fields to the client, and the client will always provide all answers. Answers are looked up IDs (a new field on `FormField`, and `FormAnswer` which wraps the answer) rather than rely on indexes.

Fields can also now be required.

Change-Id: If4aa1f9a18fa873e83cb0ea1fd74c2e42cd2fa1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508103
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-01 11:46:51 -07:00
Paul Berry ca78143775 Merge OWNERS_FOUNDATION into OWNERS_LANGUAGE.
These two groups were the same (except for Kallen, who was
accidentally not included in OWNERS_FOUNDATION and should have been),
so we decided to merge them. Internally, the group is called the "Dart
Language and Core Libraries" team, so `OWNERS_LANGUAGE` seems like the
one to keep.

Change-Id: I606ba5828f482c04841c2e995a0066ad6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508166
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-06-01 09:59:56 -07:00
Ryan Macnak 7e5b075680 Reland "[standalone] Remove the fallback root certificates."
Leave in hooks for the google3 build.

TEST=ci
Change-Id: Ib5768d27fcdbf3d4963da3d8dd142bea5fae10ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506420
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-01 08:32:26 -07:00
Ryan Macnak 53733077b2 Revert "[standalone] Remove the fallback root certificates."
This reverts commit 039aef728a.

Reason for revert: b/515601247

Original change's description:
> [standalone] Remove the fallback root certificates.
>
> The discovery of the system root certificates is more robust after 2142d8e148.
>
> TEST=ci
> Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TEST=ci
Change-Id: Ib07de221ff1160461d930f7165a7cd8179b4e3f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506100
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-05-26 07:49:52 -07:00
Danny Tuppeny c8a74e71ef [analysis_server] Add classes for processing interactive forms
This adds some classes for processing interactive forms (I'm splitting this from the CL that updates refactorings to simplify reviewing).

The `InteractiveForm` class managers a whole form (all fields), and processes a set of fields/answers that come back from the client (which may be the full set, or a subset). It produces a list of the outstanding fields (which need to be go back to the client) as well as maintaining the full set of answers for the master field list (to use as arguments for a command, for example).

I've also commented out enums/lists from the protocol code for now, because I made the field kinds `sealed` so we get exhaustiveness checking in the validation, but want to delay fully implementing those for now.

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

Change-Id: Icc4dcea8c9eab20ffbdd19ebbc69e1285464f7ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505683
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-05-22 12:44:58 -07:00
Danny Tuppeny fc43f03f67 [analysis_server] Support sealed classes in LSP codegen
This will make it easier to switch() on these fields and ensure we cover them all.

Change-Id: I9078838bb461ea9bdca268857fb8ad327dda2d11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505460
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-05-22 08:08:35 -07:00
Danny Tuppeny 026043d9ed [analysis_server] Add helper functions to support flags enums
In the new interactive forms, some of the enums can be combined (eg. `FileExistence.New | FileExisting.Existing`). This adds a flag that produces some helper functions for `hasFlag()` and `combine()`.

These helpers are not used outside of tests in this CL but will be used in a future CL (which I'm trying to avoid getting too big to simplify reviewing).

Change-Id: I1b5f06f05d96781c4bc6a246a0a9309a786c1987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505320
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2026-05-21 13:06:43 -07:00
Danny Tuppeny adf9500581 [analysis_server] Update Interactive Forms definitions based on the latest spec
I had previously been using a slightly outdated version of the protocol. This updates things to match what's in Hongxiang's definition at https://github.com/Dart-Code/Dart-Code/pull/6059.

Change-Id: I98578383fb7a68bb0f2f1a813753192a17c2df40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505221
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2026-05-21 09:51:15 -07:00
Ryan Macnak 2f2a523818 Fix gcc 16 build.
TEST=local build
Bug: https://github.com/dart-lang/sdk/issues/63406
Change-Id: I20c2806e569211ef7d32e95961179dbf2aba15a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505181
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-20 19:36:12 -07:00
Danny Tuppeny da6eab18cb [analysis_server] Extract custom protocol classes to their own files
No functional changes here, it just extracts definitions of custom protocol classes that are not trivial into their own files.

Change-Id: I0194a3074d280b6423dfae8b5e522ec536ce0dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504560
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-05-20 09:52:18 -07:00
Ryan Macnak b2911c0bf1 Fix GCC build.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/63406
Change-Id: I3bb3963fcc182777c5d2c0e062ae4bbf3c5aae75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504800
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-20 08:21:30 -07:00
Danny Tuppeny 0888111999 [analysis_server] Add protocol classes for new interactive forms
Change-Id: Iefb251c2a4982bf4118430e0f2885f248e1b5a57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504540
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-05-19 12:23:39 -07:00
Ryan Macnak 039aef728a [standalone] Remove the fallback root certificates.
The discovery of the system root certificates is more robust after 2142d8e148.

TEST=ci
Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-19 11:20:48 -07:00
Kallen Tu 81a14586a9 [migrate][analysis_server] LSP Protocol for migrate tool.
This some basic scaffolding for the migrate tool. We'll add a protocol to the analysis server with the following parameters and result:

Parameters
- `uris`: Workspaces/packages to be migrated

Result
- `summary`: Information about fixes that could not be applied automatically. (e.g. if there was a conflict) or information about what fixes were applied and what SDK version the pubspec has been changed to.
- `edit`: A list of edits to be applied.

There are no interesting tests yet, but I hope to have a suite of tests for the next change.

Fixes: https://github.com/dart-lang/sdk/issues/63247
Change-Id: I77508720acb17af5ec86675fd3f3045e2a610bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2026-05-01 12:13:41 -07:00
Martin Kustermann 0b7c68fad4 [dart2wasm] Roll binaryen to newer version
This brings in an optimization for [0] we filed

[0] https://github.com/WebAssembly/binaryen/issues/8618

Change-Id: I2640d3c7d1f44a0bcc00129123a5ea6f8327047a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496860
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-04-21 05:27:37 -07:00
Ben Konyi 93ecced96f [ DAS ] Update widget preview detection to report both file and library URIs
Change-Id: I138a8eb52ee38356f4cf710a7e530bfa7aa9daf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490361
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-03-26 09:21:56 -07:00
Ryan Macnak 0a376fb28d [build] Don't depend on the Git repo using --ref-format=files.
With the newer --ref-format=reftable, .git/logs/HEAD does not exist, so the version generation steps would always be considered dirty.

Cf. c7e58f832a

Change-Id: Id8735a739b751e4a54c2e4beecbef1eb23771c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488600
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-03-24 15:36:36 -07:00
Ben Konyi 2a83a78213 [ DAS ] Add initial support for widget preview detection service
The Flutter Widget Preview feature is currently implemented within
Flutter Tools, which is responsible for detecting widget preview
annotations in the user's project. When previews are detected, the
Flutter Tool injects code generated based on the detected previews into an artificial widget_preview_scaffold project and performs a hot reload to render updates to the preview set in the scaffold application.

`package:analyzer` is currently being used to detect previews, but this comes with a significant amount of memory overhead. Since widget
previews are mostly being used from within IDEs which already have an
active analysis server, moving widget preview detection into the DAS
will remove the need for creating an additional analysis context in the Flutter Tool itself.

This change includes the initial work to move widget preview detection
into the DAS. It utilizes a pull-based mechanism, where the Flutter Tool listens for file system events and then queries the DAS using the `dart/textDocument/getFlutterWidgetPreviews` and `dart/workspace/getFlutterWidgetPreviews` LSP methods.

Each reported preview contains some generated code based on the annotation used to define the preview. This code has all constants from the original annotation evaluated to either primitive values or constant expressions with namespaces applied to each symbol, allowing for the Flutter Tool to inject this code directly when updating the generated code in the scaffold project.

Towards https://github.com/flutter/flutter/issues/179584

Change-Id: I043cb3235a66b25dda3f852ca7f147bff0e1e537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478100
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-03-22 19:19:03 -07:00
Lasse R.H. Nielsen 56505e0575 Stop using Match.group.
The `Match.operator[]` does the same thing and is
generally recommended (and shorter).
(I want to deprecate `group` and `groups`)

Tested: Refactoring.
CoreLibraryReviewExempt: Calling equivalent function.
Change-Id: I4c758968ae622fe16b7322be1b29b05b91e7fcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489021
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2026-03-20 09:09:46 -07:00
Slava Egorov 6a6e96fc2a Downgrade Perfetto to 13ce0c9e13b0940d2476cd0cff2301708a9a2e2b
Most recent Perfetto is causing headaches in Dart to Flutter roll.

Change-Id: Ic5aa9905dea6dd292f354c0586a61c686a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-02-26 12:18:08 -08:00
Ryan Macnak 6fd49f5b27 [vm] Remove double-conversion's dependency on the STL's locale.
out/ReleaseX64/exe.stripped/dartaotruntime -187k (-3.14%)

TEST=ci
Change-Id: I71652fe4c090132fcf938f8865f9c50594bf8cfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483622
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-02-25 16:18:21 -08:00
Slava Egorov d7fa1ced6a [vm] Speedup profile data streaming in AOT
Current implementation of profile data streaming inherited its 
approach to symbolization from the implementation of vm-service's
get{,Perfetto}CpuSamples methods. These methods rather expensive
as they rely on CodeLookupTable to symbolize collected samples, and
constructing CodeLookupTable requires bringing all threads to safepoint
and iterating over old-space to collect code objects. This can take
significant amount of time - especially when old-space is large (e.g.
consider 1Gb+ heaps of Dart Analysis Server).

This CL rewrites profile data streaming to use a completely different
approach in AOT mode where Dart frames are not symbolized eagerly 
and instead stored in the timeline in their raw form: a pair of
an isolate group specific Mapping and a PC value relative to the start
of that mapping. At the end of streaming (or when isolate group
exits) an additional ModuleSymbols packet is emitted which provides
symbolization information for all collected frames. ModuleSymbols
mappings can be cheaply constructed from collected PCs using 
ReversePc lookup tables.

TEST=expanded existing tests

Change-Id: I56ef1dd4c9a17fb0d2e9c24e51f2e4656a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482782
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-02-25 04:48:51 -08:00
Slava Egorov a2b1bb421a Add .vpython3 spec for Perfetto.
Perfetto gn/write_buildflag_header.py requires at least 3.9 because
it uses type hints like list[str].

Without the spec Flutter bots try to run it using Python 3.8.x which
fails.

Change-Id: I34fb038c591705220481ee8e3036a4626a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483500
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-02-25 02:50:41 -08:00
Slava Egorov 1418cb1b9c Roll Perfetto to 49c59636465f2a32f4d83cff835538ba7bf8d732
Drop libprotobuf dependency and update compile_perfetto_protos
to rely on externally provided protoc and protozero_plugin. 
This is done because protoc does not build with our current
toolchain and fixing this build requires rolling new protobuf,
protobuf_gn and perfetto. Which also pulls more external dependencies
like abseil.

Regenerate Perfetto *.pbzero{.cc,.h}, *.dart files

TEST=ci

Change-Id: I11a32aa07e810b48ac12502e526bbaee6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482781
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-02-24 03:24:32 -08:00
Daco Harkes 61babf9699 [record_use] Stop recording annotations
Stop recording annotations (in the VM and dart2wasm).

The visitor will stop visiting as soon as it is in an expression that
is in the annotations list.

The tests have been migrated so that their constants occur in the executable code instead of annotations.

One test has been kept to see that the annotations no longer are
recorded:
TEST=pkg/vm/testcases/transformations/record_use/instance_method.dart

A new test has been added to ensure we're also recording constants
nested inside other constants.
TEST=pkg/vm/testcases/transformations/record_use/nested_instance_constant.dart

Closes: https://github.com/dart-lang/native/issues/2977
Change-Id: I5d814c8500b510628025ab2daeb115e782dd423a
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-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,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478440
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-02-05 01:13:52 -08:00
Danny Tuppeny 2b88f4fea8 [analysis_server] Support String IDs in log replay + run some LSP integration tests with string IDs
My previous CL made some LSP tests run with String IDs instead of ints, but those tests don't appear to go through the session logger so did not fail with the casts here.

This change adds a base integration test that also uses string IDs, which did fail on the cast, so I've updated the session logger to use `Either2<int, String>` for IDs instead.

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

Change-Id: Iee582e9ce2b8b5a1127120c987670a679d2ca76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/473260
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-01-21 12:24:27 -08:00
Danny Tuppeny b5b452230c [analysis_server] Update toJson() methods to handle unions
Previously, the result of calling `toJson()` could still include some classes (like `List` and `EitherX<>` unions). This didn't cause issues because `jsonEncode()` would handle those types anyway (calling `toJson()` recursively), however changes to support the log replay are looking inside the returned Map and should see consistent types.

Change-Id: Ie52a7251ee10579de8ce605584feb82abc15eb8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/472900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2026-01-14 11:26:20 -08:00
Daco Harkes 0d052e3969 [deps] Roll dart-lang/native
This roll moves `package:record_use` to the dart-lang/native repo.

Change-Id: I31183dc8b72272d7e94ed3031ca0b8bfca583e0d
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
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/463662
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
2025-11-24 05:04:03 -08:00
Danny Tuppeny 0a15269bbb [dds/dap] Remove macro support from debug adapters/DAP
This removes support for dart-macro+file URIs (and using URIs in the DAP protocol in general) and all related code/tests.

Change-Id: I7cbbcc8463e7c352517d5bd58e8cdf63c7d23c0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460940
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-11-17 09:05:57 -08:00
Danny Tuppeny 70358239d8 [analysis_server] Remove support for macro virtual files / DartTextDocumentContentProvider
This removes all code related to handling requests for (and sending notifications of modifications of) the virtual files for macros.

Clients would never call this handler unless the analysis server had previously told them about these virtual files with the `dart-macro+file` scheme, which never happens because the implementation was previously removed.

This does not remove the `clientUriConverter` (which as well as handling conversions to/from the macro scheme, also handles conversions between URIs and Paths to support using URIs in the legacy protocol) because I'm not yet certain that is unused.

Change-Id: I148e2383a48b5f6e3a28eff3dd11506fc86353b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461120
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-11-11 11:04:49 -08:00
Slava Egorov 07c9599ead [vm] Tweak location of Perfetto protos
This CL tries to address version skew issues which occur in internal
monorepo which we created by checking in *.pbzero.h files into
runtime/vm/protos/*. These files refer to protozero internal headers,
which in the internal monorepo come from a shared Perfetto dependency
which does not necessarily match the version we pinned in our DEPS and
used to generated these files.

This version skew caused problems for the Perfetto team, see
https://github.com/google/perfetto/pull/3195

To resolve this change layout of our repo to allow us to depend on the
shared Perfetto entirely - including its version of *.pbzero.h headers.

We change include paths in the VM source to

    #include "third_party/perfetto/protos/..."

which match location of these headers in the internal monorepo.

To make the code compile in the normal SDK checkout we shift location of
Perfetto and checked in code:

* Perfetto source moves from third_party/perfetto to
  third_party/perfetto/src.
* Generated code moves from runtime/vm/protos into
  third_party/perfetto/protos.

Note: experiments show that *.pbzero.h files tree-shake very well and
you pay only for things that you use. That means depending on *.pbzero.h
files generated from full message definitions rather than our manually
tree-shaken versions does not actually increase the size of the VM
binaries. We could switch our external build to do the same but this
would make protoc a build time dependency, which seems excessive.

TEST=ci

Change-Id: I724b9d9304be83302a5d83c2337154b36a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454260
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-10-13 02:09:31 -07:00
Daco Harkes 9eae46d69f [deps] Roll dart-lang/native
Change-Id: I3ec813b29bef20c24af638f5faeb7bc33e342494
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446640
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2025-08-25 08:57:05 -07:00
Brian Wilkerson 82a01bb69c Add a custom LSP request to produce a summary of a file
The exact format of the summary is yet to be decided, but at the moment
it's producing an abbreviated form of Dart that doesn't include function
bodies or documentation comments.

No attempt is made to remove in-line comments, but we might want to
consider doing that.

Change-Id: Iec6e27c54e3099a596d50d5c461356006694690b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440682
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2025-07-21 15:45:39 -07:00
Daco Harkes c9ea56a92f [deps] Roll dart-lang/native
Change-Id: I9164d4aeb799568d7c06215d62c2ebf506ae20b1
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
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441500
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-07-21 02:22:15 -07:00
Daco Harkes 04e4fd2ddf [infra] setup interop OWNERS file
Change-Id: Ibb9c368c6dfd1aeb34a4ac6e146a41f983bbb894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440463
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-07-15 06:19:44 -07:00
Michael Goderbauer 28c833c669 [deps] Roll dart-lang/native
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Ib1b6b54d2a8b1e312c98f35973cf5df0c5c41084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438900
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Michael Goderbauer <goderbauer@google.com>
Auto-Submit: Michael Goderbauer <goderbauer@google.com>
2025-07-10 00:42:33 -07:00
Michael Goderbauer a69b73e83a [deps] Roll dart-lang/native
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: I6fa5db72123283027e2c0ebe216476b9b79071d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435781
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Michael Goderbauer <goderbauer@google.com>
Auto-Submit: Michael Goderbauer <goderbauer@google.com>
2025-06-23 01:29:31 -07:00
Michael Goderbauer 88364585c5 [deps] Roll dart-lang/native
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: I8e0434e2beda34f3df16fffe7a31259a7e2f85b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435100
Auto-Submit: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2025-06-17 04:11:22 -07:00
Ryan Macnak 1fac08e708 Update double-conversion to 7630f84a10f9428b041d0471e71a562141e9684b.
Change-Id: I37d176a938798cb74eae0a3a445182beb55a117d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434900
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-06-16 15:31:25 -07:00
Daco Harkes 087c496876 [deps] Roll dart-lang/native
Change-Id: Idb226255d913eeca9ab10117438a6c1769f0d1b9
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434721
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2025-06-13 08:49:52 -07:00
Daco Harkes d5f4b8fff4 [deps] Roll dart-lang/native
Change-Id: I03e4bbd41641c16cf945797bdbad23734367f983
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429361
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2025-05-19 12:14:11 -07:00
Danny Tuppeny 4f3a672b00 [analysis_server] Add a CodeAction typedef for CodeActionLiteral | Command
Following on from a previous change to use the term `CodeAction` (an item returned from a `textDocument/codeAction` request) to mean either a `CodeActionLiteral` (which contains inline edits and/or a command) or a base `Command`, this adds a typedef describing the same and updates all code that used `Either2<CodeActionLiteral, Command>` to instead use the typedef.

It also renames a few additional methods/functions to be more consistent with these terms and adds a `CodeActionExtension` to simplify extracting fields like `command` and `title` from either kind of code action.

Change-Id: Iad5f77ef21229fc5c9738527f98ccf7202f83bd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425863
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-01 11:12:17 -07:00
Daco Harkes 245498232c [deps] Roll dart-lang/native
`package:native_assets_cli` has been split up and
`package:native_assets_builder` has been renamed.

Change-Id: Ic9d5c21bb3c7ecf7924fdee6b4281153ad37fac5
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425504
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-05-01 02:18:11 -07:00
Danny Tuppeny 9831fc4e98 [analysis_server] Rename "CodeAction" to CodeActionLiteral"
The term "CodeAction" is a bit overloaded. It could mean both an
individual result from the `textDocument/codeAction` request (which is a
`Command` or a `CodeAction`), or the `CodeAction` type defined in
the spec (which the spec refers to as a "Code Action literal").

To reduce confusion where we have similar APIs that operate on
"Code Actions" (CodeAction|Command), this renames the `CodeAction` class to
`CodeActionLiteral` and we will use the term `CodeAction` to mean either of
those types.

To make things simpler to review, this change _only_ renames the class, and also swaps the order of the types in some places that used `Either2<Command, CodeAction>` (which is opposite to the spec and some other code). Some further clean up will be done in a separate change.

Change-Id: Idcd8265f9229c3450004e68334e98a7b530330a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-29 20:54:58 -07:00
Daco Harkes 108e40f31b [deps] Roll dart-lang/native
Change-Id: I418ca4177b64ec566d6e5afa876f6ab23c77a4f9
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-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425040
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-04-29 05:54:11 -07:00
Danny Tuppeny 823947b857 [analysis_server] Always show type parameters in LSP type hierarchy, not type arguments
The change at 27ba8fce6c (to fix https://github.com/Dart-Code/Dart-Code/issues/4217) added type arguments to the LSP Type Hierarchy (before, neither type args or type params were shown).

Showing type arguments seemed reasonable when looking at supertypes, but behaves oddly for subtypes (and also when invoked on a type with arguments), so this partly reverts that and shows type parameters in all cases instead.

This simplified the code a bit and removed the `TypeHierarchyAnchor` class we were round-tripping in order to preserve the type arguments.

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

Change-Id: I4e0e92d4c73712fde7a9526c51699ecdae0f4ab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-04-17 11:35:43 -07:00
Mayank Patke 4d88caca09 Remove babel from third_party
Change-Id: I2b7aaff12477552ab9490deeeb31e2179897968b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420281
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-04-03 15:22:27 -07:00
Danny Tuppeny 5e62d29bf5 [analysis_server] Add 'range' to EditableArguments response
See https://github.com/flutter/devtools/issues/9035

Change-Id: Ia2cadea05f10f16e00d1dbf0240b16761c0c6b0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-04-01 10:50:07 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -07:00
Devon Carew 3c973fb292 [lints] address diagnostics related to strict_top_level_inference
Change-Id: I228058202855900f0adba73c1ab04d35180a6e5d
Tested: this is an analyzer diagnostic only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414900
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-03-17 08:27:57 -07:00