1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 12:06:26 +00:00
Commit Graph

1289 Commits

Author SHA1 Message Date
Daco Harkes
acad65713c [vm] Mark NativeFieldWrapperClasses as base
TEST=build SDK (modified patch files)
TEST=tests/ffi/*
TEST=runtime/vm/*_test.cc
TEST=runtime/tests/vm/dart/*

Closes: https://github.com/dart-lang/sdk/issues/51896
CoreLibraryReviewExempt: VM only.
Change-Id: I349849001adf8f3a62f3d4f94d4bdd295c36ef4d
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,vm-aot-linux-debug-x64c-try,vm-ffi-android-debug-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291761
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-31 10:23:12 +00:00
Kevin Chisholm
844fe6d955 [docs] Merge stable changes into main changelog
Change-Id: Ibd756739a08fd7e44b32ec7f5d8eccf29c666895
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332182
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-10-25 12:22:12 +00:00
Stephen Adams
0a436b7005 Reapply "[typed_data] Deprecate UnmodifiableUint8ListView and friends"
This reverts commit 4918d3ef8c.

`@Deprecated` annotations have been commented out.

CoreLibraryReviewExempt: reviewed as https://dart-review.googlesource.com/c/sdk/+/321922
TEST=ci
Bug: #53785
Change-Id: I3239251c2aba5f188aa947f0ff0208271d6be5cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331741
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-10-23 18:14:33 +00:00
Derek Xu
4918d3ef8c Revert "[typed_data] Deprecate UnmodifiableUint8ListView and friends"
This reverts commit b657773d58.

Reason for revert: blocking Dart SDK -> Engine roll (https://github.com/flutter/flutter/issues/137054)

Original change's description:
> [typed_data] Deprecate UnmodifiableUint8ListView and friends
>
> This is the first of several steps to remove the unmodifiable views for typed data classes. The end goal is that dart2js has only one class implementing `Uint8List` so that `Uint8List` accesses can always be compiled down to JavaScript code that directly uses indexed property accesses (`a[i]`).
>
> This first step deprecates the unmodifiable view classes to help prevent their use in new code, and adds `asUnmodifiableView()` methods as a replacement for the small number of places that use the classes.
>
> The next steps (see #53785) are to remove uses of the unmodifiable view classes from the SDK. Once this is complete the classes themselves can be removed.
>
> TEST=ci
>
> Issue: #53218
> Issue: #53785
>
> Change-Id: I04d4feb0d9f1619e6eee65236e559f5e6adf2661
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321922
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Ömer Ağacan <omersa@google.com>

Issue: #53218
Issue: #53785
Change-Id: I0bb042269f9ff8e5cd69619cf97b60c79ea98cbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331680
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-10-23 15:03:25 +00:00
Stephen Adams
b657773d58 [typed_data] Deprecate UnmodifiableUint8ListView and friends
This is the first of several steps to remove the unmodifiable views for typed data classes. The end goal is that dart2js has only one class implementing `Uint8List` so that `Uint8List` accesses can always be compiled down to JavaScript code that directly uses indexed property accesses (`a[i]`).

This first step deprecates the unmodifiable view classes to help prevent their use in new code, and adds `asUnmodifiableView()` methods as a replacement for the small number of places that use the classes.

The next steps (see #53785) are to remove uses of the unmodifiable view classes from the SDK. Once this is complete the classes themselves can be removed.

TEST=ci

Issue: #53218
Issue: #53785

Change-Id: I04d4feb0d9f1619e6eee65236e559f5e6adf2661
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321922
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-10-20 17:14:48 +00:00
Parker Lougheed
8225ddeae6 [dartdev] Use package:lints v3 in dart create templates
Change-Id: Ia282ec3c0eca1a5ef8c3405238d0fce422962d8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330997
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-19 14:41:50 +00:00
Parker Lougheed
83af1aa405 Include links to DevTools release notes in changelog
Closes https://github.com/dart-lang/sdk/issues/53230

Change-Id: If4147575e6ef2262c3b24c0dcdf0342aa9a09484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325140
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2023-10-18 23:00:17 +00:00
Parker Lougheed
5ce1da0df3 [dartdev] Mention new cli template for dart create in changelog
Bug: https://github.com/dart-lang/sdk/issues/53126
Change-Id: I510bac89a10f30370f52c78869f7b9bf2d7c66c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329861
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-11 14:52:34 +00:00
Parker Lougheed
41808b7735 [changelog] Clarify JS compiler header text in 3.2 changelog entries
The dart2js and DDC names are no longer exposed to most users, and either behind `dart compile js`, `webdev`, or the `flutter` tool.

To make it easier for users to identify changes relevant to them, adjust their changelog sections by using "development" or "production" in their names.

Change-Id: I4fb2f12a26d6bf91f48c1958fcab9b0c3fbca26b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329862
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
2023-10-10 18:04:45 +00:00
Parker Lougheed
47474c695e [linter] Add 3.2 linter changes to changelogs
Change-Id: Ib918b6bb1ebb527933672c5a598aacb4b3835769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-10-10 04:13:12 +00:00
Vyacheslav Egorov
f8086ed78c [vm] Enable waitFor for 3.2 release
We are going to enable waitFor in 3.2 release
and disable it in 3.3.

This makes migration smoother for users that need
to use Isolate.resolvePackageUriSync which is
only added in 3.2.

The actual removal timeline remains the same:
we will remove waitFor in 3.4.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/52121
Change-Id: I1ab7d07f874b3d914f070f1c358fcffaa96da28b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329420
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-10-05 13:24:34 +00:00
Liam Appelbe
82ff34d775 [ffi] Make nativeFunction throw if already closed
This is a *breaking change*. See
https://github.com/dart-lang/sdk/issues/53311

Make nativeFunction throw a StateError if the NativeCallable is already
closed. Also make close and keepIsolateAlive not throw.

I'm not adding an isClosed getter, as discussed on the bug.

Bug: https://github.com/dart-lang/sdk/issues/53311
Fixes: https://github.com/dart-lang/sdk/issues/53311
Change-Id: Ib0066352d3cfc01d31df8ae8fd61be426fcdf6e1
CoreLibraryReviewExempt: The FFI package is VM-only
TEST=async_void_function_callbacks_test and isolate_local_function_callbacks_test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328280
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-09-27 22:18:47 +00:00
Srujan Gaddam
74c407da2f [dart:js_interop] Add/fix some js_interop helpers
Minus all the operator-related functionalities, members that
can be worked around using static interop e.g. getPrototypeOf,
and createDartExport/createStaticInteropMock, this bridges the
gap of js_util.

Adds:
- instanceOfString from js_util as an extension methods
- JSObject constructor to replace js_util.newObject
- Unnamed factory constructor to JSAny so users can't extend it

Fixes:
- JSArray.withLength to take an int
- typeofEquals to take a String and return a bool
- instanceof to return a bool

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I7db1651f641a4fc84392957dfa7ad64904f110e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326691
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-09-23 18:32:59 +00:00
Srujan Gaddam
e130bb36ce [dart:js_interop] Make isUndefined and isNull throw on dart2wasm
null and undefined cannot be distinguished on dart2wasm in its
current state, so these helpers should only work on the JS
compilers. Some comments are updated to reflect the current state
of this internalization. Also fixes a pending TODO in isNull and
isUndefined on the JS backends.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: Ic56e8aa346af99cb99d01fe3c7ac5e37e965db23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326690
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-09-23 01:46:50 +00:00
Srujan Gaddam
76193718d2 Reland "[dart:js_interop] Re-enable type checks on external APIs"
This is a reland of commit 2a669c571f.

External APIs when using dart:js_interop should only allow
primitives, JS types, and other static interop types. This
was previously checked in a more restrictive mode called
"strict mode" but is not checked everywhere where dart:js_interop
APIs exist.

Change-Id: I1a8d04071a519c4965b266eb2800bcc3c3bb8393
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325961
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-09-18 19:53:40 +00:00
Kevin Chisholm
a744a03491 Update CHANGELOG.md to add release date to 3.1.0 release.
Change-Id: I17720269d12431e2ba705ee709414d77a6621d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326660
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
2023-09-18 14:14:09 +00:00
Kevin Chisholm
07c5092444 [docs][release] Merge stable Changelog to main and update broken links.
Change-Id: Iba25e89e98332ccd8b0f4e18213cebc39bbe7f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326141
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
2023-09-14 17:56:08 +00:00
Vyacheslav Egorov
9900af07d4 Add CHANGELOG.md for waitFor
R=kustermann@google.com

Change-Id: I64d09f62790790bc1f35a565a5ecf6ebbc109377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326061
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-09-14 10:58:14 +00:00
Paul Berry
7c38351cbb Improve explanation of noSuchMethod / field promotion interaction in CHANGELOG.
Fixes #53510.

Bug: https://github.com/dart-lang/sdk/issues/53510
Change-Id: I25b9bb4c59a4c438c7d4f48cf955e388c22378f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325740
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-09-13 17:56:25 +00:00
Robert Nystrom
b35c645302 Roll the latest dart_style into the SDK.
There are a couple of small format changes, but they are minimal
enough that we might not need to land a pre-built SDK with this.

Change-Id: I1d258c8a782e5db24c2048f407a8b7cf7b948eef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325580
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-09-13 01:44:57 +00:00
Liam Appelbe
d5555377ed Add changelog entry for NativeCallable
Bug: https://github.com/dart-lang/sdk/issues/53322
Change-Id: I458ea1a920f68e3de23008649748a24602bb5e0e
Fixes: https://github.com/dart-lang/sdk/issues/53322
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324180
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
2023-09-11 22:25:06 +00:00
Brian Quinlan
8a91749e42 Fix parsing of folded header field values.
Bug: https://github.com/dart-lang/sdk/issues/53227
Bug: https://github.com/dart-lang/sdk/issues/53185
Change-Id: Ibbdbdf9c8f2875e8f687244982810fffee20e69c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320920
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-09-11 21:13:58 +00:00
Jackson Gardner
db214e8c81 Revert "[dart:js_interop] Re-enable type checks on external APIs"
This reverts commit 2a669c571f.

Reason for revert: Failing dart -> Flutter Engine roller. We need to make some changes on the engine side to prepare for re-enabling these checks.

Original change's description:
> [dart:js_interop] Re-enable type checks on external APIs
>
> External APIs when using dart:js_interop should only allow
> primitives, JS types, and other static interop types. This
> was previously checked in a more restrictive mode called
> "strict mode" but is not checked everywhere where dart:js_interop
> APIs exist.
>
> Change-Id: Ic82a3ec0bf6062c25d7f8933e503820a21bc191f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316867
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

Change-Id: I54caf06976e215b2b576cedfc0013ee79c6682f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324902
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-11 19:31:20 +00:00
Srujan Gaddam
2a669c571f [dart:js_interop] Re-enable type checks on external APIs
External APIs when using dart:js_interop should only allow
primitives, JS types, and other static interop types. This
was previously checked in a more restrictive mode called
"strict mode" but is not checked everywhere where dart:js_interop
APIs exist.

Change-Id: Ic82a3ec0bf6062c25d7f8933e503820a21bc191f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316867
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-09-05 16:05:08 +00:00
Sigurd Meldgaard
22c467636f Bump pub to be6868ba132c782d9835b1638a634ecb73428579
Changes:
```
> git log --format="%C(auto) %h %s" 42819a1..be6868b
 https://dart.googlesource.com/pub.git/+/be6868ba Improve precompilation (4005)
 https://dart.googlesource.com/pub.git/+/1ff7ed9f `upgrade --tighten` (3957)
 https://dart.googlesource.com/pub.git/+/a2ff15af Bump actions/checkout from 3.5.3 to 3.6.0 (4007)
 https://dart.googlesource.com/pub.git/+/9c041f97 Revert "Validate pubspec names after resolution, instead of when parsing (3956)" (4006)
 https://dart.googlesource.com/pub.git/+/62981e8c Switch vendor to a dev dependency (3997)
 https://dart.googlesource.com/pub.git/+/edcd5c2a Don't display detailed errors from credentials file (4004)
 https://dart.googlesource.com/pub.git/+/bddb0b8a Fix test expectation (4000)
 https://dart.googlesource.com/pub.git/+/c5541b33 Fix spelling errors (3999)
 https://dart.googlesource.com/pub.git/+/ee3f0ff7 Log missing compilation output (3992)
 https://dart.googlesource.com/pub.git/+/57e5d581 Remove remaining remnants of old packages folder and .packages file (3989)
 https://dart.googlesource.com/pub.git/+/edc76a1c Cleanup meta annotation usage (3990)
 https://dart.googlesource.com/pub.git/+/d619b373 Replace Pair usage with records (3988)
 https://dart.googlesource.com/pub.git/+/923cb7bd Enable lints to use new language features (3987)
 https://dart.googlesource.com/pub.git/+/78a39b05 Fix some type related lints (3986)
 https://dart.googlesource.com/pub.git/+/f41c6c80 Update Dart spec reserved words (3984)
 https://dart.googlesource.com/pub.git/+/6c267643 Fix and increase flexibility of language version override test (3985)
 https://dart.googlesource.com/pub.git/+/037138e6 Validate pubspec names after resolution, instead of when parsing (3956)
 https://dart.googlesource.com/pub.git/+/4d4ff446 Show dependency type changes in report (3954)
 https://dart.googlesource.com/pub.git/+/996fdcfd `pub add` Rely on git sources validation of --git-url (3951)
 https://dart.googlesource.com/pub.git/+/d7647400 Update tar (3976)
 https://dart.googlesource.com/pub.git/+/98565c3e Bump actions/checkout from 3.5.2 to 3.5.3 (3960)
 https://dart.googlesource.com/pub.git/+/f323772e Summary for `pub get`, don't show unchanged in `pub upgrade` (3952)

```

Diff: https://dart.googlesource.com/pub.git/+/42819a1e10f803eb7f6296692c5a976e1c647360..be6868ba132c782d9835b1638a634ecb73428579/
Change-Id: I4b4f42790bb50ad4b17bdf2ac195494a241a63f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324101
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-09-04 14:56:52 +00:00
Paul Berry
0428501a59 Add a CHANGELOG entry for private field promotion.
Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: Iab3ab8fc3656941e7df91681b14a7d4e2355fb3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323502
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-08-30 20:57:25 +00:00
Parker Lougheed
9e761d5a10 [linter] Account for new lints in 3.1.0 release
Bug: https://github.com/dart-lang/linter/pull/4678#issuecomment-1685125753
Change-Id: I8fe1bcea8cc0db26b1375cb95ebe6ec51b6b63ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322380
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 20:36:05 +00:00
Parker Lougheed
b199896be5 Mark packageConfigSync and resolvePackageUriSync as released in 3.2
Closes https://github.com/dart-lang/sdk/issues/53285

Bug: https://github.com/dart-lang/sdk/issues/53285
CoreLibraryReviewExempt: dart:isolate is only supported on the VM and this CL only changes a Since annotation.
Change-Id: If525aed83d3ccd69558f348e6a4a287a35b1d2ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322040
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-08-22 08:05:19 +00:00
Srujan Gaddam
a38fb595cf [dart:js_interop] Add JS types for Symbol/BigInt
Adds JSSymbol and JSBigInt and erases to either their respective
interceptor types in the JS backends or JSValue in dart2wasm.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: Ib2c70d22a70c6308733cd170b91eafa8ec3b3aeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321749
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-08-21 21:54:15 +00:00
Srujan Gaddam
c738fe1d7b [ddc] Add BigInt and Symbol interceptors
Adds the same interceptors from dart2js as JsPeerInterfaces
and handles typeof differences in getReifiedType. These must
be JsPeerInterfaces so that Object members can be stored in
their prototype. Tests are added so that dart2js and ddc are
consistent.

Change-Id: Iadc3dd26957c0a21b4039c49c1c1ff162ae286e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321748
Reviewed-by: Stephen Adams <sra@google.com>
2023-08-21 21:54:15 +00:00
Nicholas Shahan
7b6d9fb46e [ddc] Cleanup temporary fix in strSafe
Fix allowed it to accept null but it should never be called with a
nullable value.

Change-Id: I03b5d9b4906e9e4557a4f2720350c0c8176fec53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320841
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Nicholas Shahan <nshahan@google.com>
2023-08-21 17:42:33 +00:00
Parker Lougheed
70310b06d0 [changelog] Move utf8 return type change to 3.2
The change (81df36216f) landed after the cut off and isn't in 3.1: https://api.dart.dev/stable/3.1.0/dart-convert/Utf8Codec-class.html#:~:text=inherited-,encode,-(String%20input

Change-Id: I4394c546e07727bfd54e2f397b755b7460833985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321260
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-08-21 07:38:02 +00:00
Parker Lougheed
7289baece5 [changelog] Fix link definition in http trailing whitespace breaking change
Change-Id: I5943176c7142ba09b3ce5463f6fc410015c2c0a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321240
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-08-17 19:03:08 +00:00
Lasse R.H. Nielsen
4a38cb09f5 Fix behavior of Stream.empty.
The underlying subscription would invoke the `onDone` handler even
after a `cancel`.
It also forgot to register the `onDone` callback in the zone before
running it.

Tweaked the behavior of `pause` and `resume` to make sure they make
no difference after `cancel` or after a done event has been omitted.
(Test now checks that the behavior matches other streams.)

Fixes #53201

Bug: https://dartbug.com/53201
Change-Id: Iba35be2c4b44b5c4ec97d5a4dbcd3aff7fee8b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320561
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-08-17 15:26:59 +00:00
Derek Xu
f6bc011b37 [dart:developer] Improve documentation of Service.getIsolateId and Service.getObjectId
This CL addresses https://dart-review.googlesource.com/c/sdk/+/317220/comment/7e05218f_882e21cd/

CoreLibraryReviewExempt: This CL does not change any APIs, it just adds
an @Since annotation to a method.
Change-Id: I4187c50498668553806bb2eee6584114363b417a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320900
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-08-16 15:13:47 +00:00
Srujan Gaddam
ad62f6033b [dart:js_interop] Relabel globalJSObject as globalContext and point to object used in static interop lowerings
This is likely more useful than returning globalThis always. It
allows users to workaround issues with lowerings without having
to worry about browser compatibility differences.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I01479211fe6b573c845de5b134d36338c40fc10d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319301
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-08-15 20:57:17 +00:00
Srujan Gaddam
66b511fa6c [dart:js_interop] Use compiler-dependent global context
Fixes https://github.com/dart-lang/sdk/issues/52955

Instead of globalThis, dart2js and DDC will now use the same global
context that they did for non-static interop. dart2wasm will
continue to use globalThis.

Change-Id: Iec899fc73ed35c50cd688d9b45b980e94f101c0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-08-15 20:57:17 +00:00
Brian Quinlan
ce0d051c9c Remove trailing whitespace from header values.
Bug: https://github.com/dart-lang/sdk/issues/53005
Bug: https://github.com/dart-lang/sdk/issues/51532
Change-Id: I8a2fc04f48d50103819d655ccd300e73d59fbecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319903
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-08-15 16:58:12 +00:00
Parker Lougheed
9ac6332c67 [release] Minor fixes and cleanup to recent changelog entries
- Updates a few broken links
- Fixes a few spelling mistakes
- Standardizes formatting in recent entries
- Provides a few more details where helpful

Change-Id: I8d5376dfe2dec11b53cb38081f0e268c3cee51ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-08-15 01:03:19 +00:00
Paul Berry
907e705307 Flow analysis: use a more precise split point for refutable patterns.
Previously, the flow control logic for patterns didn't use the
`FlowModel.split` or `FlowModel.unsplit` methods at all. This meant
that if a control flow join point occurred in pattern logic, flow
analysis would consider the split point to be whatever split point was
established by the enclosing expression or statement. In the case of
an if-case statement, it would consider the split point to be at the
beginning of the scrutinee expression.

Split points are used by flow analysis for the sole purpose of
ensuring that joins propagate type promotions the same way in dead
code as they do in live code (so that users introducing temporary
`throw` expressions or `return` statements into their code do not have
to deal with nuisance compile errors in the (now dead) code that
follows. The consequence of flow analysis considering the split point
to be at the beginning of the scrutinee expression is that if the
scrutinee expression is proven to always throw, then joins that arise
from the pattern or guard may not behave consistently with how they
would have behaved otherwise. For example:

    int getInt(Object o) => ...;
    void consumeInt(int i) { ... }
    test(int? i) {
      if (
          // (1)
          getInt('foo')
          case
              // (2)
              int()
          // (3)
          when i == null) {
      } else {
        // (4)
        consumeInt(i);
      }
    }

In the above code, there is a join point at (4), joining control flows
from (a) the situation where the pattern `int()` failed to match, and
(b) the situation where `i == null` evaluated to `false` (and hence
`i` is promoted to non-nullable `int`). Since the return type of
`getInt` is `int`, it's impossible for the pattern `int()` to fail, so
at the join point, control flow path (a) is considered
unreacable. Therefore the promotion from control flow path (b) is
kept, and so the call to `consumeInt` is valid.

In order to decide whether to preserve promotions from one of the
control flow paths leading up to a join, flow analysis only considers
reachability relative to the corresponding split point. Prior to this
change, the split point in question occurred at (1), so if the
expression `getInt('foo')` had been replaced with `getInt(throw
UnimplementedError())`, flow analysis would have considered both
control flow paths (a) and (b) to be unreachable relative to the split
point, so it would not have preserved the promotion from (b), and
there would have been a compile time error in the (now dead) call to
`consumeInt`.

This change moves the split point from (1) to (2), so that changing
`getInt('foo')` to `getInt(throw UnimplementedError())` no longer
causes any change in type promotion behavior.

The implementation of this change is to add calls to `FlowModel.split`
and `FlowModel.unsplit` around all top-level patterns. At first glance
this might appear to affect the behavior of all patterns, but actually
the only user-visible effect is on patterns in if-case statements,
because:

- In switch statements and switch expressions, there is already a
  split point before each case.

- In irrefutable patterns, there is no user-visible effect, because
  irrefutable patterns cannot fail to match, and therefore don't do
  any control flow joins.

This change allows the split points for patterns to be determined by a
simple syntactic rule, which will facilitate some refactoring of split
points that I am currently working on.

Change-Id: I55573ba5c28b2f2e6bba8731f9e3b02613b6beb2
Bug: https://github.com/dart-lang/sdk/issues/53167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-08-11 17:09:49 +00:00
Parker Lougheed
0360930dbc [changelog] Add optional named parameter separator breaking change
Fixes https://github.com/dart-lang/sdk/issues/52491

Bug: https://github.com/dart-lang/sdk/issues/52491
Change-Id: Ief94acb7a3ba75ea555718e017e39ce2c418b41e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320020
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-08-11 14:49:32 +00:00
Parker Lougheed
80fb7b3f9d [release] Update changelog with stable patch notes
Change-Id: I5bbf530c55be59c0a7b23d5d035d266d19eecd5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320040
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
2023-08-11 14:43:13 +00:00
Srujan Gaddam
86eb49ac19 [dart:js_interop] Disallow user @staticInterop classes from subtyping most dart:_js_types types
Since user @staticInterop types are erased to JavaScriptObject, they
should only be able to subtype other types that are :> JavaScriptObject,
which are just JSObject and JSAny. Eventually all the other JS types
will move to extension types and we can remove this check.

Change-Id: If56b6770e141238b583937880ca87496780c8fac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316865
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-08-08 19:17:25 +00:00
Robert Nystrom
d6b9e42f2e Update CHANGELOG to clarify there are no language changes.
Change-Id: I4a722ab4b78ffcc751d04e0b06ba879093ee6b02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318749
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-08-07 23:33:45 +00:00
Parker Lougheed
99745598cd Update old linter site links to dart.dev
Bug: https://github.com/dart-lang/linter/issues/4460 and https://github.com/dart-lang/site-www/issues/4499
Change-Id: Ieb90512aac4e476b922765c6ee191085a2ad2c9b
CoreLibraryReviewExempt: Only updates a link in documentation comments.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311880
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-08-04 19:45:23 +00:00
Srujan Gaddam
7d6414a6d5 [dart:js_interop] Restrict external members from using type parameters that don't extend static interop types
Since external APIs can only use primitives and JS types in static interop,
we should require that all type parameters on static interop APIs extend
another static interop type. This is the minimum required to ensure all
type parameters can be erased to JSValue. This only affects dart:js_interop
users and replaces the previous type parameter static error check.

Change-Id: Ia546874da73c808aa25deb8d54d581db783987df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316140
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-31 17:40:56 +00:00
Srujan Gaddam
18b7dd771b Reland "[dart:js_interop] Remove Object.toJS and JSNumber.toDart"
This is a reland of commit 16fcfe7eae

Original change's description:
> [dart:js_interop] Remove Object.toJS and JSNumber.toDart
>
> Modifies JSBoxedDartObject reified type on JS backends and also
> modifies JSBoxedDartObject.toDart now that a proper box is introduced.
> Also uses a JS symbol in JSBoxedDartObject.toDart for a property
> check so that different Dart apps don't accidentally share Dart
> objects. It's now an error to call this function on non-boxed objects.
>
> Fixes a type issue where creating a new object literal with the JS
> foreign function was resulting in dart2js thinking toJSBox would
> always throw. Changing the typeDescription to PlainJavaScriptObject
> instead of =Object fixes that issue.
>
> CoreLibraryReviewExempt: Backend-specific library.
> Change-Id: I5cfb1f32ff4328fafdf9831b0d8da806c39391d9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309082
> Reviewed-by: Joshua Litt <joshualitt@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

CoreLibraryReviewExempt: Reland.
Change-Id: If6b190f12bdf840b0259c5739f50d9bdcd27fd47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313600
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-17 21:16:07 +00:00
Srujan Gaddam
2767fca6fe Revert "[dart:js_interop] Remove Object.toJS and JSNumber.toDart"
This reverts commit 16fcfe7eae.

Reason for revert: Flutter changes haven't landed to google3 yet.

Original change's description:
> [dart:js_interop] Remove Object.toJS and JSNumber.toDart
>
> Modifies JSBoxedDartObject reified type on JS backends and also
> modifies JSBoxedDartObject.toDart now that a proper box is introduced.
> Also uses a JS symbol in JSBoxedDartObject.toDart for a property
> check so that different Dart apps don't accidentally share Dart
> objects. It's now an error to call this function on non-boxed objects.
>
> Fixes a type issue where creating a new object literal with the JS
> foreign function was resulting in dart2js thinking toJSBox would
> always throw. Changing the typeDescription to PlainJavaScriptObject
> instead of =Object fixes that issue.
>
> CoreLibraryReviewExempt: Backend-specific library.
> Change-Id: I5cfb1f32ff4328fafdf9831b0d8da806c39391d9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309082
> Reviewed-by: Joshua Litt <joshualitt@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

Change-Id: I469ad04db7b49ffef47a46ccac97e909e4865719
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313580
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-13 21:06:05 +00:00
Srujan Gaddam
16fcfe7eae [dart:js_interop] Remove Object.toJS and JSNumber.toDart
Modifies JSBoxedDartObject reified type on JS backends and also
modifies JSBoxedDartObject.toDart now that a proper box is introduced.
Also uses a JS symbol in JSBoxedDartObject.toDart for a property
check so that different Dart apps don't accidentally share Dart
objects. It's now an error to call this function on non-boxed objects.

Fixes a type issue where creating a new object literal with the JS
foreign function was resulting in dart2js thinking toJSBox would
always throw. Changing the typeDescription to PlainJavaScriptObject
instead of =Object fixes that issue.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I5cfb1f32ff4328fafdf9831b0d8da806c39391d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309082
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-13 20:38:11 +00:00
Kevin Moore
6709a387c6 nit: sort changelog entries by dart library name
Change-Id: I179d37e459bf697bf4cd4415dfb81e90bd2e3f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313220
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-07-11 20:46:55 +00:00
Martin Kustermann
48def8e49a Add CHANGELOG.md notice about change in return type of utf8.encode()
This is follow-up for [0]

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

Change-Id: I3f34a752121a369a09a5a8d7bc3c744a25e85642
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312986
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-07-11 13:22:18 +00:00
Vyacheslav Egorov
4fddaf9486 [sdk] Provide Isolate.resolvePackageUriSync
TEST=augmented few existing tests

Bug: https://github.com/dart-lang/sdk/issues/52121
CoreLibraryReviewExempt: VM-only change, other platforms don't support this API.
Change-Id: I95decae6cf1a5c6ad694747313aa0dbe0a13025d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312981
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-07-11 12:59:33 +00:00
Srujan Gaddam
bd3e6fa1a3 Revert "[dart:html] Throw exception if Window.open opens null window"
This reverts commit a356f71b71.

Reason for revert: This should be handled by throwing an exception when
the methods of the returned window are called, not when it is opened.
This would be a noisy breaking change that we don't want for 3.1. For
now, revert until the change that affects the individual methods is
landed.

Original change's description:
> [dart:html] Throw exception if Window.open opens null window
>
> Window.open silently allows a null window to be opened, and
> issues arise later when users try to use the non-null wrapper.
> This CL changes that to throw an exception if the window is null.
> This exception can be caught and recovered from. This avoids the
> larger breaking change of making this API nullable.
>
> CoreLibraryReviewExempt: Backend-specific library.
> Change-Id: I9a53a477cb370c3bc6bc26b2162ce66c5af166aa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306910
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

CoreLibraryReviewExempt: Revert in backend-specific library.
Change-Id: I5007b7d7aa608bfc8e5827b5f967af5573d0b758
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309000
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-28 23:21:32 +00:00
Ivan Inozemtsev
2b250992f9 Revert "[dart:html] Move NullWindowException to implementation"
This reverts commit 14a3051552.

Reason for revert: b/289195983

Original change's description:
> [dart:html] Move NullWindowException to implementation
>
> Window.open may open a null window in more cases than expected.
> Users may not care that the window they get back is invalid if
> they never use it. Therefore, this CL moves the exception to
> the implementation of the returned window in order to reduce
> noise, but still give a way for users to recover if they wish
> to do so.
>
> CoreLibraryReviewExempt: Backend-specific library.
> Change-Id: I005cf80630cfb4db2f5ec2012cfcd0161ad10ff1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311460
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: Id7c514a80fdcaa18a7eb0acdcb7f36477a04d966
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311843
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2023-06-28 23:21:32 +00:00
Srujan Gaddam
14a3051552 [dart:html] Move NullWindowException to implementation
Window.open may open a null window in more cases than expected.
Users may not care that the window they get back is invalid if
they never use it. Therefore, this CL moves the exception to
the implementation of the returned window in order to reduce
noise, but still give a way for users to recover if they wish
to do so.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I005cf80630cfb4db2f5ec2012cfcd0161ad10ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311460
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-26 22:58:08 +00:00
Kevin Chisholm
31272b2a0b [release] synching stable and main changelogs.
Change-Id: I196069b652050d7767ad23d54cca72f6d7ac0df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308241
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-06-19 15:56:22 +00:00
Srujan Gaddam
a356f71b71 [dart:html] Throw exception if Window.open opens null window
Window.open silently allows a null window to be opened, and
issues arise later when users try to use the non-null wrapper.
This CL changes that to throw an exception if the window is null.
This exception can be caught and recovered from. This avoids the
larger breaking change of making this API nullable.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I9a53a477cb370c3bc6bc26b2162ce66c5af166aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306910
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-06-12 18:29:56 +00:00
Srujan Gaddam
5b3a57908d [dart:js_interop] Remove ObjectLiteral
This annotation is unneeded as named arg external constructors
is enough to determine if an object literal is created. The one
exception is an empty object literal, but our guidance is to use
utility functions to create one instead. This is a better fit for
that purpose too as an interface for an empty object literal is
more uncommon.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I10cf891601b28ff7e56129842d099ea28863626d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307506
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-06-06 20:50:36 +00:00
Robert Nystrom
7c83e8ad4a Roll dart_style into the SDK.
This includes a single commit which fixes:

https://github.com/dart-lang/dart_style/issues/1224

This doesn't need to be coordinated with a pre-built SDK update.

Change-Id: Ifaabfde1d0d3dc180cf65a1052ba8dcff3324013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306122
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-05-30 23:51:19 +00:00
mnordine
41543dfb04 Fix typo
Closes https://github.com/dart-lang/sdk/pull/52507

GitOrigin-RevId: 7c173ed3b70a88cb6a73b3304fb53d8eaf1627ea
Change-Id: Ie4d1850e14a1b6291c54bad76dea14f624855095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305341
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-05-24 16:48:55 +00:00
Lasse R.H. Nielsen
7e56658645 Add interface to a few classes which had missed it.
Breaking change request: https://dartbug.com/52334

Four abstract pure-interface classes in `stream.dart` have
been missed, and not made into `interface` declarations
like other similar abstract interface-only classes.
They should be marked `interface`, for consistency,
and to express intent.

The classes are:
* `StreamConsumer`
* `StreamIterator`
* `StreamTransformer`
* `MultiStreamController`

All are abstract classes with only abstract instance members.

Only `StreamConsumer` has uses where it is extended.
Most of those are inside the SDK, and are fixed here.
Two more are in packages (`http_server` and `streams`).
The former is discontinued and archived, and will never have a 3.0
release. The latter is internally developed and easy to fix.

Hope to cherry pick this for 3.0.3

Tested: Modified affected tests. Only adding restrictions.
CoreLibraryReviewExempt: Adding modifiers only.
Change-Id: I41aa47e48eaf769b7bd9d3206c1079a16ef3d476
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302204
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-05-24 14:04:27 +00:00
Brian Quinlan
c3e815bc7a [io] Make FileSystemEvent sealed
Bug: https://github.com/dart-lang/sdk/issues/52027, https://github.com/dart-lang/sdk/issues/51912
Change-Id: I154ffe5901e4248f48400e6c84568c9fe6dbcd83
CoreLibraryReviewExempt: aske on holiday
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302452
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-05-22 23:37:31 +00:00
Brian Quinlan
ee0b9ea0f8 Deprecate the Platform constructor
Bug:https://github.com/dart-lang/sdk/issues/52138
Change-Id: I9137ffe7caa1a1e9441d48b030342a528d99e8f6
CoreLibraryReviewExempt: deprecation, aske on holiday
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303086
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-05-18 21:08:24 +00:00
Brian Quinlan
a75e857df5 Add a Platform.lineTerminator static method
Bug: https://github.com/dart-lang/sdk/issues/52379
Change-Id: Ic3a7f06252f8a69dcfdb29c00f16557c34529652
CoreLibraryReviewExempt: Aske is on holiday
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-18 19:57:58 +00:00
Lasse R.H. Nielsen
066106d19a Make Uri.base see IOOverrides changes to current directory.
Fixes #39796.

Tested: Case added to `io_overrides_test.dart`.
Bug: https://dartbug.com/39796
Change-Id: Id72f75f972f59f4f9b7d17e79b4bcffd6d79f2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304006
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-05-17 17:27:13 +00:00
Marcin Wojnarowski
0f88ed05ef Replace 'explicit_reopen' mention with 'implicit_reopen'
Closes https://github.com/dart-lang/sdk/pull/52318

GitOrigin-RevId: 162234b0174615ee749a53acc62dc0eaff4850c2
Change-Id: I70ec74cee7f9ed9d6b4ec18ee485df509bd83712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302222
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-05-16 18:41:24 +00:00
Jonas Finnemann Jensen
05e77a934e Document relocation of PUB_CACHE.
See: https://github.com/dart-lang/sdk/issues/52386
Change-Id: I48149aeeea5a78ea2c1d9d7b3b9df8d48ed2310e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303321
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2023-05-15 13:33:41 +00:00
Robert Nystrom
73dea244cc Roll the latest dart_style into the SDK.
This has a few changes. One of them affects code even before Dart 3,
though it only touches parameters with metadata on them, which tend to
be rare (outside of uses of the freezed package). It may affect code in
the SDK repo.

The other two are specific records and patterns so won't affect much
existing code. But the formatted behavior before these bug fixes looks
pretty bad, so if it's not too much risky, I think it's worth cherry
picking into the next stable point release.

Change-Id: I1e60d251b474b099c5059ffa63ddb260f0ed1318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302500
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-05-10 21:39:48 +00:00
Robert Nystrom
9cd43f7d7d Fix switch expression example in CHANGELOG.
Fix #52338.

Change-Id: Ia7ebaaa202003090894bb2c9e7daea0a1694bae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302447
Reviewed-by: Michael Thomsen <mit@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2023-05-10 18:26:19 +00:00
Srujan Gaddam
29e814357c [pkg:js] Lower external @staticInterop and extension members using invocation-level semantics
We've changed the semantics for these members using dart:js_interop
so that not passing in optionals on the Dart side is equivalent to
not passing in optionals on the JS side. This CL makes that consistent
with package:js as well.

Modifies CHANGELOG to announce breaking change.

Change-Id: Ic5c33c9c797983a72edec9bc59f60fc1f29240b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300400
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-05-09 23:12:58 +00:00
Srujan Gaddam
8cbd946338 [dart:js_interop] Disallow tear-offs of external members
Disallows tear-offs for all interop members when using
dart:js_interop, and disallow tear-offs of @staticInterop and
extension external members. Creates tear-off indexes in
InlineExtensionIndex to keep track of tear-off methods that
the CFE generates.

Modifies the CHANGELOG to communicate the breaking change.

Change-Id: I900fdfd6ee6b198f2f34e9d9fd5f3d9c964680e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299800
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-05-09 23:12:58 +00:00
William Hesse
5d30f18892 Update CHANGELOG - add 3.0.0 release date
Change-Id: Ib75194438d1dbd357e57e4ac706208b95615f50c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301380
Reviewed-by: Alexander Thomas <athom@google.com>
2023-05-04 08:03:29 +00:00
Sun Jiao
f9ccf90c97 [http] support SameSite in Cookies.
Closes https://github.com/dart-lang/sdk/pull/51457

GitOrigin-RevId: 4e0bece11ae2c1b7b7eac5a43293ae43682e22d2
Change-Id: I0fe39aede037b713b5a3fdbf7950a4a44a02ea1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283984
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-05-02 23:51:22 +00:00
mnordine
b5f4692a41 Fix typo
Closes https://github.com/dart-lang/sdk/pull/52206

GitOrigin-RevId: bcf3d10c689c73ea27092b1cc2813d7964627b59
Change-Id: Ic850a649290f1c71908bbe6b0f80dcbe98a0a7f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299460
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2023-04-28 04:57:31 +00:00
Robert Nystrom
0eee9f1392 Add 3.0 language changes to CHANGELOG.
Change-Id: Ib5dcc5510b520bc648243801b4dbb435aaf44df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294128
Reviewed-by: Marya Belanger <mbelanger@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-04-27 20:45:52 +00:00
Alexander Thomas
69b4bc43ab [release] Add 3.1 section to the changelog
Change-Id: I1d39be7238220f3bea9149c6fccc22ff8856c8a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299220
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
2023-04-27 20:14:04 +00:00
Ben Konyi
aef551ac35 Reland "[ Observatory ] Disable serving Observatory by default"
This reverts commit fa0c81efe1.

Requires https://github.com/flutter/flutter/pull/123556/ to have landed.

TEST=Existing tests

Change-Id: I40b9e11a89fd66ec511d31a385192e577899fca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296640
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-04-20 18:16:09 +00:00
Lasse R.H. Nielsen
3e0ca136b6 Update documentation on Record and identical.
Smaller clean-ups.

CoreLibraryReviewExempt: Documentation only.
Change-Id: Idfe543f18927043ae8ec73e81dc7d9d333bb88df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294542
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-04-13 12:35:44 +00:00
Kevin Chisholm
6b45aa0d30 [Changelog] Updates the changelog to include hotfix notes from the stable branch.
Change-Id: I539ab62d27e0b0dd4bd45de1d8b720138a64717c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294340
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
2023-04-10 09:14:19 +00:00
Sam Rawlins
254508bfec Add CHANGELOG text re: analyzer plugins for 3.0.0
Change-Id: I885a9d8fa0914bd85106cf912e6464021b079899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-04-05 17:21:47 +00:00
Lasse R.H. Nielsen
511bf8a80f Add nonNulls, indexed and other extensions on iterables.
Also adds `firstOrNull`, `lastOrNull`, `singleOrNull`, and `elementAtOrNull`.

I chose `nonNulls` instead of `whereNotNull()`.
The latter should have been a getter, but isn't.
Making it a getter in the platform libraries would be confusing,
and make migrating from `package:collection`'s function harder,
so instead I gave it a completely new name.
The alternative would be to retain the non-idiomatic `whereNotNull()`
for familiarity. But then it would be tool late to fix.



Fixes #49928

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

CoreLibraryReviewExempt: Everybody's on vacation, everybody everywhere.
Change-Id: If464e3bd6bc97cbeefc3e5084b4cbaadac3f1e95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290760
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-04-04 23:05:54 +00:00
Lasse R.H. Nielsen
5573ce7b84 Make Iterable be the default implementation of itself.
Makes `Iterable` a mixin class with a `const` constructor,
and `IterableBase` and `IterableMixin` (to-be-deprecated) aliases
for it.

Combining everything in one place avoids (some) code
duplication.

Also gave the methods a quick overhaul for formatting,
removing uses of `late` and unnecessary element accesses,
and some general tweaks.

CoreLibraryReviewExempt: Refactoring of redundant types.
Tested: Refactoring. If existing tests work, it works.
Change-Id: Ie49a88f713d386d2d118c53606a71bdd50e1eb11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287600
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-04-04 21:45:19 +00:00
Lasse R.H. Nielsen
f51e9d1dda Make RegExpMatch.pattern have type RegExp.
It's always a RegExp, so it's a safe change.
It's also a very, very rarely used property,
since nobody ever noticed that it wasn't typed optimally.

Tested: Type change of getter to actual type of value. No new test.
CoreLibraryReviewExempt: Aske is out.
Change-Id: Ifb560a80c3cdb05be0164c593383539dc10ec0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267961
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-04-04 20:34:36 +00:00
Brian Quinlan
9c702bc72e Add Dart 3 class modifiers to dart:io.
Change-Id: Ia6eda18bb4ad6ae9f2705846e262f793f73d1e4f
Tested: class type changes
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291343
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-04-04 19:06:21 +00:00
Lasse R.H. Nielsen
2f7213342b Add record-related wait extensions on Future tuples.
With the addition of records, it now makes sense to create an API
for parallelizing of futures of different types, like `Future.wait`
does for collections of same-typed futures.

The `wait` getters here apply to tuples of 2-9 futures of distinct types, which should be enough for most reasonable uses.

Planned addition for Dart 3.0.



CoreLibraryReviewExempt: Everybody's on vacation, everybody everywhere.
Change-Id: Iaa814e02e2274082bb8a29b9a18b4930bcc953bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288903
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-04-04 11:39:49 +00:00
Lasse R.H. Nielsen
67797ef46f Add more class modifiers to dart:collection.
Pure interfaces made `interface`s
implementation classes which cannot/should not be extended made `final`.

A class like `HasHMap` which provides the `Map` interface,
and no implementation except factory constructors
for internal implementations, is made `final`.

Unified {List,Set,Map}{Base,Mixin} into their `Base` class.
Deprecations are retained in comments for now, to be landed
separately. Search for '// TODO: @Deprecated'.

Tested: No new test, only adding restrictions on use.
CoreLibraryReviewExempt: Everybody's on vacation, everybody everywhere.
Change-Id: Ia83b8a3bb20b5b214546b328d4492de6658253db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288240
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-04-04 10:39:48 +00:00
pq
3fdca4b605 linter 1.35.0
Change-Id: Ic47ce4740cfd17a7fa774c3b63f911c7f074e588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-04-03 23:57:03 +00:00
Brian Quinlan
17ea08c10c Document that IPv4 are preferred in socket.connect.
Bug: https://github.com/dart-lang/sdk/issues/50868
Change-Id: I8186d95d1a24c77c4cfade533af26695c7a13b24
CoreLibraryReviewExempt: documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293020
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-04-03 23:48:13 +00:00
Srujan Gaddam
e95b84ed41 [dart2js] Fix native null assertions for Dart 3
Allows the following semantics:
- If the disable flag is passed, never check
- If we're in non-sound mode, never check to avoid a breaking
change (this was the behavior before)
- If the enable flag was passed and we're in sound mode,
always check
- If we're in sound mode and with >= -03, don't check

Discussion in https://github.com/dart-lang/sdk/issues/50710

Change-Id: If83aaebb2745e4c8bcaa3f5a38ff41d79a869b8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289451
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-04-03 18:05:28 +00:00
Lasse R.H. Nielsen
f0e099ec5b Add DateTime.timestamp() constructor for "now as UTC".
Change-Id: I497f335b1f1eb0f691c2d44557c50f0f55358426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292003
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-03-31 20:52:31 +00:00
Sigurd Meldgaard
6424b82eed Bump pub to 196e89e5716d64b2954021e6ac9bb5a20d975fc6
Changes:
```
> git log --format="%C(auto) %h %s" b615e9e..196e89e
 https://dart.googlesource.com/pub.git/+/196e89e5 Make --example be the default (3856)

```

Diff: https://dart.googlesource.com/pub.git/+/b615e9e1f5c5c525c23b08c0e7ff42599c9dcbea..196e89e5716d64b2954021e6ac9bb5a20d975fc6/
Change-Id: I745d5154a5c0b223e413c62eafd90f5a0a06a0a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292323
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-03-31 12:26:43 +00:00
Lasse R.H. Nielsen
9e76983782 Reland "Add more interface and final modifiers to dart:core."
This is another reland of 4f8333e80e.
Third time is the charm.

CoreLibraryReviewExempt: Reland of accepted CL.
Change-Id: I4ea8326af91c168b044d252162571d3fe697e4b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289826
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-30 20:34:09 +00:00
Sam Rawlins
217e96c22a Bump linter to e80471506fa05b097a2657e46a033effb81d975a
This includes fixes to refer to `WarningCodes` by the name
`WarningCode`, which will fix google3 tests.

Change-Id: Ic56775a4b1b03acd89962d55e1ce98304501b900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291360
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-03-28 00:41:31 +00:00
Sam Rawlins
85f17f1de1 Bump linter to widen reportError parameter type
There should be no additional lint reported with this bump.

Bug: https://github.com/dart-lang/sdk/issues/51678
Change-Id: Ia8791e658a86cbc8241468d80c783affc34ed80a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291046
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-27 16:24:48 +00:00
Sam Rawlins
9efaeb5da3 Add CHANGELOG 3.0.0 entries for Analyzer
Change-Id: I3333cf7346ee4a7d104762ccf55677413d39a6ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291140
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-27 15:07:47 +00:00
Zach Anderson
fa0c81efe1 Revert "Reland "[ Observatory ] Disable serving Observatory by default""
This reverts commit fb1516c4ea.

Reason for revert: https://github.com/flutter/flutter/issues/123516

Original change's description:
> Reland "[ Observatory ] Disable serving Observatory by default"
>
> This reverts commit 5a8ddc0756.
>
> Reason for reland: fix for failing Flutter test landed upstream
> in https://github.com/flutter/flutter/pull/122419
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: I1152296828428e118ccba11025f25f6b1dbbb0f3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290921
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

Change-Id: I4e35f93ef4ac46c6dbd905903496a27107eb8329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291180
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-27 14:42:01 +00:00
Ben Konyi
fb1516c4ea Reland "[ Observatory ] Disable serving Observatory by default"
This reverts commit 5a8ddc0756.

Reason for reland: fix for failing Flutter test landed upstream
in https://github.com/flutter/flutter/pull/122419

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: I1152296828428e118ccba11025f25f6b1dbbb0f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290921
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-24 13:25:30 +00:00
Sigmund Cherem
f72782ce9b [dart2js]: require dart2js to be invoked from an approved CLI
The dart2js snapshot is not meant to be invoked directly except from
a limited set of entry points (CLIs and internal build systems).
This change makes it an error to invoke it in unsupported ways.

Note: this change is not expected to be visible to end users.

Fixes #51695

Change-Id: I4013dd00b90bb3d54483e2f112e0ddfb8dc694e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289885
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-03-23 01:58:58 +00:00
Joshua Litt
884f42a4f4 [js_util] Make callMethod take an Object method.
CoreLibraryReviewExempt: Minor refactor of web only library.
Change-Id: I7afc4a00501ac12c1aa0248305001a978f2e9f8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288641
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-03-23 00:23:00 +00:00
Kevin Chisholm
2c51b82565 Update changelog
Change-Id: Idd2830fa764347030b82157a4faa06bac3d36a52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288550
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-03-15 11:02:07 +00:00