Commit graph

1251 commits

Author SHA1 Message Date
Parker Lougheed 9ac6332c67 [release] Minor fixes and cleanup to recent changelog entries
- Updates a few broken links
- Fixes a few spelling mistakes
- Standardizes formatting in recent entries
- Provides a few more details where helpful

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reason for revert: b/289195983

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

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

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

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

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

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

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

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

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

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

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

All are abstract classes with only abstract instance members.

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

Hope to cherry pick this for 3.0.3

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

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

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

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

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

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

Modifies CHANGELOG to announce breaking change.

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

Modifies the CHANGELOG to communicate the breaking change.

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

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

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

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

TEST=Existing tests

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

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

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



Fixes #49928

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

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

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

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

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

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

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

Planned addition for Dart 3.0.



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

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

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

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

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

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

```

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

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

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

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

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

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

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

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

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

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

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

Fixes #51695

Change-Id: I4013dd00b90bb3d54483e2f112e0ddfb8dc694e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289885
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-03-23 01:58:58 +00:00
Joshua Litt 884f42a4f4 [js_util] Make callMethod take an Object method.
CoreLibraryReviewExempt: Minor refactor of web only library.
Change-Id: I7afc4a00501ac12c1aa0248305001a978f2e9f8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288641
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-03-23 00:23:00 +00:00
Kevin Chisholm 2c51b82565 Update changelog
Change-Id: Idd2830fa764347030b82157a4faa06bac3d36a52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288550
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-03-15 11:02:07 +00:00
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
Ilya Yanok 936cdeeb2f Revert "Reland "Add more interface and final modifiers to dart:core.""
This reverts commit e293eb809d.

Reason for revert: Breaks G3.

Original change's description:
> Reland "Add more `interface` and `final` modifiers to `dart:core`."
>
> This is a reland of commit 4f8333e80e
>
> Blocked on Flutter patch: https://github.com/flutter/engine/pull/40175
>
> Original change's description:
> > Add more `interface` and `final` modifiers to `dart:core`.
> >
> > Make intent explicit for classes which are intended as interfaces,
> > or which are not intended to be subclassed.
> >
> > Mainly classes which are pure interfaces are marked as such,
> > and platform-specific classes not intended for subclassing
> > are made `final`.
> >
> > The `final` classes includes `BigInt`, which is written to assume
> > that arguments inherit its private members
> > (it runs `_ensureSystemBigInt` on arguments).
> >
> > It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> > which are just intended as stand-alone implementation classes for accessing
> > platform-specific functionality.
> >
> > Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
> > Reviewed-by: Aske Simon Christensen <askesc@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
>
> CoreLibraryReviewExempt: Accepted in original CL.
> Change-Id: Id713edede4228801bb097a64734be4f2187f51a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288206
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I05ff2fe44e5a13f20725eb122963d20243062c7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288503
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-03-13 16:08:31 +00:00
Lasse R.H. Nielsen e293eb809d Reland "Add more interface and final modifiers to dart:core."
This is a reland of commit 4f8333e80e

Blocked on Flutter patch: https://github.com/flutter/engine/pull/40175

Original change's description:
> Add more `interface` and `final` modifiers to `dart:core`.
>
> Make intent explicit for classes which are intended as interfaces,
> or which are not intended to be subclassed.
>
> Mainly classes which are pure interfaces are marked as such,
> and platform-specific classes not intended for subclassing
> are made `final`.
>
> The `final` classes includes `BigInt`, which is written to assume
> that arguments inherit its private members
> (it runs `_ensureSystemBigInt` on arguments).
>
> It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> which are just intended as stand-alone implementation classes for accessing
> platform-specific functionality.
>
> Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

CoreLibraryReviewExempt: Accepted in original CL.
Change-Id: Id713edede4228801bb097a64734be4f2187f51a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288206
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-13 15:21:30 +00:00
Lasse R.H. Nielsen 7d4ad1706e Adding class modifiers to dart:math.
Just adds `interface` modifier to `Random`.

Change-Id: I221a97a3c941befb9039a14d6ba827ab095837ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288207
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-03-13 14:01:26 +00:00
Ben Konyi edead9cfd1 [ 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>
2023-03-10 16:01:41 +00:00
Lasse R.H. Nielsen c974c70f31 Add boolean parse
Closes https://github.com/dart-lang/sdk/pull/51026

Co-authored-by: Renato Burton <renatoburton96@gmail.com>
GitOrigin-RevId: e85a56ce338476b38eac890fac2b8ca193ca42e8
Change-Id: I60f92c594830ef0438ecd92b4c83cec609054326
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279746
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-03-09 15:14:32 +00:00
Oleh Prypin 732d1cc0a4 Revert "Add more interface and final modifiers to dart:core."
This reverts commit 4f8333e80e.

Reason for revert: causes breakages in google3

Original change's description:
> Add more `interface` and `final` modifiers to `dart:core`.
>
> Make intent explicit for classes which are intended as interfaces,
> or which are not intended to be subclassed.
>
> Mainly classes which are pure interfaces are marked as such,
> and platform-specific classes not intended for subclassing
> are made `final`.
>
> The `final` classes includes `BigInt`, which is written to assume
> that arguments inherit its private members
> (it runs `_ensureSystemBigInt` on arguments).
>
> It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> which are just intended as stand-alone implementation classes for accessing
> platform-specific functionality.
>
> Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I94ff95f72410a4e1ae80744971c4c920fecc1493
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287760
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-09 13:09:57 +00:00
Lasse R.H. Nielsen 4f8333e80e Add more interface and final modifiers to dart:core.
Make intent explicit for classes which are intended as interfaces,
or which are not intended to be subclassed.

Mainly classes which are pure interfaces are marked as such,
and platform-specific classes not intended for subclassing
are made `final`.

The `final` classes includes `BigInt`, which is written to assume
that arguments inherit its private members
(it runs `_ensureSystemBigInt` on arguments).

It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
which are just intended as stand-alone implementation classes for accessing
platform-specific functionality.

Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-09 12:31:08 +00:00
Joshua Litt 25779cc933 [js] Ensure dartify / jsify have inverse semantics.
CoreLibraryReviewExempt: Minor change to the internal of a web backend specific API.
Change-Id: I450e9410af7e006b853e2d8f26dc5ede1d95f4e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245621
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-03-08 00:07:42 +00:00
Robert Nystrom c33ece3515 Roll dart_style into the SDK.
This contains support for all of the 3.0 language features. It also
contains a couple of very minor style changes. Unlike the previous
reverted roll (https://dart-review.googlesource.com/c/sdk/+/285460),
this does *not* contain the style change to support compact switch
statements. This should eliminate most of the style churn.

Change-Id: I95dd73a3a921b4a0cd278a7abb86daf8eea21397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286701
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-03-03 18:53:20 +00:00
Lasse R.H. Nielsen cc736dfb65 [flip-modifiers]: Reapply "Enforce current library restrictions."
This reapplies commit 0c05e33836
and reverts the revert 029e0cec71.

Tested: Added few new tests, updated existing. Mainly regression testing.
CoreLibraryReviewExempt: Reviewed in original CL.
Change-Id: Ifcc79ce2f9375f607722643a04957b0961e6c295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284304
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-03 09:37:38 +00:00
Oleh Prypin 88ac4a27a1 Revert "Roll the latest dart_style into the SDK."
This reverts commit bbba3c9788.

Reason for revert: latest dart_style has a few bugs and overall the changes should be discussed more

Original change's description:
> Roll the latest dart_style into the SDK.
>
> This includes support for records, patterns, sealed classes, and class
> modifiers. It also includes a fairly small number of style changes. The
> one that will be most noticeable is more compact switch statements.
>
> Change-Id: I9e89ba82d52bfa451fc54f9dd59048d72db48377
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285460
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>

Change-Id: I12fad53bdc75dda349b9362aeb84e798983bfa25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286420
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2023-03-02 13:16:36 +00:00
Robert Nystrom bbba3c9788 Roll the latest dart_style into the SDK.
This includes support for records, patterns, sealed classes, and class
modifiers. It also includes a fairly small number of style changes. The
one that will be most noticeable is more compact switch statements.

Change-Id: I9e89ba82d52bfa451fc54f9dd59048d72db48377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285460
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-03-01 16:08:40 +00:00
Sam Rawlins 85154631c9 Bump linter to dcf3a079c573487b6ab64518604e5686be899601
We need the fix for https://github.com/dart-lang/linter/issues/4077 in
order to land https://dart-review.googlesource.com/c/sdk/+/282661

Change-Id: I472455dd24e6ef49095c20b1ab9912051a942d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284540
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-02-22 02:00:48 +00:00
Ilya Yanok 029e0cec71 Revert "Enforce current library restrictions."
This reverts commit 0c05e33836.

Reason for revert: breaks ~10% of G3 smoke suite.

Original change's description:
> Enforce current library restrictions.
>
> Mark all currently unimplementable types as `final`, or `sealed` for `num` and `final` for `Function`.
> Mark all current classes intended as mixins as `mixin class`.
>
> More additions and cleanup will follow,
> but this change should make everything keep working as today
> if we flip the switch.
>
> TEST= No new tests, very little actual change, covered by existing tests with few changes. Will add more tests when adding more modifiers.
>
> Change-Id: I40e724f823e7f88cdef186d2f73874df256e2f43
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281683
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Kallen Tu <kallentu@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ib0cb5b7ec1a8c392bbf9bf4af8dc3efc0b27991d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284187
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-02-20 15:29:41 +00:00
Lasse R.H. Nielsen 0c05e33836 Enforce current library restrictions.
Mark all currently unimplementable types as `final`, or `sealed` for `num` and `final` for `Function`.
Mark all current classes intended as mixins as `mixin class`.

More additions and cleanup will follow,
but this change should make everything keep working as today
if we flip the switch.

TEST= No new tests, very little actual change, covered by existing tests with few changes. Will add more tests when adding more modifiers.

Change-Id: I40e724f823e7f88cdef186d2f73874df256e2f43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281683
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2023-02-18 12:37:40 +00:00
Sam Rawlins 4e614d299c Bump linter to 85d62c18e2a353abd4905aaf86e05dd1fc9d7b9a
Brings in support for https://github.com/dart-lang/sdk/issues/50796

Change-Id: Ifd6f20760e0cb8e1a4090e0f36d9a0d68d867f76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283401
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2023-02-16 23:19:10 +00:00
Ahmed Ashour 50938dc767 Update CHANGELOG for continue label
Fixes #50902

Change-Id: I698d7a2531b30e398ff22a3fd7226e12df195f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279343
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-02-08 17:44:17 +00:00
William Hesse d5202981b0 Update changelog with 2.19.1 and 2.19.2 hotfix release notes
Change-Id: I1ab6cdb8c305aaee492a26dfffcd013709a484f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281680
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-02-08 14:33:50 +00:00
pq ad2da86f18 linter 1.33.0 rc
Some notes.

* There are a number of tests that should get decoupled from the linter being pulled into `DEPS`.  Instead of depending on the state of lints there, we should update the tests instead to use a more hermetic environment.  (See for example `options_rule_validator_test.dart` for how that might look.)


Downstream (blocking) fixes:

* https://github.com/flutter/flutter/pull/119736
* https://github.com/flutter/gallery/pull/878


Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280054
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-02-07 20:56:35 +00:00
Sigurd Meldgaard 39136c1501 Bump pub to 048e3ad2b5e1b4ebe6883addbc95722be6904a7b
Changes:
```
> git log --format="%C(auto) %h %s" 0cbaf7a..048e3ad
 https://dart.googlesource.com/pub.git/+/048e3ad2 Add a spinner while validating before publishing (3776)
 https://dart.googlesource.com/pub.git/+/e5fdcf81 Fix terminal-detection logic for progress bar (3775)
 https://dart.googlesource.com/pub.git/+/16a79e2a Fix `global deactivate` on case-insensitive but case-preserving file systems (3774)
 https://dart.googlesource.com/pub.git/+/7493fad6 Updated documentation on entrypoint.acquireDependencies (3771)
 https://dart.googlesource.com/pub.git/+/faf9fa7e Info when publishing <3.0.0 constraint that is interpreted as <4.0.0 (3752)
 https://dart.googlesource.com/pub.git/+/bfaf3585 Validate package name in `pub global activate` (3735)
 https://dart.googlesource.com/pub.git/+/e84eefea Verify token characters when added and when used (3732)
 https://dart.googlesource.com/pub.git/+/60576f89 Correct spelling of 'publishing' (3767)
 https://dart.googlesource.com/pub.git/+/cb2f4b34 Bump actions/checkout from 3.2.0 to 3.3.0 (3763)
 https://dart.googlesource.com/pub.git/+/fc06561d Bump dart-lang/setup-dart from 1.3 to 1.4 (3764)
 https://dart.googlesource.com/pub.git/+/c6af8ff0 `dart pub remove`: Remove top-level key if empty after operation. (3758)
 https://dart.googlesource.com/pub.git/+/37692d8d Stop using always_throws (3765)
 https://dart.googlesource.com/pub.git/+/3ce46a32 Normalize pub.dartlang.org to pub.dev when reading lockfile (3754)
 https://dart.googlesource.com/pub.git/+/ab86f1e0 Add missing space in directory help text (3756)
 https://dart.googlesource.com/pub.git/+/14b13103 Fix `outdated`s handling of non-existent packages (3751)
 https://dart.googlesource.com/pub.git/+/56be1ca4 Fix typos in `dart pub add --help` (3750)
 https://dart.googlesource.com/pub.git/+/f698c43d Merge pull request 3746 from dart-lang/cherry_pick_conditional_sdk_rewrite
 https://dart.googlesource.com/pub.git/+/1bfb295d Merge branch 'master' into cherry_pick_conditional_sdk_rewrite
 https://dart.googlesource.com/pub.git/+/20f7daa9 Validate files don't differ in case only (3740)
 https://dart.googlesource.com/pub.git/+/9f41ae10 Only rewrite sdk constraints after dart 3
 https://dart.googlesource.com/pub.git/+/ea11b0d2 Only rewrite sdk constraints after dart 3 (3739)
 https://dart.googlesource.com/pub.git/+/12a2af4d Add and enforce require_trailing_commas (3728)
 https://dart.googlesource.com/pub.git/+/27c5cbd5 Only output errors during implicit resolution (3689)
 https://dart.googlesource.com/pub.git/+/e51b160b Remove features for migrating to null safety (3713)
 https://dart.googlesource.com/pub.git/+/f3cf3ac9 Add dependency kind information to `outdated --json` (3714)
 https://dart.googlesource.com/pub.git/+/0ee46ee0 Don't warn about overrides (3684)

```

Diff: https://dart.googlesource.com/pub.git/+/0cbaf7a2fb8c8ca543c6f222bf25d5f5c63abbf3..048e3ad2b5e1b4ebe6883addbc95722be6904a7b/
Change-Id: I9558072f3057c028f94c786f1dcdd8f48f42f39b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281400
Reviewed-by: Sarah Zakarias <zarah@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-02-07 15:01:53 +00:00
Dan Chevalier deca6a66e7 Reland "Update HTTP Profiling ids to use Strings"
This is a reland of commit e7d8261f9a




Original change's description:
> Update HTTP Profiling ids to use Strings
>
> The internal Dart Ids can be 64 bit integers, and are passed to Dev Tools as integers. This is causing errors fetching requests as the ids can overflow once they get to dev tools.
>
> Interaction between `getHttpProfile` and `getHttpProfileRequest` are already performed in https://dart-review.googlesource.com/c/sdk/+/279122/3/pkg/vm_service/test/get_http_profile_test.dart
>
> https://github.com/flutter/devtools/issues/2860
>
> TEST=The original tests test the surface of the RPCs that are updated here. Any tests that needed tweaking have also been fixed. https://github.com/flutter/devtools/pull/5127 is being submitted to Devtools and G3, and the regressions have been tested against vm_service:10.0.0 and vm_service:11.0.0
> CoreLibraryReviewExempt: Changes are only to http profiling
> Change-Id: Ie560dde7629f91f4221c1fe18d153cd999691086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279122
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Dan Chevalier <danchevalier@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TEST=The original tests test the surface of the RPCs that are updated here. Any tests that needed tweaking have also been fixed. https://github.com/flutter/devtools/pull/5127 is being submitted to Devtools and G3, and the regressions have been tested against vm_service:10.0.0 and vm_service:11.0.0
CoreLibraryReviewExempt: Changes are only to http profiling
Change-Id: I132f30111ca9c4c53dec377f6038453cacfc6243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280020
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-02-02 19:22:49 +00:00
Oleh Prypin 74849bae46 Revert "Update HTTP Profiling ids to use Strings"
This reverts commit e7d8261f9a.

Reason for revert: will not be able to roll devtools_app (at least in google3) with this backwards-incompatible change

Original change's description:
> Update HTTP Profiling ids to use Strings
>
> The internal Dart Ids can be 64 bit integers, and are passed to Dev Tools as integers. This is causing errors fetching requests as the ids can overflow once they get to dev tools.
>
> Interaction between `getHttpProfile` and `getHttpProfileRequest` are already performed in https://dart-review.googlesource.com/c/sdk/+/279122/3/pkg/vm_service/test/get_http_profile_test.dart
>
> https://github.com/flutter/devtools/issues/2860
>
> TEST=The original tests test the surface of the RPCs that are updated here. Any tests that needed tweaking have also been fixed
> CoreLibraryReviewExempt: Changes are only to http profiling
> Change-Id: Ie560dde7629f91f4221c1fe18d153cd999691086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279122
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Dan Chevalier <danchevalier@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,asiva@google.com,sigmund@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,danchevalier@google.com

Change-Id: I9b6c9ec1cb00cca56816959fc83a70ec35ac9b21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279980
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
2023-01-26 16:42:26 +00:00
Dan Chevalier e7d8261f9a Update HTTP Profiling ids to use Strings
The internal Dart Ids can be 64 bit integers, and are passed to Dev Tools as integers. This is causing errors fetching requests as the ids can overflow once they get to dev tools.

Interaction between `getHttpProfile` and `getHttpProfileRequest` are already performed in https://dart-review.googlesource.com/c/sdk/+/279122/3/pkg/vm_service/test/get_http_profile_test.dart

https://github.com/flutter/devtools/issues/2860

TEST=The original tests test the surface of the RPCs that are updated here. Any tests that needed tweaking have also been fixed
CoreLibraryReviewExempt: Changes are only to http profiling
Change-Id: Ie560dde7629f91f4221c1fe18d153cd999691086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279122
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-01-26 15:08:56 +00:00
Josh Soref 01b28894e7 Spelling pkg dev compiler
Closes https://github.com/dart-lang/sdk/pull/50861

GitOrigin-RevId: 71005e6f5bf5a151cb5c1aefb6a2a300fc40f592
Change-Id: Iadfafb5787a62e9a379437f6a3763d31f99ba7c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277743
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-26 09:12:41 +00:00
Josh Soref ef42a0b110 Spelling pkg analyzer lib
Closes https://github.com/dart-lang/sdk/pull/50860

GitOrigin-RevId: b27066c37f93c8c6d1123d6ebd6a4c0afcf59844
Change-Id: I15fa4aea1dad45daf168e34d1c4450320ec9b40a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277742
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-01-25 14:08:27 +00:00
Josh Soref f7a2ea5e06 Spelling
Closes https://github.com/dart-lang/sdk/pull/50922

GitOrigin-RevId: 58fd7cfd5ef470a65a52ea28e0407244d853c917
Change-Id: I2e5a5ed991cb05270170a18b8f0169daa9eabdb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278537
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-24 18:00:25 +00:00
Alexander Thomas b9b6511ca6 Spelling sdk
Closes https://github.com/dart-lang/sdk/pull/50918

Co-authored-by: Josh Soref <jsoref@gmail.com>
GitOrigin-RevId: 1fd275051c561b63d374fb47e76a22424c4a12a9
Change-Id: I97790d9c79ff659f2c1fa2d2d46d041fe67957cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278530
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-01-20 12:37:49 +00:00
Josh Soref 9e4dc755cb Spelling pkg
Closes https://github.com/dart-lang/sdk/pull/50921

GitOrigin-RevId: 6b1ca502b6722b0a987f33ace66f65cbd2c24e23
Change-Id: I74e4ff3c8e759c576036d6b791bd7734ebd215d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278536
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-19 10:06:29 +00:00
Paul Berry 8b2d39471e Update CHANGELOG to reflect removal of dart migrate
Bug: https://github.com/dart-lang/sdk/issues/50319
Change-Id: Ic9ff1aa3432f3ec37feaecaf3f35b43363b76003
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278539
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2023-01-09 18:06:16 +00:00
Lasse R.H. Nielsen 8a891ba869 Deprecate HasNextIterator.
Bug: https://dartbug.com/50883
Change-Id: I983e07072052a0538e4c04cc66e7fd2ad2bc1242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278121
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-01-09 12:14:33 +00:00
Kevin Chisholm 68358bceee update changelog to reflect Metrics API deprecation
Change-Id: I92138c3a1dbf6be150f9b695d759034d2058d365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278531
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-01-06 15:56:58 +00:00
Nicholas Shahan 8e1f57666e [3.0 alpha][ddc] Remove unused command line args
The `-k`, `--kernel`, and `--dart-sdk` arguments have been
ignored since v2.8.1.

Change-Id: I28e793f3e2023cc09c279ca65d08295b1ed11028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276771
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-01-03 20:14:12 +00:00
Lasse R.H. Nielsen 81b137d8fe [3.0 alpha] Remove deprecated BidirectionalIterator.
Requires releasing `package:quiver` 3.2.0 so Flutter can upgrade to that.


Change-Id: Ibd9acc5fa11a67ca50d06172dfe0f9175b240522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276741
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-01-02 16:14:08 +00:00
Brian Quinlan 9b2b9df09e [io] Remove incorrect docs that listSupport is not available on Android.
Bug:https://github.com/dart-lang/sdk/issues/47894
Change-Id: Id79a37f5ba6a8118a30d2297c95cff5a7ca1a03f
TEST=unit
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276660
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2022-12-21 00:23:02 +00:00
Vyacheslav Egorov 13978f85fd [lib] Update SendPort.send documentation
Try to make it more clear that you can only send default
implementations of List, Map, Set, etc.

Add CHANGELOG.md entry that documents a8fe399c79

Related to https://github.com/dart-lang/sdk/issues/50594

Change-Id: Ib0cf9d389b91cc5ab72b8bab5461ee91037baf25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273185
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-12-19 16:03:46 +00:00
Michael Thomsen 6bbe71fbbb Add missing API removal changelog changes
Change-Id: I444f94b9ef712de6e2203b67965e792eb33c5893
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276101
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-12-19 09:51:38 +00:00