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

1187 Commits

Author SHA1 Message Date
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
Joshua Litt
ba07466c2c [js_interop] Make dartify / jsify a bit more efficient.
CoreLibraryReviewExempt: Minor refactor of the implementation of helpers in `js_util`.
Change-Id: I584bd4efbc8f4aff81f3bb62da9029ffdac3eb5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287669
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-03-14 15:39:27 +00:00
Siva Annamalai
5a8ddc0756 Revert "[ Observatory ] Disable serving Observatory by default"
This reverts commit edead9cfd1.

Reason for revert: We have some flutter framework tests that are breaking, "flutter test should respect --serve-observatory". This will apparently be fixed when https://github.com/flutter/flutter/pull/122419 lands.

Original change's description:
> [ Observatory ] Disable serving Observatory by default
>
> Observatory can still be enabled by providing `--serve-observatory` or
> invoking the `_serveObservatory` private service RPC via web socket or
> HTTP.
>
> Related to https://github.com/dart-lang/sdk/issues/50233
>
> TEST=pkg/dartdev/test/commands/run_test
>
> Change-Id: I89b000e69bb31c91a9a5386fed1ee590cdafa58c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287821
> Reviewed-by: Michael Thomsen <mit@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

Change-Id: I994c86cbca9d0eb25e1f9adddeede94c227acad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288601
Commit-Queue: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Zach Anderson <zra@google.com>
2023-03-14 00:46:59 +00:00