Commit Graph

7789 Commits

Author SHA1 Message Date
Ryan Macnak 8b4420c381 [infra] Shard Fuchsia ARM64 builder.
Also remove some dead Fuchsia scripts.

Change-Id: I87349973e2f192cb8472bb2b5c18049025950760
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508362
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-02 09:32:36 -07:00
Ryan Macnak 1d5057e94d [build] Use ad-hoc code signing by default.
Change-Id: I00b483581a04bfb4a4ed0d6212c767d67c003f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508164
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-06-02 02:39:40 -07:00
Ryan Macnak e82bd2c8ed [infra] Shard QEMU builders.
Change-Id: I0f96cfb8a7305897116149e5453d0ee5eb3744e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508361
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-06-01 17:14:39 -07:00
Ryan Macnak 201abb5cd1 Reduce sanitizer build set.
Change-Id: Idd5df6ff7c5b4f6bc3ccb0a335df0d332556d6ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508420
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-01 16:57:43 -07:00
Ryan Macnak 108682198a Reduce dartfuzz's build set.
dartfuzz has been taking ~35 min to finish the build and upload steps even with 100% RBE cache hit rate, causing it to fail to finish before the first wave of nightly builders trigger.

Change-Id: I932facd77bc08f4d7236ae8c760013406a69fb0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507267
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-06-01 15:34:32 -07:00
Ryan Macnak 2bf2ff5682 [infra] Reduce Fuchsia build set.
Change-Id: Iba59af7e031bafc375669e0ba3cc84081476e6e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507720
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-01 10:54:02 -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 7d6c973ed9 [build] Remove the last absolute paths from RBE builds.
Extend --check-clean (enabled on bots) to verify build commands don't include absolute paths.

The non-RBE GCC and MSVC builds still have absolute paths. GCC doesn't have -ffile-compilation-dir so it uses -fdebug-prefix-map, which is not fixable. The MSVC build has absolute path in the toolchain wrappers, which might be fixable.

TEST=ci
Change-Id: I3b984aaab7aefa7ff527f0a039ca42281224a09d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506505
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-01 08:46:47 -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 fc750ac8e0 [build] Remove unsigned executable memory permissions from the AOT runtime on Mac.
Snapshots are now generally signed Mach-O dylibs loaded by dlopen, instead of ELF files mapped executable by the VM's loader.

TEST=ci
Change-Id: Id19877bed0bd0282b320f070904a848b0c076a54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505200
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-01 07:21:29 -07:00
Jonas Finnemann Jensen 8c42f67d35 [dartpad] Part 1-8 squashed into a single commmit.
Reviewed in https://dart-review.googlesource.com/c/sdk/+/497583

[dartpad] Part 1: Protocol and Scaffolding

This sets up folders for `package:dartpad` and `package:dartpad_worker`,

R=athom@google.com, sigurdm@google.com

including:
 * `OWNERS` files,
 * Protocol definition,
 * Exceptions, and,
 * Virtual file system utilities.

[dartpad] Part 2: HotReloadCompiler

Adds the hot reload compiler logic to dartpad_worker.

This is models on dartdevc with `--reload-last-accepted-kernel` and
`--reload-delta-kernel` options. I don't think this does an incremental
compilation, instead it does a modular compilation. Meaning, we can have
a huge collection of precompiled DDC modules and the compiler just gets
a DDC outline/summary dill files for these modules. But on the other hand
the actual code that is compiled will be recompiled on every compile()
call.

This is very important for flutter_web.js / flutter_web.dill where the
precompiled DDC modules is around 60 MB in total. The fact that
package:flutter is precompiled into flutter_web.js is critical for
compilation performance for small dartpad-style example apps.

The downside is that unlike incremental compilation with _frontendserver_,
if the user were to install package:http and use it in the app they are
compiling then every `compile()` call will recompile `package:http`.
Where as with _frontendserver_ we'd be able to invalidate specific files,
and only those would be recompiled.

This leaves future work to either:
 * (A) Add support for modular compilation to _frontendserver_, such that
   we can do incremental compilation without having to first compile all
   of `package:flutter`.
 * (B) Refactor compilation strategy implemented here, to leverage
   modular further. We could for example compile all dependencies from
   `PUB_CACHE` into a `pub_cache_outline.dill` inside the dartpad worker.
   Then recompilation would only touch the user-code. Granted this is
   still less than ideal.

At the moment the lack of incremental compilation is not a blocker,
current dartpad doesn't have incremental compilation, but granted it also
only supported a single file. This dartpad environment will support
multiple files, but adding many files will result in poor performance
until we refactor and figure out how to do incremental compilation.
Hence, why we shouldn't block progress waiting for incremental compilation
to work.

R=nshahan@google.com

[dartpad] Part 3: Pub execution wrapper

Adds the internal wrapper for executing pub commands inside the
worker's virtual file system.

R=sigurdm@google.com

[dartpad] Part 4: Language Server wrapper

Adds the internal wrapper for spawning and communicating with the
Dart LSP inside the DartPad worker.

R=scheglov@google.com

[dartpad] Part 5: DartPad Worker

Implements the main worker entrypoint, RPC message handling. The
`bin/worker.dart` is what will be compiled to WASM and will run as a
_Web Worker_.

R=sigurdm@google.com

[dartpad] Part 6: DartPad Client library

The public-facing `dartpad` library that developers use to embed
the compilation environment in their web applications.

This finishes `package:dartpad`featuring:
 * `DartPad.create()`, which creates a _Web Worker_ running the compiled
   `pkg/dartpad_worker/bin/worker.dart`, and returns a `DartPad` instance
   wrapping RPC calls into the _Web Worker_.
 * `Sandbox.createIFrame()` which creates a _sandboxed iframe_ containing
   precompiled DDC modules from the SDK assets and `sandbox.js` for
   wrapping `ddc_module_loader.js` with an RPC interface. This returns a
   `Sandbox` instance wrapping RPC calls into the _sandboxed iframe_,
   making it easy to load modules, run library entrypoints (main()),
   initiate hot-reload, or launch a flutter app.

This is an initial API design that works. There are minor inconsistencies
and improvements that we should do. But I propose that we do so in
follow-up PRs.

R=sigurdm@google.com

[dartpad] Part 7: Build Targets

Adds a `dartpad` target to the Dart SDK, which produces:
```
out/ReleaseX64/dartpad/
├── dart
│   ├── dart_sdk.js.map
│   ├── sdk.js
│   └── sdk.tar
├── ddc_module_loader.js
├── sandbox.js
├── worker.loader.js
├── worker.mjs
├── worker.support.js
├── worker.wasm
└── worker.wasm.map
```

The `dartpad/` output folder is intended to be used as `assetBaseUrl` in
client libraries provided in `package:dartpad`. And the `dartpad/dart/`
folder is intended to be used as `sdkLocation`. These files are not
intended to be distributed along side the normal Dart SDK, instead we'll
publish them on a CDN and let people use `package:dartpad` to point at
these files. If they want to self-host everything, they can copy from our
CDN or rebuild the files using a local Dart SDK checkout.

These files are also necessary for testing, to ensure that we have proper
integration tests for `pkg/dartpad_worker/`. As we will want to publish
these files on a CDN the actual compiled size in release-mode matters,
thus, we have enabled wasm optimizations steps in this mode.

R=rmacnak@google.com

[dartpad] Part 8: Tests for `package:dartpad` and `pkg/dartpad_worker/`.

We have 3 kinds of tests:
 * Unit tests (vm, browser or both),
 * Worker tests (vm and browser),
 * Integration tests (browser-only).

As the Dart SDK test runner simply executes `*_test.dart` files with
`dart` and doesn't support compiling tests to the browser, launching and
running tests in the browser, we employ `dart test` to run tests. We do
this by having `pkg/dartpad_worker/dart_test.yaml` specify that
`dart test` should look for files names `test_*.dart`, and we then create
`pkg/dartpad_worker/test/ci_test.dart´ to be a single test that simply
runs `dart test` as a subprocess. Thus, the only test file triggered by
Dart SDK test runner is `ci_test.dart`, and if you locally run `dart test`
this will run the individual `test_*.dart` files.

While this hack to use `dart test` isn't ideal it gives everyone a decent
work flow. And saves us from having to invent complex test harness for
`pkg/dartpad_worker/`.

**Worker tests** defined in `test/dart/worker/` and `test/flutter/worker/`
are all imported into `test_dart_worker.dart` and
`test_flutter_worker.dart` to reduce test compilation time. These have a
non-trivial compilation time because the worker is running in the test
process. This allows testing on VM, which can be easier to debug.

**Integration tests** unlike _worker tests_ launch the worker compiled by
the `dartpad` build target in a _Web Worker_. This has less compilation
overhead for the individual tests, but involves more setup, and can be
a bit harder to debug.

Both worker and integration tests employ `test/asset_server/` which serves
assets built by the `dartpad` build target, and serves as a pub-server for
tests. It also serves assets built by `tool/setup_local_flutter.dart`
which creates flutter assets, though this is not intended to run as part
of CI, since we do not have a Flutter checkout available. Thus, for the
time being flutter testing is local only. Maybe, later we'll move this
script to another repository.

R=sigurdm@google.com

Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try
Change-Id: I3a99939ec5217b9f3a855fc5b9ad9699047d02cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507321
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-05-29 02:25:49 -07:00
Martin Kustermann 639f505308 [dart2wasm] Change dart2wasm-mac-safari to shards=1, i.e. no shards
Change-Id: Ia87d3ff035f936f1ca18a74a4ab75d464d502dbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507020
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-05-28 06:23:29 -07:00
Lasse R.H. Nielsen 69e9d32e87 Retire 'privately-named-parameters' experiment flag.
Change-Id: I6526bd63be5f71090a3ea7f3c705778e7debf584
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2026-05-28 05:13:49 -07:00
Sam Rawlins 37197070f8 DevTools: Run "flutter clean" after building
Fixes https://github.com/flutter/devtools/issues/9837

Change-Id: Ib770caf7409ea19970d4ff65cea7fe849a6a730c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505381
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-27 07:27:20 -07:00
Ryan Macnak b5c7496c02 Handle ARM64 in Debian package testing.
Change-Id: Iaff121c9a97fa5418a32efdc2550421796b70109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506160
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-05-26 10:27:44 -07:00
Ryan Macnak cf5494aa89 [build] Make generating the VM's version strings work with Ninja's restat feature.
If the version is unchanged, don't write to the file. Ninja will notice the modification time is unchanged and avoid rebuilding the target's dependents.

In particular, this means merely adding or amending a commit will no longer make the VM and all SDK snapshots dirty.

Change-Id: I25617c6c584d1d1094a339fe14716d18b28c688f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506101
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-26 10:03:28 -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
kevmoo 7679be813f [dart2wasm] cleanup owners
Change-Id: I63e9b69a07471641aaf32f7d0cdbbc4cd73877ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502260
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-05-22 11:06:09 -07:00
Alexander Markov 514be1781f [modular_aot] Add corelib tests to vm-modaot-mac-debug-arm64 bot
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I68b4c1ad40d21aa57cf79c802ce50073046cb208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505380
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-05-21 12:38:04 -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
Sam Rawlins 3de2ddee09 Reapply "Switch on building devtools from source when building the Dart SDK"
This reverts commit 2a93a26d91, which a change to use `defined` so that the GN script does not crash in
Flutter.

Fixes flutter/devtools#9786

See go/moving-devtools-to-dart-sdk-2025.

In this change, we make the source of devtools be configurable, in
actions like build_sdk.

If `build_devtools_from_sources` is true, we build local devtools,
and if false, we continue to use the prebuilt sources.

This may be an intermediate step, while we test out building devtools
from source. Or it may be permanently be a choice, if we keep building
with CIPD.

Change-Id: I9d509b07971942f2c4884224a6efda9001522bd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502120
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-19 20:55:22 -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
Ryan Macnak a8419fb546 [build] Fix building the Debian package on Resolute.
dpkg-buildpackage now wants a timestamp in the changelog.

Also remove --git-revision-file and --git-timestamp-file, which were part of the previous way to build Debian packages.

Change-Id: Idbcf418571889ad7588424e6d8ae6e81ec79942b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504280
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-19 07:18:47 -07:00
Ryan Macnak 6613ac694e [infra] Fix wasted parent machine time on vm-mac-{debug,release}-arm64.
A test shard will run on the parent only if the tests are the last step.

Change-Id: Ib251abe84c631330432b1cdd75897cb0f540a6fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504281
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2026-05-19 07:17:52 -07:00
Ryan Macnak d36adbacaf [vm] Remove the VM isolate.
The former contents of the VM isolate are now included into each isolate group. This makes each isolate group's heap independent, and in particular allows each heap to be allocated to a separate pointer cage (not done in this CL).

The duplicated stubs that allowed PC relative calls are removed, since the originals can now be the target of PC relative calls.

The bootstrapping needing to load an AppJIT or AppAOT snapshot is reduced to allocating the oddballs. The code is entirely dropped in the AOT runtime, but the JIT runtime still has it to allow for flags to affect the compilation of the stub code. Further refactoring might be able to remove this for the JIT runtime too, with only gen_snapshot knowing how to bootstrap.

Class serialization no longer distinguishes predefined classes.

The page containing null is marked as never-evacuate. null, false and true must not move because the compiler relies on their low bits having certain patterns for some optimizations. (Previously, the entire VM isolate heap never moved.)

Compaction is disabled for IA32. Due to register pressure, some stub calls must not use a scratch register and embed the address of Code.

The page containing the call-through-safepoint stub is frozen when running with --write-protect-code and the stub is created at runtime (instead of loaded from an AppJIT or AppAOT snapshot). This stub must remain executable even during a safepoint, as a foreign call might during return during a safepoint and only block after the stub directs it to the runtime.

The snapshot symbols are renamed to kDartSnapshotData and kDartSnapshotText. There is no need to distinguish the VM isolate's snapshot, and snaphots are per isolate group not per isolate. Aliases with the old names are added to ease migration.

Some global flags that were automatically set based on the VM isolate's snapshot are now isolate group flags and automatically set by the isolate group's snapshot.

TEST=ci
Change-Id: Iee82016057d609112e9b021d178fc3d4d18b5044
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500621
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-18 11:35:03 -07:00
Adil Burak Şen a93e065e54 fix: prevent path traversal in sourceMapViewer /file endpoint
Closes https://github.com/dart-lang/sdk/pull/63389

GitOrigin-RevId: 882cfd8dcdbd2d615bd0f7da40d3d83105924fbc
Change-Id: If510820433729765a09c9784f0364bbb52e703c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504020
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-05-18 08:42:05 -07:00
Martin Kustermann 5ae8a02eec [dart2wasm/infra] Add dart2wasm-linux-mac builder to tools/bots/test_matrix.json
The configuration was already added long ago in [0]

[0] https://dart-review.googlesource.com/c/sdk/+/426461

Change-Id: If78a1d40311bda1ed3d2c1325cbc3063685ab9c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-05-18 01:26:32 -07:00
Kallen Tu 8bfb683892 Enable 'primary-constructors' feature flag.
This CL enables the primary constructors feature by default in Dart 3.13.

The primary constructors feature is a brevity feature. There are no new semantics, but it allows us to express declarations in a less verbose way.

This feature allows one constructor and a set of instance variables to be specified in the header of a declaration.

Currently a declaration with a constructor and some fields is written as:

```dart
// Current syntax.
class Point {
  int x;
  int y;
  Point(this.x, this.y);
}
```

With a primary constructor, we would write the above as:

```
class Point(var int x, var int y);
```

If a primary constructor needs an initializer list or a body, they can be
specified inside the class using the `this` body syntax:

```dart
class Point(var int x, var int y) {
  this : assert(x >= 0) {
    print('Point created at $x, $y');
  }
}
```

As part of this feature, you can also use the `new` and `factory` keywords to
declare constructors in the class body without repeating the class name:
```dart
class Point {
  int x, y;

  // Equivalent to Point(this.x, this.y)
  new(this.x, this.y);

  // Equivalent to Point.origin()
  new origin() : x = 0, y = 0;

  // Equivalent to factory Point.clone(Point other)
  factory clone(Point other) => Point(other.x, other.y);
}
```

To learn more about the feature, check out the feature specification located here: https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md

Tested: Has existing language, CFE, analyzer, analysis server tests.
Bug: https://github.com/dart-lang/sdk/issues/61524
Change-Id: I296f2fcd918b87bf2a1dd00256340759866c2423
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489241
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2026-05-04 15:09:49 -07:00
Ryan Macnak 017f2570d9 [test] Add missing FFI tests to the Fuchsia test package.
Change-Id: I333c5d99051e89b64aca9056b7892d245fda0fe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500480
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-04 10:40:32 -07:00
kevmoo a2055fbb82 pkg:api_summary
- Moved existing summary logic to the new package

Change-Id: I47d032f5a253cfa32d9b685d9ff18bb08f534177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499440
Commit-Queue: Vijay Menon <vsm@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2026-05-01 11:29:56 -07:00
kevmoo be63771661 tools/build_and_test_fast: fix an issue with wasm
- Added the required `wasm-opt` target for dart2wasm compiler
- Using diamonds instead of stars to be less obnoxious
- Made emoji lines the same length
- A bit louder about success cases

Change-Id: Iaa9e964d3384f5282721f1e3e5bfca2d2f84e5a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499340
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-04-29 15:34:20 -07:00
kevmoo 548dd73afd OWNERS: remove xooglers
Change-Id: Id4a6cc997c4f891efe1f58f459c67ab312446a43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499321
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2026-04-29 15:28:51 -07:00
Liam Appelbe 2a93a26d91 Revert "Switch on building devtools from source when building the Dart SDK"
This reverts commit d0d8184d1a.

Reason for revert: Doesn't build in Flutter
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8683246937886984145/+/u/gn_--target-dir_ci_host_debug_--runtime-mode_debug_--no-prebuilt-dart-sdk_--build-embedder-examples_--no-lto_--rbe_--no-goma_--rbe-server-address_unix:___b_s_w_ir_x_w_rc_rbebn74b14k_reproxy.sock/stdout

Original change's description:
> Switch on building devtools from source when building the Dart SDK
>
> Fixes https://github.com/flutter/devtools/issues/9786
>
> See go/moving-devtools-to-dart-sdk-2025.
>
> In this change, we make the source of devtools be configurable, in
> actions like build_sdk.
>
> If `build_devtools_from_sources` is true, we build local devtools,
> and if false, we continue to use the prebuilt sources.
>
> This may be an intermediate step, while we test out building devtools
> from source. Or it may be permanently be a choice, if we keep building
> with CIPD.
>
> Change-Id: I7b46d6359c69b34f316e59dccc475e211a18f965
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498640
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

Change-Id: I20381d6bf1d9cba192c46efde99cb57dc75e7cae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499160
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-04-28 18:13:10 -07:00
kevmoo a5d8c88952 [tools] Add build_test_fast.py for a faster edit-compile-test loop
This change introduces `tools/build_test_fast.py`, a developer-focused
wrapper script that automatically infers and builds the *minimal* required
GN targets needed to run a specific test, avoiding the expensive overhead
of building the full SDK (e.g. `create_sdk`) during local iteration.

Features:
- Infers the correct `test.py` compiler (`-c`) from the provided test
  paths (e.g., `tests/web/wasm` -> `dart2wasm`).
- Infers the correct minimal GN targets for the selected compiler.
  For example, DDC tests now only build `ddc_stable_test_local` and
  `create_common_sdk`, taking ~4 seconds instead of 5 minutes.
- Automatically defaults web compilers (`dart2js`, `dart2wasm`, `ddc`)
  to use the `d8` runtime to prevent noisy browser popups during testing,
  unless explicitly overridden.
- Synchronizes the default `mode` between `build.py` (debug) and
  `test.py` (release) to prevent silent snapshot resolution failures.
- Prints clear, copy-pasteable execution commands for both the build
  and test phases.
- Displays a prominent warning if a test fails, reminding the developer
  to verify the minimal target mapping against `tools/bots/test_matrix.json`.
- Adds documentation for the script to `docs/Testing.md`.

Change-Id: I75473cdacca13f78dd271d9a31d5dcb15df57f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499043
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2026-04-28 15:19:09 -07:00
Sam Rawlins d0d8184d1a Switch on building devtools from source when building the Dart SDK
Fixes https://github.com/flutter/devtools/issues/9786

See go/moving-devtools-to-dart-sdk-2025.

In this change, we make the source of devtools be configurable, in
actions like build_sdk.

If `build_devtools_from_sources` is true, we build local devtools,
and if false, we continue to use the prebuilt sources.

This may be an intermediate step, while we test out building devtools
from source. Or it may be permanently be a choice, if we keep building
with CIPD.

Change-Id: I7b46d6359c69b34f316e59dccc475e211a18f965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498640
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-04-27 12:46:37 -07:00
Nate Biggs d43d9df1a7 [dart2wasm] Remove dynamic modules support from the dart2wasm compiler.
Change-Id: If92f55296dfe83b64165a2bd07eaefb7d137198c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497341
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-04-24 12:04:23 -07:00
Sam Rawlins 335ab1588d infra: Use built SDK when analyzing flutter packages
Change-Id: Ie1cae3bd803b1608a4ce70971e8d94c0d19a2daa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498023
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2026-04-24 10:52:37 -07:00
Jessy Yameogo a909051679 [dwds][dwds_test_common] Migrate package to the SDK repository
This CL migrates the `dwds` and `dwds_test_common` packages into the Dart SDK
repository.

Key Changes:
- Monorepo Compliance: Updated the pubspecs to align with the SDK pub workspace setup.
- Excluded `pkg/dwds_test_common/fixtures/` from `package_deps.dart`.
- Updated pkg to status to skip `dwds/test/integration/*` & `dwds_test_common/fixtures/*` until DWDS migration is complete.
- Remove package `build_daemon` from DWDS' `pubspec.yaml` as it's not approved for SDK env.
- Added `@skip_package_deps_validation` to the following files to ignore import checks for package:build_daemon: `server.dart`, `utilities.dart`, `context.dart`.
- Created `pkg/dwds/lib/src/utilities/test_path_utils.dart` to fix path resolution failures in tests (ie. `build_script_test.dart` and `ensure_version_test.dart`).

Testing:
- All tests passing locally.
- CI try bots are green.

Design Doc: http://goto.google.com/migrating-webdev and http://goto.google.com/migrating-dwds

Fixes https://github.com/dart-lang/sdk/issues/62100
Fixes https://github.com/dart-lang/sdk/issues/62101
Fixes https://github.com/dart-lang/sdk/issues/62102
Fixes https://github.com/dart-lang/sdk/issues/62103

Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try,pkg-linux-release-arm64-try,pkg-linux-debug-try

Change-Id: I6130be8b7e0b42fbbf81b26a4950a2c4282e3a48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494660
Commit-Queue: Jessy Yameogo <yjessy@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2026-04-23 13:18:18 -07:00
Sam Rawlins 0abe294f46 Build devtools with a Python script, rather than Dart
I could not get the Dart script to successfully run from GN, and I
also could not find examples of the same. Everything is Python, so
Python it is.

Change-Id: I767aaf42d1584ae331d028ef073a534e5d36b77b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496402
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-04-23 08:57:21 -07:00
Jake Macdonald 1e477f108f Bump ai to 3d3b7fdaddead83ce262377e5c4ce5b2a843066c
Also updates manage_deps.dart to handle trailing slashes.

Changes:
```
> git log --format="%C(auto) %h %s" 07df396..3d3b7fd
 https://dart.googlesource.com/ai.git/+/3d3b7fd Enable roots tools always, collapse under one tool (440)

```

Diff: https://dart.googlesource.com/ai.git/+/f1cddc8e1905b9a5753a93ce451522e564311251..3d3b7fdaddead83ce262377e5c4ce5b2a843066c/
Change-Id: Ia09061667c3e5f8642a45d6fd491143ac80556c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495060
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2026-04-13 16:05:17 -07:00
Sam Rawlins 82bcae5657 [release] Increase version on main to 3.13
Change-Id: Ice6dfd3b694637da4e20529af9374fece32eda4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491821
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-04-08 01:10:34 -07:00
Leon Senft 500c7f6893 Remove myself from OWNERS_WEB
I'm not an owner nor maintainer of anything in this repository.

R=rmacnak@google.com

Change-Id: Ibcb926990ffdbda46617d7f95c1610805f3ad5dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490340
Auto-Submit: Leon Senft <leonsenft@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-03-24 12:24:00 -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
Simon Binder b4cfeb1093 dart2wasm: Prepare standalone target
When compiled to WebAssembly, the Dart SDK needs access to external
host functions to implement regular expressions, stack traces, timers
and more. Currently, `dart2wasm` relies on `js_interop` definition to
implement these functions in JavaScript.

As discussed in https://github.com/dart-lang/sdk/issues/53884, an
alternative is to use `wasm:import` annotations to let an arbitrary
embedder that doesn't necessarily run in a JavaScript context inject
implementations for these host functions.

This would allow running `dart2wasm` apps by e.g.

  - using a runtime like wasmtime and defining host functions in Rust.
  - defining a wrapper module implementing required functions by
    delegating to WASI definitions, and then using say `wasm-merge` to
    run the app in any WASI-compatible runtime.

This prepares the `--standalone` flag on `dart2wasm` to do just that.
When enabled, the compiler uses a different SDK platform to use imports
instead of JS interop. For now, these platforms are almost identical:
I've ported the timer logic to use wasm imports as a demo, but the rest
is still based on existing patch files. We can revisit in subsequent
CLs to incrementally reduce `js_interop` dependencies before removing
that library from the `dart2wasm_standalone` target entirely.

Change-Id: I3f406afbf2dab65506094de5c3f4067f4db66f3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486380
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-03-19 01:25:57 -07:00
Brian Quinlan c7e58f832a [tools] make rev_sdk_deps.dart work with packaged references
third_party/pkg/protobuf (and possibly others) uses a compressed reference file (.git/packed-refs) rather than the .git/refs/heads/(master|main) file expected by rev_sdk_deps.dart.

modify rev_sdk_deps.dart to use "git show-ref --verify refs/remotes/origin/main" instead.

TEST: I ran the script and it produced the expected commit hashes for both a package that uses a "main" default branch and a "master" default branch.

Change-Id: Ibe2ec2cf368d859ca78d1873f287722eb73e481b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488262
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2026-03-16 13:28:10 -07:00
Ben Konyi f7a049dfb4 [ Service ] Initial implementation of VM Service based on package:dart_runtime_service
This change includes an initial implementation of the new VM service
implementation based on `package:dart_runtime_service`, along with the
necessary plumbing to start it in place of the legacy VM service
implementation.

The entrypoint for the new VM service implementation is located in
dart_runtime_service_vm/bin/vm_service_entrypoint.dart, which is
compiled into AppJIT and AOT snapshots when the
`--include-experimental-vm-service` flag is provided to `build.py`. To run
the VM with the new VM service implementation, the
`--experimental-vm-service` flag must be provided.

Currently, the experimental VM service implementation supports:

  - User specified ports
  - Authentication code flags
  - Enabling the HTTP server via SIGQUIT
  - Some service protocol RPCs that don't require an isolate ID (e.g.,
    `getVM`)

See go/dart-runtime-services-unification for more details.

TEST=Manual

CoreLibraryReviewExempt: dart:_vmservice is private
Change-Id: I4a58cd1fa0a386313baa3d5c5345720231279123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484820
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2026-03-10 13:27:01 -07:00
Erik Ernst 05ae94dc91 Support static abstract variables and require initializers
This CL adds a grammar rule to Dart.g and Dart.g4 such that a
variable declaration can be `static abstract`. It also changes the rule
for `static final` and `static const` variable declarations such that
it is a syntax error if they do not have an initializing expression.

This restores the approach which was used before augmentations were
added. It is possible to do this because the added flexibility
would only allow cases which are intended to be an error, because it
is no longer possible to "override" or "extend" an implementation
in an augmenting declaration.

Change-Id: Id7696880a948697678eaf368c69c390b9c8f4e7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485440
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-03-04 04:24:07 -08:00
Erik Ernst 92c362a8b0 Align the specification parser with recent specification changes
This CL aligns Dart.g/Dart.g4 with the feature specs for
augmentations and primary constructors such that they allow for all
kinds of membered declaration bodies to be expressed as `;`.

Change-Id: I61fe4b4fe6541fd0962f8ca39590611827c1d127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483340
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2026-03-04 03:30:23 -08:00
Johnni Winther b5c437b03f [PrimaryConstructors] Set experimentReleasedVersion
This sets the `experimentReleaseVersion` of `primary-constructors` to `3.12.0`. This enables tests, outside the SDK in particular, to reliably pin tests that prepare for the feature to language version 3.12.

Change-Id: I85565b9434c052398be5a7839ce5731d71162416
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482784
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Reviewed-by: Sarah Zakarias <zarah@google.com>
2026-02-27 00:58:37 -08:00
gurusai-voleti 138eaad8cb chore: Migrate gsutil usage to gcloud storage
Closes https://github.com/dart-lang/sdk/pull/62727

GitOrigin-RevId: 05bd7ecca1d5b6a9a0faf97b14ccb7d5966fe949
Change-Id: I3f8c3a3c62cd489864fc6928e6281da0ce465f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482041
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2026-02-23 02:07:01 -08:00