Commit Graph

7806 Commits

Author SHA1 Message Date
Sam Rawlins 35e8b9ba0b analyzer: Deprecate ErrorType in favor of new name, DiagnosticType
Change-Id: I552e816de6d526e3476cac9dd3ee2919fc7ec499
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425720
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2025-04-30 19:07:42 -07:00
Kevin Moore 67a24ea983 [pkg] drop lints already covered by the included lint file
Change-Id: I84fdee27e3e28576187896502e5ffed487ee232f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425408
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2025-04-30 11:58:24 -07:00
Alexander Markov c23ed7aabe [lib/web_gl] Workaround to Flutter license script choking on web_gl_dart2js.dart
Flutter license script (which collects various licenses) processes only
the first N number of bytes.

Unfortunately, https://dart-review.googlesource.com/c/sdk/+/424741
increased size of the header in sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
so copyright notice in the middle of the file was cut in half and
no longer recognized by the Flutter license script.

Issue: https://github.com/flutter/flutter/issues/168065
CoreLibraryReviewExempt: comment change
Change-Id: I694066223b7fd4724c4856ce7875d64e870ab723
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425560
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2025-04-30 09:05:11 -07:00
Robert Nystrom e5194dae87 Reformat tools/ and utils/ using the 3.8 style.
Change-Id: I7b28583eb928f60a45d1f476194d197b4df88062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425184
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2025-04-29 10:40:59 -07:00
Ivan Inozemtsev 10c579c7e8 Revert "watchOS target os"
This reverts commit 7ae1d75869.

Reason for revert: breaks flutter build

Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I4bede9ede04ac3c533b8ff7ae2f1adbd84eb2397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425262
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-29 03:21:37 -07:00
Ivan Inozemtsev 7ae1d75869 watchOS target os
- add support for --os=watchos | --os=watchos_simulator
- do not depend on perfetto if dart_support_perfetto is false
- change the default value for dart_support_perfetto to !is_watchos

To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.

TEST=manual, no watchOS SDK on bots yet.

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-29 02:28:52 -07:00
Michael Thomsen cf717accfb Update deprecation notice for web libraries
Change-Id: I4f6a9619ecf3aba16b215e401aa0fad7d07bd0ac
CoreLibraryReviewExempt: Small tweak to DartDoc only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424741
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2025-04-28 13:24:29 -07:00
Alexander Aprelev 9a31095181 [build] Introduce 'arch' parameter for stress test script.
Fixes https://ci.chromium.org/ui/p/dart/builders/try/iso-stress-linux-arm64-try/4

Change-Id: Iba64548fb3396a3536e3669992d6c778ae9c90cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424700
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-04-25 08:46:28 -07:00
Ryan Macnak 8308d6553c Extend isolate stress testing to ARM64.
Cq-Include-Trybots: luci.dart.try:iso-stress-linux-try
Change-Id: Ie0c2a281a4edc570b6532faadf01f06be259fd18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400144
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-04-23 13:05:53 -07:00
Sam Rawlins 8d62a1f104 Support the analysis server compiled as AOT.
This change adds a build target (see utils/analysis_server/BUILD.gn)
called 'analysis_server_aot'. This new target is _not_ included in the
Dart SDK (the create_sdk target). It's "opt-in" "for development."

The name of the new output file matches that of other snapshots (see
the dartdevc snapshots).

Then we do special work in the plugin manager if "we are AOT." An
analysis server running as AOT cannot spawn Isolates from a dart
source files; we must first compile a dart source file to AOT as well,
then we can spawn an Isolate to that AOT file.

_Then_ when we run pub, we can no longer rely on using
`Platform.executable`. `dartaotruntime pub get` is not a thing. We
must instead find the `dart` tool on disk. To do that, we copy some
complex discovery code from dartdev.

Work towards https://github.com/dart-lang/sdk/issues/53402

Work towards https://github.com/dart-lang/sdk/issues/53576

Work towards https://github.com/dart-lang/sdk/issues/50498

Manually tested:

* [+] analysis_server JIT snapshot works in IDE.
* [+] analysis_server JIT snapshot works in IDE, with a legacy
      plugin (custom_lint).
* [+] analysis_server JIT snapshot works at commandline.
* [+] analysis_server AOT snapshot works in IDE.
* [x] analysis_server AOT snapshot works in IDE, with a legacy
      plugin (custom_lint) - BROKEN. Need similar work that is done
      for new plugins.
* [x] analysis_server AOT snapshot works at commandline - BROKEN.
      I think a fair bit of refactoring is required in dartdev
      lib/src/analysis_server.dart to use `VmInteropHandler.run` or
      similar.

Change-Id: I53173c716fa2a763331ef524a96304f62165810e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417942
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-04-23 11:45:19 -07:00
Vyacheslav Egorov 5f32e78a09 [vm] Fix running under HWASAN
HWASAN tags stack regions (and stack pointers) with 0,
but also selectively tags some stack allocations with
non-zero tags. These tags need to be cleared when
allocation goes out of scope so that stack can be
later safely reused - otherwise stale tags confuse
HWASAN instrumentation later.

This CL teaches Exceptions::JumpToFrame to do that.

CL also adds basic build changes to support building
with HWASAN, though I don't wire it into CI for now
as it can only really run on Android ARM64

TEST=manually on Android phone and on internal tests

Bug: b/374433249
Change-Id: I678443dc1de693c999a226bee0d71a6f3582d4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421180
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
2025-04-14 10:14:54 -07:00
Ivan Inozemtsev 09f467b557 Update prebuilt Dart SDK to 3.9.0-3.0.dev
Revert changes to experimental_features.yaml.

Change-Id: Ic0ee592d8ceb72cf9c450b8bb898e01e93e6dbdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421840
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-10 09:50:11 -07:00
Lasse R.H. Nielsen b2f0b8d083 Accept IPvFuture syntax in Uri.
The RFC 3986 grammar for `[...]` addresses accepts
IPv6 addresses  and IPvFuture addresses, where the latter
have the form `'v' <hexDigit>+ '.' (<unreserved>|<sub-delim>|':')+`.

This allows the IPvFuture syntax, with no interpretation,
as the `host` of a `Uri`.

For now, the `Uri(host: ...)` constructor argument only allows
IPvFuture addresses that are already wrapped in `[...]` brackets,
and the `Uri.host` gette returns IPvFuture addresses including
brackets.
The `Uri(host:...)` still allows unbracketed IPv6 addresses
(distinguished from plain host-names by containing a `:`),
and `Uri.host` returns IPv6 addresses without brackets.
`Uri.parse` only accept IPv6 and IPvFuture in brackets.
(Only IPv6 can have a zone.)

Fixes #60483.

CoreLibraryReviewExempt: Local implementation only, no API.
Bug: https://dartbug.com/60483
Change-Id: Id369ba1316b34f443edfe5b0f56864c32beddccc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421081
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2025-04-09 03:56:37 -07:00
Ivan Inozemtsev 24120c84d0 [release] Bump version on main to 3.9
Change-Id: Id694e90aad9e0ca50e4e09e40c2795f210c60e3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419700
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-04-08 11:16:58 -07:00
Danny Tuppeny 77f0ed1c7a Handle Windows newlines in tools/VERSION when generating package_config
Fixes https://github.com/dart-lang/sdk/issues/60497 which was caused by the parsed values for version numbers having trailing `\r`s.

Change-Id: Icf40727c540c2c5dfea1c18cc91a00acf81ba6b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421222
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-08 09:22:16 -07:00
Sigurd Meldgaard 9e1ae2341b Use tools/VERSION in generate_package_config to resolve repo
Change-Id: Icd47684008e6e8054eef273a0ede624ca006f7c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420702
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2025-04-07 06:44:49 -07:00
Alexander Aprelev e5e9f29115 [build/win] Update vs_toolchain.py with latest chromium.
This syncs up with chromium https://chromium.googlesource.com/chromium/src/build/+/d0ce4a42b5c1c9b6b437fe1e19d94a6a4dbdeedc/vs_toolchain.py

TEST=ci

Change-Id: I42e69c4a82fbf5f8b7a43b13e26dc4de29ec85fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419928
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-04-04 08:58:22 -07:00
Ryan Macnak 4ab313cf09 [vm, test] Enable some AOT testing for Fuchsia.
Fix the standalone embedder's ELF loader to open files with the executable permission.

TEST=ci
Bug: b/399714829
Bug: https://github.com/dart-lang/sdk/issues/60442
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Change-Id: I2652a5849462ce63585550e6c581cc578a228955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419341
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
2025-04-01 09:50:12 -07:00
Lasse R.H. Nielsen a824ee3206 Include or remove stray pubspec.yaml files.
There were `pubspec.yaml` files in `tools/` that were not
included in the global package config.
That means that their imports were irrelevant, which could
be misleading. And if any tool would look at the
`pubspec.yaml` file, it might be inconsistent with
the actual package resolution.

Makes every `pubspec.yaml` file either be included by the
`tools/generate_package_config.dart` script, or deletes them
if they seem to be stale and unused.
(Compare vs. `git ls-files '**/pubspec.yaml'`.)

Excepted `tools/dart2js/sourceMapViewer/pubspec.yaml`.
The entire directory might be stale. The dependencies of
that pubspec are not SDK dependencies otherwise,
the pubspec has no SDK min-version, which is now a requirement,
and the README refers to a *packages directory*.
Keeping as-is and filing issue to have owners take a look.

Added `lib/` directory to `tools/` to avoid `tools/bots/`
being inside the package URI root of the `tools/` package,
which would cause its `../../pkg/...` import to fail.

Makes every `pubspec.yaml` file use a `^...` SDK constraint instead
of the longer `>= ... < ...` format.

Tested: No new tests, goal is to keep running the same way
Change-Id: I688e463fe985fc4de43550a1f4c7ff350536cffc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414020
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-03-31 08:30:33 -07:00
Mayank Patke cc0527decb Remove babel from DEPS and (dart2js) IE support from test infra.
Tested: N/A
Change-Id: Ib1804b49c40cac9be52e732090e8160444ebb48d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417948
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-03-28 11:26:47 -07:00
Mayank Patke 945b031f5e Delete js_platform_hostasserts fileset.
The hostasserts and non-hostasserts filesets do not differ significantly
and can be merged for ease of maintenance. The cost of copying extra
files is small compared to building, and we currently lack the
granularity to see meaningful savings in builds if we keep them separate.

Change-Id: If8e3dd1013f60b05dabb104c632abd7a1638fe1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417947
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2025-03-28 11:26:47 -07:00
Paul Berry 82420ba66c Add experimental feature flag sound-flow-analysis.
All work on https://github.com/dart-lang/language/issues/3100 (Change
flow analysis to assume sound null safety once unsound null safety
support is fully removed) will be guarded by this flag.

Bug: https://github.com/dart-lang/language/issues/3100
Change-Id: I0a6e7b732520ed70944141b4bb02832b7d0d969b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417906
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-03-27 15:19:31 -07:00
Jason Simmons 7533d042bf Specify the base branch when running "flutter_plugin_tools analyze"
flutter_plugin_tools is now querying FETCH_HEAD by default after the changes in https://github.com/flutter/packages/commit/8c287e99d62396402f9a8eb89d9704a5ba6cb8c0

This causes issues for the analyze_flutter_packages.sh script, which creates a clone of the flutter/packages repository that does not have a FETCH_HEAD.

With the --base-branch flag flutter_plugin_tools will instead query the head of the main branch.

Change-Id: I5aa69b80789fdf85497974cf29d25a66166ddc3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418200
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-03-27 02:12:21 -07:00
Ömer Ağacan ce2a048f30 [infra] Update test matrix with dart2wasm --minify tests
Change-Id: I1911eb2bedbff2c6b2b075b8f0ccd6947f08c561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416980
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-24 08:48:04 -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
Ömer Sinan Ağacan bb0184365d [dart2wasm, infra] Add dart2wasm minify test configuration
Change-Id: I4639bcad207b7832c6eb2f77a1751ebb03a84bbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415583
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 02:43:18 -07:00
Ömer Ağacan 2337553259 [infra] Add more documentation on builder names in tools/bots/test_matrix.json
Change-Id: I975ee88145ec59a4579d458f144b7de19fe5e10b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415880
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-17 08:09:30 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard 892ea15ac7 Add missing sample pubspec to workspace
Follow up to https://dart-review.googlesource.com/c/sdk/+/397164

Change-Id: I6c9197bce858cbb7c5af50cf532b0ff1ae7d6311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415580
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2025-03-14 07:53:00 -07:00
Lasse R.H. Nielsen 7fd5108794 Remove .packages from .gitignore files.
The `.packages` file is no longer a special Dart file,
so any existing file lying around is garbage to be cleaned up.
We shouldn't be hiding it.

Change-Id: I269099bd66e392d630d5b23f4617a705a66a0800
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414101
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-03-14 07:08:55 -07:00
Sigurd Meldgaard b9b77058a9 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>
2025-03-14 05:21:40 -07:00
Sigmund Cherem 6f70ffa4ff [dart:html] Disallow extending html elements.
This change removes the `.created` constructor in the html
class hierarchy. These classes now only offer public factory
constructors. As a result, developers will no longer be able
to extend these classes in their libraries.

This is a breaking change, however we don't expect there to
be as much use of this feature (extending html element
classes). In particular, the ability to extend html elements
was intended for web components.  Dart only ever supported
the 0.5 spec of web components, which is old and long
deprecated.  Previously, in Dart 3.0, we removed APIs used
to register custom elements from `dart:html`, so the ability
to extend html elements has not been useful since then.

For more details see https://github.com/dart-lang/sdk/issues/53264

CoreLibraryReviewExempt: ddc/dart2js-specific library.
Change-Id: I43d8c9ae99dc83545e70e1f3b9dfc9f1b274a5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321741
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2025-03-11 13:25:58 -07:00
Kenzie Davisson d9bb808663 Add a tools script to build a local Dart SDK and copy the output to a local Flutter SDK.
This script is helpful for testing local Dart SDK changes against a
Flutter project. This CL also adds instructions to the analysis_server
CONTRIBUTING guide.

The help output of the script looks like this:

> dart tools/copy_dart_to_flutter.dart -h
-a, --arch Specify your machine's architecture.
                                                     [ARM64 (default), X64]
    --[no-]build-sdk                                 Whether to build the Dart SDK as part of running this script. Negate with --no-build-sdk if you have already built the Dart SDK locally and want to skip this step.
                                                     (defaults to on)
-d, --local-dart=</Users/me/path/to/dart-sdk/sdk> Path to your local
Dart SDK directory. If unspecified, this value will default to the value
of the LOCAL_DART_SDK environment variable.
-f, --local-flutter=</Users/me/path/to/flutter> Path to your local Flutter
SDK directory. If unspecified, this value will default to the value of
the LOCAL_FLUTTER_SDK environment variable. -v, --verbose Run the script
with verbose output, which will forward the stdout and stderr of all
sub-processes. -h, --help Show the program usage.

Additional commands
    --reset                                          Reset your local Flutter SDK cache to undo the effects of running this script.

Change-Id: Ie34bf169838c3b0ac366cd02817324352b9234be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408481
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2025-03-10 15:32:29 -07:00
Nicholas Shahan 03293b52f5 [dart2js/ddc] Cleanup sound flag from benchmark test
Updates test to match the updates to the actual invocations on golem:
https://chrome-internal-review.googlesource.com/c/golem/+/8082532
https://chrome-internal-review.googlesource.com/c/golem/+/8082531

Change-Id: I171560f42c70bf59568d6c96325899be2eceb754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386082
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-03-07 15:10:02 -08:00
Nate Biggs d5f82b7054 [dart2wasm] Add dynamic module tests to dart2wasm test builders.
3 failing tests have been approved.

Change-Id: Ia38cbce99e739f2ce67d0d60236b3006635837ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414163
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-03-07 09:52:01 -08:00
Nate Biggs e03657855c [dart2js] Remove old unused dart2js tools.
These files haven't been touched in years and, based on my queries, no one is using them.

Bug: https://github.com/dart-lang/sdk/issues/60263
Change-Id: Ie23597bfc9aa624ff63645660aded6c483cfbfc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414160
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-03-06 14:46:16 -08:00
Alexander Thomas ae5a55bca0 [infra] Remove CFE weak testing steps
Change-Id: I17194ecd70dbed796de6a867655631e8d40cf91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413780
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-03-06 01:04:40 -08:00
Johnni Winther 0060b0f665 [cfe] Remove nnbd mode
TEST=existing

Change-Id: I30bbadb74e81c7f4aaa444d1e2f6f5ffc2005d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412881
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-03-04 01:46:51 -08:00
Devon Carew 4f4f867375 [deps] rev package:lints; address 'unnecessary_underscores' lints
Change-Id: I866bf007f50eafcc3c2e61d49895a0244c14eff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412760
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-02-27 11:44:45 -08:00
Chloe Stefantsova c5af227b8c Remove 'expired' property from 'null-aware-elements' flag
The property was erroneously set in
https://dart-review.googlesource.com/c/sdk/+/412301, and is
removed in this CL.

Change-Id: I1199a2c8e2f0613252a93deb5f2242aac84cf38b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412663
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-02-27 10:31:13 -08:00
Chloe Stefantsova 79f3c70f8a Enable 'null-aware-elements' flag in 3.8
TEST=existing

Change-Id: Ie87f56627a0cf31acc5996d7fa8e55655adda151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412301
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2025-02-27 06:00:42 -08:00
Sigurd Meldgaard a9ab52bcbb Language version bumps for publish_to: none pkgs
Also a separate pubspec for the tools/ folder

Extracted from https://dart-review.googlesource.com/c/sdk/+/397164

Change-Id: If49a6ede07e4864d0c0fcb210c04c18c804849df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412041
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-02-27 00:48:40 -08:00
Martin Kustermann 20fc102287 [dart2wasm] Switch to only using JS strings
Currently we have 3 different string types (JS Strings, OneByteString
and TwoByteString)s. There's some advantages to this, mainly that
if strings are used purely inside Dart we have more control over
optimizing them. But it does come with some issues

* Operations on mixture of strings are slow
* We get JS strings from outside (in DevTools e.g. websocket messages)
* Any kind of DOM interaction requires copying strings
* Regular expression matches can result in O(N*N) instead of O(N)
* Encoding of string literals/constants is terrible, high size overhead
* ...

Now that there's a standardized way to access JS strings (via
the `js-string` builtin spec) and this standard is finalized and
enabled in Chrome & Firefox it makes sense for us to switch to it.

It reduces app size:

* Smaller size: hello world -25%, flute -5.5%
* Faster startup

The performance changes are nuanced, some workloads will improve
significantly, some workloads will regress.

Improvements will come especially in cases where
strings are concatenated (due to JS not actually allocating new
strings in this case). That impacts e.g. string interpolations,
string buffer, json-to-string encoding, ...

Regressions will come especially for cases where we have to
construct strings from bytes (e.g. in utf8 decoder, utf8+json
decoder) - mainly due to having to go through an intermediary
`WasmArray<WasmI16>` to allocate strings. Also in cases where we
access individual char codes from the strings.

There's some follow-up improvements we can do, but it's better to
not iterate on this CL even longer but get it landed.

This CL will make the benchmarking system use
`--require-js-string-builtin` as well as most of test CI
(in `pkg/dart2wasm/tool/compile_benchmark`)

Though we run some configurations via overriding with
`--no-require-js-string-builtin`
(in `tools/bots/test_matrix.json`)

Issue https://github.com/flutter/flutter/issues/159400#issuecomment-2538593980
Issue https://github.com/dart-lang/sdk/issues/59699

TEST=ci

Change-Id: I238ac65efe092de569da870f23134f889ac929f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392903
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-02-27 00:33:34 -08:00
Mayank Patke 0c55c7e573 Remove unsound web configurations from test matrix.
This CL also removes references to unsound .dill files from the test
matrix and other build scripts and disables some of the option handling
that would lead to requiring unsound .dill files.

Change-Id: I89f701f8f5e1168bf974b5b44bfbafd5a39954fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412401
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-02-26 15:57:55 -08:00
Ryan Macnak 690b380a6a [infra] Add configuration for testing SIMARM64 on ARM64.
Bug: https://github.com/dart-lang/sdk/issues/60204
Change-Id: Id49d144bedb7eb2047ee1cc36dd737bff62e808e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411840
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-02-25 13:22:17 -08:00
Paul Berry a864586f3c Remove OWNERS file for the CFE team.
The code that was previously owned by the CFE team (OWNERS_CFE) is now
owned by the Dart Model team (OWNERS_MODEL). Accordingly, we don't
need OWNERS_CFE anymore.

Change-Id: I1ede4fbf5a0d29c5d328cc870c75c8a5ec7f217c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-19 09:33:31 -08:00
Lasse R.H. Nielsen f4cadd5a5a Retired inference-using-bounds and wildcard-variables experiments.
Change-Id: I5dcc0c7d2b148eb88e6382118d6fc8ee4c9a9489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407022
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2025-02-19 05:25:10 -08:00
Paul Berry a0b38184e2 Remove OWNERS file for the analyzer team.
The code that was previously owned by the analyzer team
(OWNERS_ANALYZER) is now owned by either the Dart Model team
(OWNERS_MODEL) or the developer experience team
(OWNERS_DEVELOPER_EXPERIENCE). Accordingly, we don't need
OWNERS_ANALYZER anymore.

Change-Id: I9a4d2e2462a15ba9ec8f3046cdca77ba9d3af13c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410564
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-18 12:24:57 -08:00
Paul Berry ca2d428f99 Add an OWNERS file for the new Dart Model team
Moving forward, the Dart Model team will own the following packages:
- _fe_analyzer_shared
- analyzer
- analyzer_cli
- analyzer_utilities
- front_end
- frontend_server
- kernel
- testing

In follow-up CLs I will create an OWNERS file for the developer
experience team, and then remove the OWNERS files for the old analyzer
and CFE teams.

Change-Id: Id7cf38ea41a6d3f9ca44f43fae1f310426a31e29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409841
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-02-14 15:51:17 -08:00
Paul Berry d960dcd43c Add an OWNERS file for the Developer Experience team
Moving forward, the Developer Experience team will own the following
packages:
- analysis_server
- analysis_server_client
- analysis_server_plugin
- analyzer_plugin
- language_server_protocol
- linter
- meta
- server_plugin
- telemetry

In follow-up CLs I will create an OWNERS file for the Dart Model team,
and then remove the OWNERS files for the old analyzer and CFE teams.

Change-Id: Icc52ca75e92baf9d05de211e9e3f6c36fb19b71e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409860
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2025-02-14 15:29:40 -08:00