1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 09:20:04 +00:00
Commit Graph

1308 Commits

Author SHA1 Message Date
Srujan Gaddam
4a2cd36a3d [dart:js_interop(_unsafe)] Add changelog entries for importModule and has
Change-Id: I4ccc48f9acca6796f46db73bb48dd3b1adeb4bbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345141
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-01-06 01:03:28 +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
Srujan Gaddam
3a80ec26be Reland "[dart2wasm] Disallow use of old interop libraries"
Includes small wording modifications and extra allowlisting for
benchmarks and Flutter engine tests.

This reverts commit c97a17b2349bcbdadd34204a65a9e7c7c13def83.

Change-Id: I2db391782c98c351d744ea7201c9421f13b97979
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343689
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-01-02 21:14:50 +00:00
Srujan Gaddam
5f34ac9fa0 Revert "[dart2wasm] Disallow use of old interop libraries"
This reverts commit 8c246caa91.

Reason for revert: Need to allowlist benchmarks to use package:js.

Original change's description:
> [dart2wasm] Disallow use of old interop libraries
>
> Closes https://github.com/dart-lang/sdk/issues/54004
>
> Adds an error for imports of old interop libraries. Has an
> allowlist for existing usages/migrated usages that we'll need
> to migrate.
>
> Change-Id: Ie7174ae2a50c2d03a7aa2975e8a1914a4cba8a2c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342521
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

Change-Id: Id7d3a3063d417830774d7a72eed5185599f9267f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343685
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-12-28 16:22:21 +00:00
Srujan Gaddam
8c246caa91 [dart2wasm] Disallow use of old interop libraries
Closes https://github.com/dart-lang/sdk/issues/54004

Adds an error for imports of old interop libraries. Has an
allowlist for existing usages/migrated usages that we'll need
to migrate.

Change-Id: Ie7174ae2a50c2d03a7aa2975e8a1914a4cba8a2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342521
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-12-27 18:31:37 +00:00
Srujan Gaddam
6fbd07f2b0 [dart:js_interop] Reach (mostly) parity with js_util
https://github.com/dart-lang/sdk/issues/54004

In order to reach parity with js_util, we expose operators
through an extension and do some partial renames in order
to make the member names sound better e.g. `equals` instead
of `equal`. We also expose the following from js_util:

- NullRejectionException

We don't expose `isJavaScriptArray` and `isJavaScriptSimpleObject`
as they can expressed through other forms of interop. There
was an esoteric bug where we needed these members for Firefox
in pkg:test, but the package no longer uses these members, so to
avoid increasing the API space too much, we do not export them.

For the same reason, we also don't expose `objectGetPrototypeOf`,
`objectPrototype`, `objectKeys`.

We don't expose `allowInteropCaptureThis` as it will take some
work to handle this in dart2wasm. That work is tracked in
https://github.com/dart-lang/sdk/issues/54381.

Lastly, `instanceof` and `instanceOfString` is moved to be on
`JSAny?`, as this operator is useful to avoid needing to
downcast to `JSObject` e.g. `any.instanceOfString('Window')`
instead of `any.typeofEquals('object') &&
(any as JSObject).instanceOfString('Window')`.

Extensions are reorganized and renamed to handle these changes.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: Ib1a7fabc3fa985ef6638620becccd27eeca68c25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341140
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-12-25 20:02:49 +00:00
Simon Binder
150e61a662 [vm/ffi] Support @Native fields
Allow annotating top-level or static fields with `@Native` to create
fields backed by native memory.
By using the `_addressOf` operator implemented in the VM, these fields
can be implemented in the CFE by replacing them with accessors looking
up the pointer and then using existing methods to load and store the
value.

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

TEST=tests/ffi/native_assets/asset_*_test.dart
TEST=pkg/analyzer/test/src/diagnostics/ffi_native_test.dart

CoreLibraryReviewExempt: VM & dart2wasm only feature
Change-Id: I61dccc88076723d6a6ba02d7fd848b18e4caf780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338020
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-12-15 11:20:23 +00:00
Srujan Gaddam
e6a313568c [dart:js_interop] Add generics to JSArray and JSPromise
In order to support this, adds necessary changes to conversion
functions (including cast-lists) and makes JSArrayImpl a generic
type.

CoreLibraryReviewExempt: Backend-specific library changes.
Change-Id: I58bcfb67ef21c90be5e25735757d780aac52dc23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337923
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-12-12 04:50:13 +00:00
Paul Berry
004f564f40 Allow "field promotion" to apply to abstract getters.
A quirk of analyzer and CFE implementations is that they resolve
property gets such as `foo.bar` to specific field or getter
declarations that may be not be directly defined on the target type;
for example if `foo` has type `B`, and `B` extends `A`, and `A`
contains a field called `bar`, then `foo.bar` is considered to refer
to `A.bar`, for example:

    class A {
      int? bar;
    }
    class B extends A {}
    f(B foo) {
      print(foo.bar); // Resolved to `A.bar`.
    }

This is in contrast with the language specification, which makes a
clean distinction between class _declarations_ and the _interfaces_
implied by those declarations. While a class declaration can contain
(among other things) both getters and fields, which might be concrete
or abstract, an interface doesn't distinguish between getters and
fields, and is inherently abstract.

The advantage of the analyzer/CFE approach is that it allows more
intuitive error messages and "go to definition" behavior, which
benefits users. But it has some ill-defined corner cases involving
complex class hierarchies, because not every property access can be
resolved to a unique declaration (sometimes a getter is multiply
inherited from multiple interfaces, for example). The language spec
approach has the advantage of being well-defined and consistent even
in situations involving complex class hierarchies.

When I initially implemented field promotion, I took advantage of this
quirk of the analyzer and CFE implementations, so that I could make
property gets that refer to field declarations promotable, while
keeping property gets that refer to abstract getter declarations
non-promotable. This caused unpredictable behaviors in the ill-defined
corner cases. It also meant that in certain rare cases, a property
access might not be promoted even when it would be sound to do so
(e.g. a property access might refer to a private abstract getter
declaration, but the only concrete _implementation_ of that abstract
getter was a final field).

This CL changes the rule for promotability so that any get of a
private property is considered promotable, provided that the
containing library doesn't contain any concrete getters, non-final
fields, or external fields with the same name. It no longer matters
whether the private property refers to a field or a getter. This rule
is simpler than the old rule, restores the spec's clean distinction
between class declarations and interfaces, and allows more promotions
without sacrificing soundness.

For additional details please see the breaking change announcement at
https://github.com/dart-lang/sdk/issues/54056, as well as the original
change proposal at https://github.com/dart-lang/language/issues/3328.

Fixes https://github.com/dart-lang/sdk/issues/54056.
Fixes https://github.com/dart-lang/language/issues/3328.

Change-Id: I38ffcb9ecce8bccb93b1b2586a1222a0fb1005a7
Bug: https://github.com/dart-lang/sdk/issues/54056
Bug: https://github.com/dart-lang/language/issues/3328
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337609
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-12-07 23:40:27 +00:00
Alexander Thomas
d4dcde2f4b [release] Add release notes for 3.2.3 stable
Change-Id: I65d9ddd93f2e41f1a8dbea799c074355636891f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340320
Reviewed-by: William Hesse <whesse@google.com>
2023-12-07 07:47:06 +00:00
Srujan Gaddam
b1a7ca77e0 [dart:js_interop] Move JS types to extension types
- Removes @staticInterop JS types declarations in favor of
typedefs (the function types' reified types and the typed data's
reified types have changed to make the type hierarchy work in the
JS backends).
- Adds extension types to dart:js_interop
- Adds a fromInteropObject helper to JSObject to avoid casting to
an extension type
- Deletes now stale tests
- Refactors some dart2wasm @staticInterop declarations since they
can no longer implement JS types
- Updates extension types tests to use the prefix extension_type
instead of inline_class
- Updates comments

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: Ibe04afac9585ddb99fcf6dbaa7f12050d8b876dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332860
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-12-06 21:59:58 +00:00
Mayank Patke
4e3cc1cb41 [dart2js] Don't minify Invocation.memberName
Fixes: #54201
Change-Id: I3cc66263a86668ee46743e46564b175d60143916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338947
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-12-06 18:57:15 +00:00
Alexander Thomas
9b4c2f01b6 [release] Add 3.2.1 and 3.2.2 release notes from stable
Change-Id: I5da5d7154a04da8de062a489a13b69cee0779710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339402
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-05 08:24:23 +00:00
Vyacheslav Egorov
08d7e0aab2 [vm] Disable waitFor for 3.3 release
Revert "[vm] Enable waitFor for 3.2 release"

This reverts commit f8086ed78c.

R=kustermann@google.com
TEST=covered by existing tests

Bug: https://github.com/dart-lang/sdk/issues/52121
Change-Id: Ic5c7ad9af8ff142564ce237f868dd39354dfd615
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338761
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-11-29 09:29:11 +00:00
MarchMore
f621b43f95 Fixed naming in example
Closes https://github.com/dart-lang/sdk/pull/54076

GitOrigin-RevId: 6b5df842449b52dfd59c8059df78cefe0265a668
Change-Id: I53b72087186f5dc66a3f6f55b0160cb9061c46c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336822
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
2023-11-17 22:37:20 +00:00
Lasse R.H. Nielsen
a1783a9c34 String.fromCharCodes allows start and end after end of iterable.
The current `String.fromCharCodes` behavior, throwing if `start`
or `end` is larger than the length of the `charCodes` iterable,
is inconsistent with the argument being an `Iterable<int>`,
which the user is not expected to know the length of.

Most other operations that accepts or produces an `Iterable` and
restricts it to a range, will allow the range to exceed the length
of the iterable, acting like `.take(end).skip(start)`, just without
needing to create wrappers that hide the original value.

(`List.setRange` is another exception, and should probably be fixed
by allowing the range to be partially filled, since it's too hard
to change it to require a `List` argument.)

Fixes #50253, #53937

Tested: Added to `corelib/string_fromcharcodes_test.dart`
Bug: https://dartbug.com/53937, https://dartbug.com/50253, https://dartbug.com/23282
Change-Id: Ie19c5fa8e715ea1c58c9c77c247f2a563654c1aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333921
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-11-17 13:34:22 +00:00
Parker Lougheed
4830c96420 [linter] Add changelog entries for removed unrelated type lints
Change-Id: Ia55b403ef35e6ee252d36c9a86f797e0e39de1f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335540
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-11-10 19:06:42 +00:00
Nicholas Shahan
406e92dba6 [ddc] Remove implements text from custom formatter
Change-Id: I814dfc5b80ae3d59ad3ad53d22c4d40866c6d926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334004
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-11-07 00:38:34 +00:00
Nicholas Shahan
c50fcf8828 [ddc] Show "any" for type args of package js types
Ensures that `toString()` of types that contain embedded js types 
will appear the same in the old and new runtime type systems.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I71ec0e13943281e745bcf05e10aa36d093cbc0c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334003
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-11-06 22:13:17 +00:00
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