Commit graph

7446 commits

Author SHA1 Message Date
Jonas Termansen 495d08eca8 [infra] Disable goma by default in favor of RBE.
Bug: b/296994239
Change-Id: I99e1dcfb1016cbb064a742d8cc930f3468d26f3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358161
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-03-22 10:09:06 +00:00
Jake Macdonald 25071fc448 revert dart:_macros, going with SDK vendored package
Change-Id: Iaaf80a44cdbd073b01132d04c0426e8acc28341f
Tested: Revert only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358501
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-03-21 02:40:58 +00:00
Erik Ernst 50ff1c7823 Introduce support for augmentation libraries in Dart.g
Change-Id: Icc4b89f1b25dd633279d87e9d51f85372d962c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358450
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-20 17:10:53 +00:00
Erik Ernst 20f197dacd Include the most recent updates on type modifiers in Dart.g
The class modifiers feature specification was updated such that mixins
cannot be `sealed`, and several other combinations were eliminated.
This CL makes those changes to Dart.g. The changes have been in effect
for a while (8 months since last update to the spec), but the update
to Dart.g was somehow not performed at the time. This CL fixes that
omission.

Change-Id: Ifd2124583a124cdaaa7822f94f70e707ec33b425
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358460
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-03-19 11:44:03 +00:00
Sam Rawlins 3a650f40a8 analysis_server: Introduce analysis_server_shared package
With a simple move of two classes, Fix and FixContent.

The class moves are not exactly no-ops. I moved each class into its
own library and made the following changes:

* Start doc comments with third person verbs [1].
* Make `Fix` class **final**.
* Make `FixContext` class **interface**.

[1]: https://dart.dev/effective-dart/documentation#prefer-starting-function-or-method-comments-with-third-person-verbs

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

Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Change-Id: Ic046b236d634543832825db8746e0abdca5191fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355889
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-18 20:54:49 +00:00
Konstantin Shcheglov 252abbae52 Update tools/package_deps to stop at a line with Future with type argument.
Should fix failures in https://dart-review.googlesource.com/c/sdk/+/358222

Change-Id: I1c5d63e90e26e11d083be2327a22f6c5617b6670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2024-03-18 20:13:08 +00:00
asiva 88bb72f47f [VM] - Remove redundant invocation of VM benchmarks with --sound-null-safety flag.
The VM is by default sound null safe and so it is not necessary to run
the benchmark again with --sound-null-safety flag.

Corresponding changes have been made to the actual benchmark suite.

TEST=ci

Change-Id: Id844da0e0c2e7b6b411a2fcecfdc3d1ec2232c35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357220
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-03-18 15:47:19 +00:00
Jason Simmons 5ed896c9ae Use an escape sequence for space characters in depfiles generated by the copy_tree script
Change-Id: I60473b9729b310bd3909c98607ccb708c52dac15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357500
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2024-03-14 15:45:55 +00:00
Ryan Macnak 963448ff2f [infra] Remove legacy VM configurations.
Change-Id: Ib360b96e3c21a337ebbf3a69113f07c73791c50f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357213
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-03-14 15:40:29 +00:00
Paul Berry fb210554eb Enable feature inference-update-3.
In discussion with the language team, we've decided to ship this
feature in Dart 3.4. This CL contains a minimal CHANGELOG entry for
the feature; I plan to expand on it once I'm finished with the feature
specification document.

Change-Id: Iac86ebed322feb8e478bf5a6780d50adb433ed7f
Tested: trybots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355900
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-03-13 22:04:23 +00:00
Zach Anderson 03101837d9 [gn] Deprecate copy_trees()
Part of https://github.com/flutter/flutter/issues/144430

This is a reland of https://dart-review.googlesource.com/c/sdk/+/356481 with the addition of dependencies to prevent races on directory creation.

Previously, this code did backflips to accomplish two goals
1. Collect the paths of all files that would be copied from one place to another after applying regex filters so that they could be listed as the "inputs" to a GN action.
2. Arrange so that the python script doing the above would only be invoked once during GN to reduce the cost of calling out to python.

However, this is exactly the use-case for the "depfile" parameter to a GN action. Instead of running the script during GN to populate the "inputs" list, when we run the copy_tree.py script, we can instead ask it to generate a depfile to collect all the input files that were actually copied after applying the regex filter. Using that, we don't have to run the python script at all during GN.

TEST=it builds

Change-Id: I593e2500544a9fff5dd9852d0d3370f97aafc464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356620
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2024-03-09 04:14:39 +00:00
Zach Anderson 939ae55c00 Revert "[gn] Deprecate copy_trees()"
This reverts commit f60d32167f.

Reason for revert: build failures in post submit

Original change's description:
> [gn] Deprecate copy_trees()
>
> Part of https://github.com/flutter/flutter/issues/144430
>
> Previously, this code did backflips to accomplish two goals
> 1. Collect the paths of all files that would be copied from one place to another after applying regex filters so that they could be listed as the "inputs" to a GN action.
> 2. Arrange so that the python script doing the above would only be invoked once during GN to reduce the cost of calling out to python.
>
> However, this is exactly the use-case for the "depfile" parameter to a GN action. Instead of running the script during GN to populate the "inputs" list, when we run the copy_tree.py script, we can instead ask it to generate a depfile to collect all the input files that were actually copied after applying the regex filter. Using that, we don't have to run the python script at all during GN.
>
> TEST=it builds
>
> Change-Id: I41a251ce4659119cdc3997bb2d6fc7ee0831bb6d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356481
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>

Change-Id: Ie4409ed93a3c990fbce375dba1f2d9a3c735ea3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356308
Auto-Submit: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Zach Anderson <zra@google.com>
2024-03-08 20:59:53 +00:00
Zach Anderson f60d32167f [gn] Deprecate copy_trees()
Part of https://github.com/flutter/flutter/issues/144430

Previously, this code did backflips to accomplish two goals
1. Collect the paths of all files that would be copied from one place to another after applying regex filters so that they could be listed as the "inputs" to a GN action.
2. Arrange so that the python script doing the above would only be invoked once during GN to reduce the cost of calling out to python.

However, this is exactly the use-case for the "depfile" parameter to a GN action. Instead of running the script during GN to populate the "inputs" list, when we run the copy_tree.py script, we can instead ask it to generate a depfile to collect all the input files that were actually copied after applying the regex filter. Using that, we don't have to run the python script at all during GN.

TEST=it builds

Change-Id: I41a251ce4659119cdc3997bb2d6fc7ee0831bb6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356481
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-03-08 20:47:47 +00:00
Oleh Prypin fc5f82c244 [tool] Use new builder name syntax for tools/find_builders.dart
See mentions of migrating from legacy syntax from back when it was ongoing: https://g-issues.chromium.org/issues/40170614#comment36

Change-Id: If592c5bcf40b2e56f9b18fcf27f74d767f97375a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356041
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2024-03-06 15:49:54 +00:00
Daco Harkes 86c41c9c77 [tool] tools/find_builders.dart cbuild opt in
Opt in to CBuild being green.

Remove denylisted bots now that issue is resolved.

Change-Id: I89c23720eaed78b317067bbdb065fe0cef8ecd75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356022
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-06 14:03:19 +00:00
David Morgan c2004efd47 [macros] Add macro build tests.
These are a new type of test that runs with the SDK under test against what
looks like an external package; they start by running "pub get" then run SDK
build commands to build the package, and check that macros applied correctly.

Add tests for various builds that already pass, plus one that doesn't:
cfe_sdk_cli_test fails because it was switched to run from an AOT snapshot
and that doesn't support macros yet.

Change-Id: Ic801cb61bd414d4876566452e01dd8c8203e9013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353100
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-06 12:31:37 +00:00
Jonas Termansen 6d69d56307 [infra] Turn off Goma by Windows by default.
Fix the case where both Goma and RB is turned on together and conflicts.

Bug: b/296994239
Change-Id: If37fe35dc3d8f025c22a041545cfe0b50cea4be5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355761
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-05 14:31:59 +00:00
Jonas Termansen c0e089af45 [infra] Fix environment during RBE shutdown.
Bug: b/296994239
Change-Id: Id7545ef44a28ebb3c1439c1f980fa95978be1412
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355780
Reviewed-by: William Hesse <whesse@google.com>
2024-03-05 13:47:17 +00:00
Jonas Termansen a27993d7c9 [infra] Fix not initializing RBE before gn.
Bug: b/296994239
Change-Id: I344f07fa7f389fa5b0f5e65b24168f2d05daacbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355683
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-03-05 13:22:39 +00:00
Lasse R.H. Nielsen 9d933d1281 Retire 3.3 experiments in the 3.4 release.
Tested: No new tests.
Change-Id: Idf19ce8b6743b221841e6cef6b2a80e8ab37860e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354260
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-03-04 16:09:31 +00:00
Jonas Termansen 3f1d6a99e7 [infra] Simplify RBE configuration and allow concurrent builds.
Automatically detect the appropriate configuration file if RBE=1 is
set to request RBE on all projects, or if DART_RBE=1 is set to request
RBE for Dart only, or otherwise respect the explicit configuration file.

Automatically set the server_address location to the build directory
if it has not already been set. This is unfortunately not supported on
Windows due to the environment variable being set during build but it
needed to be set during gn.

Retain the older configuration files during the transitory period.

Bug: b/296994239
Fixes: b/320876546
Change-Id: I62d1fbfed35248477731cceda3f7267c605c4969
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355400
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-04 14:54:26 +00:00
Ryan Macnak 1b37593170 Update sysroot paths used during Debian package building.
Also, riscv64 now works with Clang.

Change-Id: I26ba91994f8769d63ba5af6662b31f5cdd007394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354062
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-29 17:38:24 +00:00
Alexander Thomas e91957b2d5 [dartdoc] Add header and footer options to dartdoc options
Bug: b/323126451
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try
Change-Id: Iedc6a4d282da3beae7bdcf522c4ae0bab8644a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354886
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-29 12:49:50 +00:00
Jonas Termansen a19d3f3375 [infra] Support testing with RBE on Windows.
Place the windows toolchain in the build root so it can be sent to RBE.

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

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

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

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

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

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

Bug: b/296994239
Change-Id: I2bd1b4478fca796f0a326c062a5f478f16c2c6ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343440
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-29 10:33:09 +00:00
Martin Kustermann c28f91401c [dart2wasm] Update timeout value for dart2wasm tests from 4 min to 1 min
Change-Id: I71bf1c9a6e6a2a0903359b4883f649cd33936e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354026
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-02-26 13:57:19 +00:00
Jonas Termansen fe202e60c3 [infra] Recognize c.googlers.com.
Change-Id: Ibec8a8dbe627b57253aaa0ec4a91f1c408fe282a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354240
Commit-Queue: Jonas Termansen <sortie@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2024-02-26 10:43:23 +00:00
Sergey G. Grekhov 3b52517bca [test] Add support of dart2wasm.status in co19 tests
Fixes: #54971

Change-Id: I033c8ba78e6cdcf26dce9cae8998308a595a37e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353262
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-21 14:03:23 +00:00
Martin Kustermann c4fbfc9271 [vm] Make iso-stress builder use valid -Dtest_configuration when compiling the giant stress test
Some tests that are run as part of the giant iso-stress test are relying
on `package:expect/config.config` getters, which in return rely on the
test configuration being set as part of the compilation from the app

=> We pass valid JIT & AOT configurations when compiling the giant iso
   stress test files.

TEST=May fix the iso-stress failures.

Change-Id: Icacbfe941eb01030c010670f35848a76c9a8ee12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353102
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-20 09:39:00 +00:00
Alexander Thomas 2c11ad08bb [dartdoc] Modernize header and footer
Change-Id: I842b8d96fc0ab005990a15b74e001990a7710633
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352864
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-16 12:16:32 +00:00
Ryan Macnak 9f7dbd6b4d Roll Fuchsia SDK to 18.20240208.2.1.
Sync build setup from Flutter.

Change-Id: Ic7958dc42a79b7d2acd3f5279f816333ca31299e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351242
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-02-12 18:18:01 +00:00
Parker Lougheed 78dbc184b1 [sdk/js_interop] Clean up and add a few minimal API docs
CoreLibraryReviewExempt: Only touches JS core library documentation.
Change-Id: I7d7f0a2b646f95de8340e9e77d8207cd99c9a1b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351940
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-02-12 14:44:54 +00:00
Sigmund Cherem 5941ee7560 [dart:html] minor fix to clearWatch.
This is a fix to not include a null assert when it's
possible the value was null.

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

CoreLibraryReviewExempt: bug fix only affecting html library implementation
Change-Id: I26e6ebf3dc2d1ea3f9f458a32f519c5235e6d273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350982
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2024-02-08 23:23:20 +00:00
Nicholas Shahan 0dbeb2135e [test_runner] Rename host-checked to host-asserts
Cleanup this old naming scheme before adding new configs for DDC
that run with assertions enabled in the host compiler.

Change-Id: Icbdee694fac46b3a1d5bab7ee7411c8e9be8c4a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335385
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-02-08 22:01:09 +00:00
Alexander Aprelev 6ab194a95b [build] Update Windows SDK to 10.0.22621.0.
Sync setup_toolchain.py, vs_toolchain.py, find_depot_tools.py with chromium tot 2a6e67243533df4913d06814019b99a8b3ea385b

BUG=https://github.com/dart-lang/sdk/issues/54630

Change-Id: I42f79900951f228d8c9711fee3cab7db22f96e19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350655
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-02-08 16:06:50 +00:00
Paul Berry 3edc0b0e61 Repurpose inference-update-3 experiment for language issue 1618.
After discussion with Leaf, I believe the primary use case that
`interface-update-3` was intended to address can be better addressed
through the proposal of language issue
https://github.com/dart-lang/language/issues/1618 (instead of
https://github.com/dart-lang/language/issues/3471, which I had been
working on previously).

Since I had not made a lot of progress on
https://github.com/dart-lang/language/issues/3471, rather than set up
a brand new experiment flag, it seems better to simply back out the
work that I'd previously done, and repurpose the `inference-update-3`
flag to work on issue 1618.

Change-Id: I6ee1cb29f722f8e1f0710cbd0600cb87b8fd26a1
Bug: https://github.com/dart-lang/language/issues/1618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350620
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-07 13:06:30 +00:00
Modestas Valauskas e8b20f66b2 Add DSP.
Closes https://github.com/dart-lang/sdk/pull/54781

GitOrigin-RevId: 10439cd7c0da0bc3803cd6f2cfc3133ddb75f087
Change-Id: I6e569b65509dd333daf5c3bb515709f0be03fa89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349408
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2024-02-06 19:07:13 +00:00
Johnni Winther fe52b9bfe5 [macros] Add dart:_macros
This adds the dart:_macros library to the SDK and adds support for accessing dart:_macros from package:macros. The library is not used yet.

This change is needed as a prestep to adding the package:macros and using it in the CFE and analyzer, and needs to be rolled in as the checked in sdk before package:macros can be supported.

TEST=ci

Change-Id: Ife3ffd48527e3a196048d2ddf7387b8b7818f3a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348680
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-02 07:47:59 +00:00
Alexander Thomas 6c7b3671c2 [dartdoc] Adjust footer to match other Dart sites
Fixes: b/323126451
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try
Change-Id: I6819063fbb02b1b77b3959b96ab3964eb2aaf974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349500
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2024-02-01 16:19:57 +00:00
Daco Harkes fe39068928 [tool] Delete unsupported patches system
The old patches system in tools/patches is not supported in the 3H
infra.

Currently, Golem still uses the DEPS updating logic. This should be
deleted when Golem also moves over to the 3H infra.

Change-Id: Id42d8499a0fa42d18061908e9d1a18b687582ba7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349640
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-02-01 12:02:08 +00:00
Daco Harkes 3105c841d4 [tool] find_builders skip flaky builders
Bug: https://github.com/dart-lang/sdk/issues/51170
Change-Id: I5fbc97838b78f8efdab3a16c907976afaac43d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349660
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-02-01 11:20:47 +00:00
Martin Kustermann 148d5ac76d [dart2wasm] Add dart2wasm-linux-optimized-jsc builder (to existing configuration with same name)
Change-Id: I9b70605e52a06c3d7d3ce2d64b6dcad0e61f3074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348601
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-01-28 18:15:40 +00:00
Devon Carew e2aac0b8e8 [web docs] add package:web to the main sdk docs - api.dart.dev
Change-Id: I858db7090563cc7366d22f191b7cd3cf49047d5e
CoreLibraryReviewExempt: doc only change to the web libraries
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348182
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2024-01-26 15:54:59 +00:00
Martin Kustermann 9e5c97dd4e [dart2wasm] Make dart2wasm bots use -O0 / -O1
We also temporarily make -O3 behave as --omit-type-checks (the current
golem behavior)

We can then make golem use -O3 and then make a Dart SDK CL that
reverts this change so we see the impact of e.g. --minify as change on
golem attributed to Dart SDK commit.

Change-Id: Ic74688de609e7ed720b1493a4236552963c53c2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348320
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-01-25 12:55:37 +00:00
Devon Carew 335a9b0c68 [docs] update the messaging for dart:html and related libraries
Change-Id: Idca54c94a583d688e3f2470f1e062e9f44f0d131
CoreLibraryReviewExempt: doc only change to the web libraries
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347387
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-01-22 21:28:02 +00:00
Graciliano Monteiro Passos 5d18799eae HTMLSelectElement: fix selectedOptions when selectedIndex < 0
Closes https://github.com/dart-lang/sdk/pull/54618

Also adds a comment to go.sh mentioning vpython3 comes with
depot_tools.

GitOrigin-RevId: 5e057703067c24d9d41bac75b6251c8f3a2fddd3
Change-Id: I937d8618c24602b4c0844d8a52ff00095836bca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-01-22 20:15:26 +00:00
Parker Lougheed 46853586f1 [infra] Remove Flutter gallery test from flutter-analyze-try
The Flutter gallery repository was archived and retired on 2024-01-18, so it can't be updated for the new deprecations that are causing flutter-analyze-try to fail (https://ci.chromium.org/ui/p/dart/builders/try/flutter-analyze-try/20737/overview).

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try
Change-Id: Iedba5a03baaaa1e2180335e14ef93b6dc5065f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347480
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-01-22 13:16:59 +00:00
Martin Kustermann 3a314331a7 [dart2wasm] Add support for testing dart2wasm with JSC
JSC only supports `print()` but not `console.log()`.

=> The changes to `printToConsole()` are therefore extended
to check for `console.log()` as well as `print()`.
=> This is extending it to a broader subset of dart2js's print

Change-Id: I7efa697477aa60e473d01716b104fc1526035c67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347283
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-01-22 12:04:37 +00:00
Martin Kustermann 1fc755eb54 [dart2wasm] Remove sdk/bin/dart2wasm{,_developer} scripts
We already have a shell script that compiles dart code to wasm and
optimizes it. I think it's rather confusing to have multiple, they
contain somewhat duplicated code as well.

We therefore remove `sdk/bin/dart2wasm{,_developer}` (which is
not used by any CI but purely for developers) in favor of
`pkg/dart2wasm/tool/compile_benchmark`.

=> It support with/without binaryen
=> It support measuring size/time/memory of dart2was & binaryen
=> It supports running compiler with assertions

Some flags/vars are not supported anymore:

* `DART_VM_OPTIONS`: Has no effect (as there's no need to support this)
* `sdk/bin/dart2wasm_developer`: Pass `--compiler-asserts` to `compile_benchmark`.
* `-O`: Optimizes now by-default, pass `--no-binaryen` to `compile_benchmark` to disable
* `-O`: Doesn't implicitly pass `--inlining-limit=10`

Change-Id: Ice656d1bfc216a536522b254e2d52bd4cad73e8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347040
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-01-19 16:05:27 +00:00
Tess Strickland fd1ac98359 [tools] Pass through offsets extractor arguments to tools/build.py.
Allows the builds to be run with non-default arguments, for example:

dart tools/run_offsets_extractor.dart --no-rbe

Change-Id: I1299b156a40baab27db890c0b0ae5f2f945c4259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346361
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-01-15 15:36:17 +00:00
Devon Carew a246fbb9cb [docs] update dart:html template files
Change-Id: I6084ba14a903945372b67f5e066ed6ed7d4e2969
CoreLibraryReviewExempt: doc only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345741
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-01-12 18:17:13 +00:00
Alexander Thomas a100968232 [python3.12] Fix syntax warnings in utils.py scripts
Bug: https://github.com/dart-lang/sdk/issues/54306
Change-Id: I3abfac0765721246b59451152d322a111d685644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346022
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2024-01-12 16:38:51 +00:00
Kate Lovett 78e5a3dd92 Revert "Update analyze_flutter_flutter.sh"
This reverts commit 28e0ae59ec.

Reason for revert: There is a typo and the script is failing.

Original change's description:
> Update analyze_flutter_flutter.sh
>
> Closes https://github.com/dart-lang/sdk/pull/54576
>
> GitOrigin-RevId: bd0e192a78ac908ee6e47fccd33f1f5651adb259
> Change-Id: I14f1d25d059e618674d73a27dcf5054aff40fe2b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345584
> Commit-Queue: Slava Egorov <vegorov@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>

Change-Id: I38aba29de70a7bb81444e937644d18645b1a74ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345740
Reviewed-by: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Kate Lovett <katelovett@google.com>
2024-01-11 18:32:28 +00:00
Devon Carew 8379b85eab [docs] move several older dart: web libraries into a 'legacy' category
Change-Id: Ie4c3413191c14976f85614fab11ee94830a25aab
CoreLibraryReviewExempt: documentation only change in the web libraries
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345566
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-01-11 18:18:59 +00:00
Kate Lovett 28e0ae59ec Update analyze_flutter_flutter.sh
Closes https://github.com/dart-lang/sdk/pull/54576

GitOrigin-RevId: bd0e192a78ac908ee6e47fccd33f1f5651adb259
Change-Id: I14f1d25d059e618674d73a27dcf5054aff40fe2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345584
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-01-11 13:43:46 +00:00
Jonas Termansen 5678fd48cd [infra] Generalize RBE across operating systems.
Bug: b/296994239
Change-Id: Ie8630bcece5c2f62c5693afe654fb9d6367b33e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345286
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-01-10 11:38:43 +00:00
Jonas Termansen 1253413b71 [infra] Disable Goma by default on Linux.
Developers that are not ready to migrate can use --use-goma to enable it
themselves if RBE is not meeting their needs. I omitted advertising that
long-existing option in the message since it literally takes five
minutes to migrate to RBE and so far it has had feature parity on Linux.

Bug: b/296994239
Change-Id: I026cd38e644f15da2a0cc641d461a5476de5786e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342360
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-01-09 11:44:28 +00:00
Jonas Termansen 1ccaa12af2 Update checked in SDK to 3.2.4.
The stable channel now has builds for all the platforms as there are no
longer any unstable platforms. Let's see if it works since there's no
reason to bump to a 3.3 dev since nobody has needed it yet.

Change-Id: If32e18aa3d26b12b8b7c24d0d36158a922174354
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345284
Commit-Queue: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
2024-01-09 10:42:53 +00:00
Parker Lougheed 3fa9f798ab [tools/deps] Adjust commit messages to link to correct repositories
Prevents auto-linking to incorrect issue when the tool's output is committed. Do this by removing the hash from `#number` in the commit message, and replacing the PR link at the of the message with a fully qualified reference that resolves to the correct repository on GitHub.

An example of the new output:

```
yaml (98a3aab..509fd72):
  509fd72  Mon Dec 11 16:37:13 2023 -0800  Kevin Moore  update lints, require Dart 3.0 (dart-lang/yaml#156)

yaml_edit (9b9d33c..47eb20e):
  47eb20e  Mon Jan 1 13:13:22 2024 +0000  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (dart-lang/yaml_edit#63)
  a39ec39  Wed Dec 20 11:51:28 2023 -0800  Kevin Moore  blast_repo fixes (dart-lang/yaml_edit#62)
```

Closes https://github.com/dart-lang/sdk/issues/53857

Change-Id: I23e9d556c69445189a916ce33091a9c77ae15941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344361
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2024-01-09 01:29:48 +00:00
Ryan Macnak 49aef32322 [infra] Add configuration for vm-aot-win-debug-x64.
Bug: https://github.com/dart-lang/sdk/issues/54206
Change-Id: I8d4f2e9cc1aebd747cf35e63dc72c4bf9aa80297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340060
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-01-08 23:26:19 +00:00
Jonas Termansen 8158275a94 Bump version to 3.4.
Do not revert: The main channel version must be upgraded now that the
version 3.3 beta has been cut and reverting this change puts the
release infrastructure into an unsupported state. Please fix forward
any potential problems that occur downstream and loop me into the
discussions so we can improve the release procedures in the future.

Change-Id: I8706c3d74fe0474d34a99c5cbbb8e9a88b586cdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329902
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-01-04 16:15:09 +00:00
Parker Lougheed 7a01b5f413 [tools/deps] Remove special casing for unused platform package
The dependency on package:platform was removed in https://dart-review.googlesource.com/c/sdk/+/245262 and the repository has moved as well.

Change-Id: I228032f497de5bdfb2ff67d8f532bc66d7a1a34a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343840
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-01-02 20:01:45 +00:00
Jonas Termansen 669060f8c7 [build] Omit SDK and Git hashes on RBE.
Bug: b/296994239
Change-Id: I70c10fddc3bd01fef5ed5182e1d28d0797c431e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342421
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-20 12:23:56 +00:00
Jens Johansen bf96a722bc [frontend_server] CFE team takes ownership of package:frontend_server
First of we apply the wanted lints etc we prefer.
This includes but isn't limited to using types (i.e. no "var") and
being explicit about creation (i.e. no missing "new").

Change-Id: I516bccdac9760221ea5311af4567466bb4a65c77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341960
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 10:38:28 +00:00
Jonas Termansen fb2f007c71 [infra] Advertise RBE on Googler machines.
Bug: b/296994239
Change-Id: Id604b3f786dc90363fd77ea93ea8e1d080e2b43b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-12-18 13:31:04 +00:00
Srujan Gaddam b42103c9d1 Remove some SVG types from bindings map
Our maps are string-based and assume there's only one one @Native
class with a given name. This isn't true for these four classes,
where there are two types with the same name for each one.
This then results in us dropping the definition of one of the
two types.

Since one of the two types is essentially unused, we should choose
to drop that one instead for now. Long-term, we should deprecate
the unused types or change our conformance handling to handle
multiple types with the same name. We could also choose to unify
both definitions, but this may lead to either false positives or
renames of members being dropped.

This allows us to catch uses of the types that are actually used.

Change-Id: I9386cad5b014bee60cd72d21cdf0546640138704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341331
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-12-13 01:59:37 +00:00
Srujan Gaddam 8715f8007f [dart:html] Add doc comment to template
https://dart-review.googlesource.com/c/sdk/+/340283 added a
disclaimer to html_dart2js.dart that should go in the template
file so it doesn't get overwritten.

Change-Id: I64a4e2104fbe3a37463035c6e12c1e10aea81ce5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341330
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-12-13 01:49:03 +00:00
Ryan Macnak 1256db2277 [build] Python 3.12 compatibility.
Bug: https://github.com/dart-lang/sdk/issues/54306
Change-Id: I974e5e70c6c1cbb87343139a26052996d8df858f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341023
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-12 18:19:35 +00:00
Paul Berry e3b5c92b16 Add a comment explaining the goal of inference-update-3.
Change-Id: Iebe0cc3509ce163d169afc354b372c68d9748648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-12 15:07:09 +00:00
Ryan Macnak e4849d852c [build] Handle riscv64 hosts in utils.py.
Bug: https://github.com/dart-lang/sdk/issues/48545
Change-Id: I7439b644ab4ff2fcbc5e22553392b93ebcfc6435
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340645
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-11 19:12:50 +00:00
Erik Ernst 270ef81125 Adjust Dart.g such that initializerExpression matches implementation
The specification grammar has a rule for `initializerExpression` that
derives only `cascade` and `conditionalExpression`, whereas the
implementations allow throw expressions and assignments as well.

This CL broadens the grammar rule for `initializerExpression` such
that it derives the missing terms as well.

Change-Id: Iba3bb11623e07ac81cf9763228ae3e1b7b5204e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340620
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-12-08 15:59:09 +00:00
Ben Konyi f6205e0013 [ test matrix ] Run package:vm_service tests on VM configurations
Change-Id: I69eb125f0df46bdc3be65b99985bfcdaa0d51bfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337300
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-12-08 15:58:52 +00:00
Erik Ernst 5a76c005c6 Correct placement of metadata with named parameters
Bug: #54273
Change-Id: I541456bf052ff44bd210d0e265d4d1d70ca5211e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340560
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-12-08 10:59:28 +00:00
Erik Ernst be64653db1 Add missing import prefix to FUNCTION
This is a commit that should have been part of 340181.

Change-Id: Ic87c9d4975f0b9504395e6bfdac9b3c22fbcddd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340082
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-12-06 13:01:58 +00:00
Erik Ernst f07352b39a Adjust objectPattern to allow Function(toString: '')
Change-Id: Id2bc7e19b9382d941cd0b02ea805e6c0ed462f3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340181
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-12-06 11:16:55 +00:00
Paul Berry d79b9d8cd2 Add experiment flag inference-update-3.
I plan to use this to guard my work on
https://github.com/dart-lang/language/issues/3471.

Bug: https://github.com/dart-lang/language/issues/3471
Change-Id: I49afae7260c14b8c6b646ccc0ee39efae3891c34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338649
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-12-05 17:50:30 +00:00
Erik Ernst 9a4ca01983 Adjust Dart.g to allow prefix on Function as a type
This CL changes the specification grammar Dart.g such that it allows
using `p.Function` to denote the built-in type `Function`. This is
necessary in the case where 'dart:core' has been imported with an
import prefix `p` (and it hasn't been imported without a prefix at the
same time). The corresponding spec update is in
https://github.com/dart-lang/language/pull/3492.

Change-Id: Iaaba1c3bc8f5d3a8700c8e62ec3a1af92334840b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339561
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-12-05 09:31:49 +00:00
Ryan Macnak bd5df6da60 [build] Enable building riscv64 with clang.
Change-Id: Ie09d92a4e23484b7c6d2963bb0d327e443a68e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338641
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-30 18:09:49 +00:00
Ben Konyi 12e52d8fde Reland "[ CLI ] Migrate to use package:unified_analytics"
This reverts commit b0abe686fc.

Change-Id: I0a94061ade8ccdec84a90e782fa50eb68c1bcc1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338700
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-11-28 19:26:51 +00:00
Martin Kustermann 6e771a1ce9 [dart2wasm] Make tools/test.py -n dart2wasm-linux-jsshell ... work
Change-Id: I0a2678a5b141ab52597860380df7d44fd1f1db74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338381
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-11-27 15:51:55 +00:00
Alexander Thomas 096bde2a4d [cleanup] Remove co19_2 and other references to _2 suites
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:dart2js-hostasserts-linux-unsound-try,ddc-linux-chrome-unsound-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,front-end-linux-release-x64-try
Change-Id: I45ebfda5d746f12ca0fa3c0003c299720f1c7179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337180
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-11-22 11:15:57 +00:00
Paul Berry a19ae4ee68 Enable the extension types language feature.
This language feature allows the user to declare a static type using
`extension type` syntax, for example:

    extension type IdNumber(int i) {
      operator <(IdNumber other) => i < other.i;
      bool isValid(Some parameters) => ...;
    }

This behaves similarly to a "wrapper" class:

    class IdNumber {
      final int i;
      IdNumber(this.i);
      operator <(IdNumber other) => i < other.i;
      bool isValid(Some parameters) => ...;
    }

However, at runtime, no wrapper objects are created; instead, an
instance of the extension type is represented directly by its
"representation type" (`int` in the above example), and methods like
`isValid` are resolved statically. This gives developers an
abstraction mechanism with the advantage of zero runtime performance
cost, since no extra heap space is required, and no extra instructions
are needed to convert between an extension type and its underlying
representation.

The disadvantage of using extension types as an abstraction mechanism
is that since no wrapper objects are created at runtime, the
abstraction can be bypassed using `dynamic`, runtime casts, or by
"laundering" the object through contravariant generic methods like
`List.add` (which are runtime checked in Dart). For example:

    main() {
      var id = IdNumber(1);
      var list1 = <int>[];
      List<Object> list2 = list1;
      list2.add(id); // OK at compile time because `IdNumber` is a
                     // subtype of `Object`. OK at runtime because
		     // at runtime, `IdNumber` and `int` are
		     // indistinguishable.
      int i = list1[0];
      print(i);
    }

Extension types are expected to be particularly useful for
low-overhead decoding of external data formats (such as JSON), and for
inter-operation with other languages (such as Javascript).

For additional information see the feature specification:
https://github.com/dart-lang/language/blob/main/accepted/future-releases/extension-types/feature-specification.md

Change-Id: I900a3a25dcfc38bfa9c9f9b5b9fa20f362883653
Tested: Standard trybots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335062
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-11-21 19:14:49 +00:00
Moritz a3568286ff Adding the resource-identifier functionality from the compiler to the
vm.

This identifies all calls to static methods annotated with
`@ResourceIdentifier`, collects the constant arguments passed to the
method, and writes the results into a file.

The purpose of this feature is to be able to pass the recorded
information to packages in a post-compilation step, allowing them to
remove or modify assets based on the actual usage in the code prior to
bundling in the final application.

Tested: pkg/vm/test/transformations/resource_identifier_test.dart
Change-Id: I58cb313b66ee23c1d154dcc242547723a1ced359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329961
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-11-21 15:05:35 +00:00
Alexander Aprelev b9e1f802f2 [gardening/stress] Clean up references to redundant nnbd from stress test steps.
Follow-up to 831ad5580d

Change-Id: Ib7340fcce838dc01fc58cfe22b2b13f0cd67c71b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337400
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-11-20 23:58:56 +00:00
Alexander Aprelev 831ad5580d [vm/stress] Clean up legacy tests from isolate stress trest runs.
This is follow-up to 2ee771a4f6 to fix iso_stress_linux bot.

TEST=ci

Change-Id: Ic6840481287b5af943252bef9854e0be4049553b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337003
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-11-20 18:25:11 +00:00
Lasse R.H. Nielsen 5543293a16 Reland "Expire 3.0.0 experiment flags."
This is a reland of commit 6f29e7fce4

Original change's description:
> Expire 3.0.0 experiment flags.
>
> TEST=Existing tests covers.
> Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

TEST=Existing tests covers.
Change-Id: I384e77744c74774a250be413358a7fa176117167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332684
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-11-17 13:10:01 +00:00
Alexander Thomas cc161c4e5c [infra] Restore pkg test coverage on analyzer builders
These were unintentionally removed in go/dart-reviews/335442.

Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try
Change-Id: I55e69fdef0acfe68fe0ade92a20fbc296e09f3a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336900
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-11-17 11:48:36 +00:00
Alexander Thomas d8177eff7e [infra] Turn off legacy tests for the Dart VM
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64-try
Change-Id: Ib9b9de26068d719769643f413019260cacc5e837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335460
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-11-17 09:13:13 +00:00
Alexander Thomas 15a79bad53 [infra] Turn off legacy tests for the CFE
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:front-end-linux-release-x64-try
Change-Id: Ie02447da524b5cd0656db434ee8472434daeb3c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-11-17 09:04:42 +00:00
Alexander Thomas 37744978a0 [infra] Turn off legacy tests for the analyzer
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try,analyzer-analysis-server-linux-try
Change-Id: I9fafc524a3f6f461e17c456f7a53570c74ebffa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335442
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-17 09:00:36 +00:00
Alexander Thomas 43b4c2bb03 [infra] Turn off legacy tests for web compilers
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:dart2js-hostasserts-linux-unsound-try,ddc-linux-chrome-unsound-try,dart2js-unit-linux-x64-release-try
Change-Id: Ia2c1b64981de75cf3051e215794767abb3250e2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335440
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-11-17 08:27:02 +00:00
Paul Berry 18b5f25052 Use OWNERS files to restrict editing of tests/language to language team.
Also tests/language_2 (which hopefully we can delete soon).

Change-Id: I4c7086ecb1b374c2068be9d1366f76323435e57f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336624
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-16 18:18:00 +00:00
Ryan Macnak c5c578e671 [vm, ffi] Don't read out-of-bounds when marshalling structs by value.
Switch the Windows ARM64 builds to use MSVC. Clang disagrees with itself about handling of small structs in variadic functions, allowing splitting between the last argument register and the stack as the callee but not as the caller.

TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-linux-release-arm64-try,vm-mac-debug-arm64-try,vm-mac-release-arm64-try,vm-win-debug-arm64-try,vm-win-release-arm64-try,vm-ffi-qemu-linux-release-riscv64-try,vm-linux-debug-ia32-try,vm-linux-release-ia32-try,vm-win-release-ia32-try,vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-mac-debug-x64-try,vm-mac-release-x64-try,vm-win-debug-x64-try,vm-win-release-x64-try
Bug: https://github.com/dart-lang/sdk/issues/52644
Bug: https://github.com/dart-lang/sdk/issues/53829
Change-Id: I2fd6c40620a885479f11bb8528ca1e9df3948a2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331209
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-11-14 19:23:33 +00:00
Jonas Termansen 11ec96ab8a Rename be channel to main.
**This change cannot easily be reverted**: After reverting this change,
dart-ci-internal-release-bucket-breakglass must be broken by a member of
Dart EngProd and gs://dart-archive/channels/main/raw/latest must be
purged as well as gs://dartlang-api-docs/channels/main/latest.txt. This
operation would risk our release security and it is strongly preferred
if any problems can be fixed forward instead.

This change will upload the main channel builds to the main directory in
the dart-archive bucket instead of the be directory. The existing builds
remain where they are and the last version on the be channel remains
permanently frozen.

The downstream uses already have forward compatibility for the new
channel name. The Dart recipes respect the input channel name and output
to the release location by that name. The api.dart.dev service will
notice when the main channel pops into existence and switch
api.dart.dev/be to become api.dart.dev/main. The setup-dart github
action will likewise notice when the main channel starts existing.

The main channel is not an officially supported product since the builds
are not signed and tested and we don't advertise the existence of these
builds to our users. Ideally nobody would be broken by this change since
they shouldn't be using the main channel builds, but if they are, they
will have to rename the channel in their download links.

This change ensures that all the release branches and release channels
have the same matching names, which simplifies our infrastructure and
makes our releases easier to understand.

Fixes: b/270022416
Change-Id: Ib47ae7d2ded5fe0d405b3f19c34981c38082a090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327940
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-13 13:27:24 +00:00
Ryan Macnak 63aaca8c9a [build] Switch to Fuchsia core SDK.
build/fuchsia/gn-sdk is a copy of the current GN SDK with paths adjusted.
The rest of build/fuchsia comes from Flutter.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: I192cca955d05991bde3931d053df9835c5a2195d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334142
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-10 19:23:11 +00:00
Ömer Sinan Ağacan 75c975fe6d [dart2wasm] Remove stringref target
stringref target won't be used any time soon (probably ever). To help
with build times and avoid keeping it updated remove it for now.

Change-Id: I0df33b7ab2e19bae5090e8ea32ea6a3dc3751652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334881
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-11-10 09:49:37 +00:00
Vyacheslav Egorov 906ae3a9a6 [infra] Run tests using ad-hoc signed binaries on CI
This would allow us to catch issue with hardened runtime
which previously would slip through and only be discovered
after release.

Issue https://github.com/dart-lang/sdk/issues/53928

R=whesse@google.com

Change-Id: Iea1ced5433a3cf753d251a519a1de7bd0673ea3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333822
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-11-03 13:18:10 +00:00
Vyacheslav Egorov 4ce23629eb [gn] Support producing signed builds on Mac
This can be controlled via  codesigning_identity GN arg.

For example, setting codesigning_identity="-"
would produce ad-hoc signed binaries.

This CL also includes changes in vm/cc tests which are needed
for tests to be green when running with hardened runtime.

Issue https://github.com/dart-lang/sdk/issues/53928

Tested: enabled ad-hoc signing and tested on bots.
Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-mac-debug-x64-try
Change-Id: I3c3a6265c62b2904e43a326b7d8223bcfd393577
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333401
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-11-03 07:36:25 +00:00
Nate Biggs ad2708d071 [dart2js] Delete modular compilation step.
The Dart2JS team has agreed that this mode of compilation is no longer worth investing in at this time and its existence adds some overhead to other feature work so it is worth fully removing. In the future we may revisit this mode of compilation. Below is some more context for any future exploration in this space.

What didn't work with modular analysis:
- current modular analysis was computing impacts, which were dense (50% of the size of kernel)
- using it moved work to a modular phase, and cut Phase1 in half however end-to-end time was not better
- data overhead was very high
- it made it much harder to maintain invariants throughout the pipeline: the data is tightly coupled with the kernel AST, making it hard to make late modifications to the AST.

How to potentially make it better:
- make the data much more sparse
- make the data more independent from the kernel AST so that transformations are not breaking
- reduce the critical path in a more substantial way.

Note: We retain and ignore the commandline flags used for modular analysis in order to avoid breaking build pipelines that were passing them. We may remove these at a later date.

Change-Id: If574ce2358280ab5fedd89c62665328601e72e22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333360
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-11-03 00:11:50 +00:00
Jake Macdonald 1405695675 Add sample directories to the package config.
This allows the package imports in the tests to resolve.

Change-Id: Idadca8b55516a5b5d1511ebc38c298479aa8eda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333662
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-11-02 21:00:41 +00:00
Ryan Macnak 47ae85b075 [infra] Split the build for pkg-win-release-arm64 across multiple steps.
Change-Id: I6bca8cd05c2a305d7310e1a6976d49f93a6e1ed3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333042
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-02 18:13:34 +00:00