Commit graph

1007 commits

Author SHA1 Message Date
Michael Thomsen e69217fe28 Add CVE-2022-0451 to changelog
Change-Id: I6fffab997fbd1b63c54cfc883e10280c97a6366a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231560
Auto-Submit: Michael Thomsen <mit@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-02-03 21:25:39 +00:00
Srujan Gaddam f392f31a13 [dart:html] Add Element.scrollIntoViewIfNeeded to CHANGELOG
Change-Id: Ic7c2b3cffa62b66d5c66713958e3626fa67e1945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231331
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-02-02 22:08:35 +00:00
Kevin Moore 534608fc66 CHANGELOG: Move entry for HTTP header redirect changes to 2.16.0
Related to commits

- master branch 57db739be0
- stable (2.16.0) branch f5bb0b33f5

Change-Id: Iad8d84600c870e4b819fc6c62fbb4d6861a575de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231161
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2022-02-01 19:48:13 +00:00
Sigurd Meldgaard 0e67d987a1 Revert "Remove the pub top-level"
This reverts commit 872ffa85c2.

Reason for revert: flutter needs fixes:
https://github.com/flutter/engine/pull/31181
https://github.com/flutter/flutter/pull/97575


Original change's description:
> Remove the pub top-level
>
> The old pub toplevel interface is still reachable via
>
> ```
>  $ dart __deprecated_pub
> ```
>
> That is what `flutter pub` is using.
>
> Part of https://github.com/dart-lang/sdk/issues/46100
>
> Bug: https://github.com/dart-lang/pub/issues/3292
> Change-Id: I97a14f2458d0f67c7bf98a90664d504cfaba0e98
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229541
> Reviewed-by: Jonas Jensen <jonasfj@google.com>
> Reviewed-by: Michael Thomsen <mit@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

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

Bug: https://github.com/dart-lang/pub/issues/3292
Change-Id: Ida7ae463a78ece7ff9e5aef3fc2ef984a4ac1b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231081
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2022-02-01 12:03:05 +00:00
Sigurd Meldgaard 872ffa85c2 Remove the pub top-level
The old pub toplevel interface is still reachable via

```
 $ dart __deprecated_pub
```

That is what `flutter pub` is using.

Part of https://github.com/dart-lang/sdk/issues/46100

Bug: https://github.com/dart-lang/pub/issues/3292
Change-Id: I97a14f2458d0f67c7bf98a90664d504cfaba0e98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229541
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2022-01-28 10:04:54 +00:00
Sigmund Cherem 5173fd2d22 [ddc]: Deprecate public dartdevc scripts
Change-Id: I1fdb19e21b4d787090d98cd519e002efebac5e4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229304
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-01-27 21:13:41 +00:00
Brian Quinlan 57db739be0 Disable security-related headers on redirect.
TESTED=updated unit tests
Bug: https://github.com/dart-lang/sdk/issues/45410
Change-Id: I7c555a4818fd719d42748b6a18780e3d9b3ee147
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229947
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-01-27 20:49:42 +00:00
Sigurd Meldgaard bc7554107b Bump pub to 8f5ab7b1aba3b9f66b56246d77e167990339d317
Changes:
```
> git log --format="%C(auto) %h %s" dcb6aba..8f5ab7b
 https://dart.googlesource.com/pub.git/+/8f5ab7b1 Avoid raceconditions in `global activate`, `run` and `global run` (#3285)
 https://dart.googlesource.com/pub.git/+/6e03ec02 Support multiple packages in 'dart pub add' (#3283)
 https://dart.googlesource.com/pub.git/+/1a298f4d Fix --verbose doc, and accept verboseness setting from embedder (#3279)
 https://dart.googlesource.com/pub.git/+/5bda798c Avoid race condition for hosted source on package extraction (#3277)
 https://dart.googlesource.com/pub.git/+/17c5addb Error on acquireDependencies when the root pubspec has an unknown sdk in the environment. (#3271)
 https://dart.googlesource.com/pub.git/+/0a32ae4a folder/* should not ignore the folder itself, only the contents (#3267)
 https://dart.googlesource.com/pub.git/+/44b785aa Normalize file names for tar.gz (#3268)
 https://dart.googlesource.com/pub.git/+/2fd6b5f0 Fix repository specification: isRetracted -> retracted (#3249)
 https://dart.googlesource.com/pub.git/+/0fc71db4 Write log trace to $PUB_CACHE/log/pub_log.txt when crashing (#3240)

```

Diff: https://dart.googlesource.com/pub.git/+/dcb6abac2d7d43258c03b348be42bf4aab9529b1~..8f5ab7b1aba3b9f66b56246d77e167990339d317/
Change-Id: I54f1fde0f50ca19ca036bb1e6d9b166455031183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229542
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2022-01-27 11:17:00 +00:00
Michael Thomsen 208e7bc2e2 Remove dartdoc commands
Part of previously announced deprecation, see:
https://github.com/dart-lang/sdk/issues/46100

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

Change-Id: Ic3eaa793149da412b7520b154a0909ee59fbfb5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228647
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-01-27 08:12:00 +00:00
Sigmund Cherem 8415b70e75 [dart2js] recommend using 'dart compile js'.
This is the first deprecation step, moving towards having dart2js
under the more general dart command line interface.

Going forward 'dart compile js' is the recommended way to invoke
dart2js.

This CL adds:
* an internal flag used to detect how was dart2js invoked and
  provide a warning when invoked in an unsupported way.
* ensures the flag is provided in the dart cli, as well as our
  (developer's only) scripts. These scripts will likely move to a
  different location in the future. Note that the `dart2js_sdk*`
  scripts are not providing this flag (these are the script that get
  eventually shipped with our built SDK), as such, invokations of the
  dart2js binary will show the new warning.

Change-Id: I96e40ecf01598eadab20dfc59114f5fff7438084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229062
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-01-21 16:42:40 +00:00
Simon Binder 0a3d896274 [ffi] Add .ref= setter for pointers of structs or unions
Adds the `ref` setter to the `StructPointer` and `UnionPointer`
extensions, copying a compound structure into native memory.
The FFI use-site transformation transforms invocations of this setter
into an appropriate memcopy call.

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

TEST=tests/ffi(_2)/extension_methods_test.dart

Change-Id: I3ef06ad08b8e71e39b05d662e8082fc5d0ad876d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227542
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-01-12 20:48:28 +00:00
Kevin Moore 1bf93d73a1 CHANGELOG: move indexed_db change to 2.17
Didn't make 2.16 release

Follow-up to https://dart-review.googlesource.com/c/sdk/+/226180
and 4e28e2f21eccad6e9f63666f759365d7bb6093bc

Change-Id: Ia56060fc0198fae01c27b97230b8fc6202e738ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227583
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-01-12 07:35:33 +00:00
pq 5f68998865 linter 1.18.0
Change-Id: I227f1994a664a116c5ffdd5a081a6430b2908eaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226481
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-01-11 16:44:55 +00:00
Lasse R.H. Nielsen 7dcd2ba888 Reinstate accidentally removed CHANGELOG entry.
Change-Id: I348f07341600bb00f8878ab8d482a29b3a19d907
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226690
Auto-Submit: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-01-07 15:43:55 +00:00
Lasse R.H. Nielsen d095700f13 Add WeakReference and Finalizer to dart:core.
This adds the abstract classes with external factory constructors,
and adds throwing constructors to all backed patch files.

Further implementation can add the functionality for the backends.

This addresses part of #47773, leaving the FFI class to the
FFI implementors.

Bug: https://github.com/47773
Change-Id: Id7ee0006b6ea5ed789867a143ee6266f6dbbef66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221502
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-01-07 13:20:06 +00:00
Kevin Moore 26f5c2ae84 dart:indexed_db: deprecate IdbFactory.supportsDatabaseNames
This has been removed from modern browsers - always returns false

See https://chromestatus.com/features/5725741740195840

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

Change-Id: Ie93757f664d892ba365a99c524a8ae79466e5002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226180
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-01-03 23:45:15 +00:00
pq 18afd94995 bump to linter 1.17.1
Change-Id: I6bb19fcda3ee3a093b75626e0668812026f7c548
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-12-16 22:19:59 +00:00
Alexander Thomas d2da75a5e0 [release] Add 2.15.1 to the changelog
Change-Id: I16329c5526533bde598c0557bf3d538b42e19046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223802
Reviewed-by: Michael Thomsen <mit@google.com>
2021-12-14 12:00:35 +00:00
Michael Thomsen 5bef7fe3fb Add 2.15 release date
Fixes https://github.com/dart-lang/sdk/issues/47909

Bug: https://github.com/dart-lang/sdk/issues/47909
Change-Id: I7a2c81ba3888b52db2f69df36e17c58de7522179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223424
Reviewed-by: Alexander Thomas <athom@google.com>
2021-12-13 10:46:26 +00:00
pq 1e2de6910c bump to linter 1.16.0
Change-Id: I4a2dd67663ee56d17b91f845e6d4da6059f06072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-12-09 20:42:29 +00:00
Mo 8caaa1b9cf Added sourcePort to Socket.connect()/startConnect() as optional parameter.
This allows to specify the local port for TCP client sockets.

All prototypes in Socket,RawSocket,_Rawsocket,_NativeSocket have been adopted,
aswell as the native counterpart to nativeCreateBindConnect.

TEST=new tests added

Change-Id: I3408b687cbfd7eaaaeafdda29f7093d92c92aea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217604
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Moritz Feldmann <moritz.feldmann@kabelmail.de>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-12-08 18:33:00 +00:00
Kevin Moore 694f350376 Dart 2.15 changelog cleanup
- Sorted lint update entries
- Improved grammar
- Fixed broken links
- Added `yaml` to triple-ticks where appropriate
- Moved entry from `dart:cli` to general Dart VM changes

Change-Id: I639ff019590b45df2220e9999013af2393efa64e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222329
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-12-08 14:24:01 +00:00
Michael Thomsen 55e0a53f39 Fix typo in changelog
Change-Id: If375217c253202202c1621696d504c2dfcb1736b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222302
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-12-07 17:13:49 +00:00
Michael Thomsen 71e3dac037 Remove deprecated packageRoot API, which doesn't work in Dart 2
Bug: https://github.com/dart-lang/sdk/issues/47769
Change-Id: I1cbd7761e7119c07f2697d7624bec703ba4c4641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221340
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-12-07 14:44:49 +00:00
Michael Thomsen 370a9d7b78 Mark dartdoc deprecated
Mark the `dartdoc` command as deprecated.
It's being replaced by the `dart doc` command.

Part of https://github.com/dart-lang/sdk/issues/44610

Change-Id: Ia0607cb53ef526388a749acb735fd6145149334e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221948
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-12-06 15:47:17 +00:00
Michael Thomsen 53b2c01f42 Update CHANGELOG.md
Fix typo

Closes https://github.com/dart-lang/sdk/pull/47763
https://github.com/dart-lang/sdk/pull/47763

GitOrigin-RevId: 139c9e4fdd92fab16f35732b1f9b6b7231c5bd36
Change-Id: Iad00c20007b839e054a772bed53e232e431104f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221164
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-11-24 18:34:02 +00:00
pq e1a8269ab9 fix linter entry for 2.15
Change-Id: I71dba6fbbe2a2b4fbda0703aed40a42a6b8f4eac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221166
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-11-24 17:05:12 +00:00
pq 0268ef15cc bump to linter 1.15.0
Change-Id: I36e7b7c5571129aa6c31721ca29bf2b3c3472095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-11-23 23:08:51 +00:00
Brian Quinlan 001df490a7 Move breaking change (#47653) to 2.16.0
made in 0e5f3f49c3

Change-Id: Ic7e9a91512661d3a1999f933e9d6caab6db340a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220700
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2021-11-18 21:26:56 +00:00
Brian Quinlan 0e5f3f49c3 Fix an issue where rename on Windows would delete the target directory.
TEST=tests updated
Bug: https://github.com/dart-lang/sdk/issues/35217, https://github.com/dart-lang/sdk/issues/47633, https://github.com/dart-lang/sdk/issues/47634
Change-Id: I9582c76e8eb75548ba2d67205353de63d110c294
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219501
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-11-17 19:41:50 +00:00
Lasse R.H. Nielsen f029e837d2 Update CHANGELOG/@Since of feature that didn't make 2.15.
Change-Id: Iee1ee36e3de040da2d2508938ba00a7faa1950c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219980
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-11-11 09:42:21 +00:00
Michael Thomsen f7af5c5256 Deprecate dartanalyzer command
Change-Id: I8d2fb8a5dbac0f81c8cad770ccfb2e3bbf2b0880
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219702
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-11-09 13:23:42 +00:00
Riley Porter b97737c3b5 [package:js] Update changelog to reflect js_util optimizations
Change-Id: I51d6f6759520fb5703065f9b223a65e47bed56f4
Bug: https://github.com/dart-lang/sdk/issues/39627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219560
Auto-Submit: Riley Porter <rileyporter@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-11-09 00:33:12 +00:00
Lasse R.H. Nielsen 20e9582106 Add Error.throwWithStackTrace function which throws an error and stack.
Allows throwing an error with an existing stack trace, instead of always
creating a new stack traces.

Fixes #30741

Bug: https://github.com/dart-lang/sdk/issues/30741
TEST=corelib/error_throw_with_stacktrace_test.dart
Change-Id: Iea77b4a8eb5e0cab4cd0d75432d033256c9f79fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219522
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-11-08 15:51:32 +00:00
Michael Thomsen a856655545 Dart 2.15 changelog tweaks
Change-Id: I18efbcddcfe130adfcce8811bf6e1b9c9e70697d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219440
Auto-Submit: Michael Thomsen <mit@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2021-11-05 18:48:27 +00:00
Robert Nystrom 5331d12f3f Update the language changes in the CHANGELOG for 2.15.
- Remove all references to "beta preview".
- Consolidate the text about requiring a >=2.15 language version into a
  single paragraph for all language features.
- Consistent hyphenation of "tear-off" (the noun) and "tear off" (the
  verb).
- Remove the unnecessarily-specific examples of function equality.
- Couple of other minor formatting tweaks.

Change-Id: Ic8cd601916ba53056f3da34a9cfc2b8f938d0f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218986
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2021-11-04 19:17:54 +00:00
Sigurd Meldgaard 3c5e2a0d7b Bump pub to 0035a40f25d027130c0314571da53ffafc6d973b
Changes:
```
> git log --format="%C(auto) %h %s" 78bc50c..0035a40
 https://dart.googlesource.com/pub.git/+/0035a40f Fix echo mode crash on `token add` (#3194)
 https://dart.googlesource.com/pub.git/+/a75a8c17 Don't warn against discontinued transitive dependencies (#3195)
 https://dart.googlesource.com/pub.git/+/cf2ed105 Fix analytics code (#3197)
 https://dart.googlesource.com/pub.git/+/08e13f7b Remove unused golden files (#3189)
 https://dart.googlesource.com/pub.git/+/b6293b80 Fix log message related to `pub global activate`  (#3187)
 https://dart.googlesource.com/pub.git/+/94f6b477 Introducing command-line interface tests (#3161)
 https://dart.googlesource.com/pub.git/+/3ba8134f More details from getExecutableForCommand (#3186)
 https://dart.googlesource.com/pub.git/+/a2dbcfff Shorthand syntax for hosted dependencies (#3133)
 https://dart.googlesource.com/pub.git/+/435e4e3f Shuffle analytics (#3185)

```

Diff: https://dart.googlesource.com/pub.git/+/78bc50c7833451c24e531713362e46fd50621ff0~..0035a40f25d027130c0314571da53ffafc6d973b/
Change-Id: Idfd7c382985d1ad3e3ad87a621dc79d3b74e898e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218620
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-10-29 13:05:39 +00:00
pq 4e822a3540 bump to linter 1.14.0
Change-Id: I8fc34bda6b537ca7f5e787a1189a68b3fe83d607
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-10-20 23:41:22 +00:00
Ahmed Ashour d041cf0478 Remove extra the, be and of
Fixes #https://github.com/dart-lang/sdk/issues/47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-20 09:29:01 +00:00
Lasse R.H. Nielsen 2c36db9b0a Deprecate IntegerDivisionByZeroException.
Deprecates the class and makes it implement `Error` (more specifically
`UnsupportedError`).
Code throwing `IntegerDivisionByZeroException` should be migrated to
throwing `unsupportedError` directly, code catching the exception class
should start catching `UnsupportedError` immediately (or reconsider why
they are catching at all).

Integer division by zero also covers other ways that a double division
can give a non-number result (any infinity or NaN result of the division prior to calling `truncate()` on the result, will cause `~/` to throw).

Fixes #46776

Bug: https://github.com/dart-lang/sdk/issues/46776
Change-Id: Idf2657153dd16542e72c6ba921f587dd9fc9032a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208643
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-19 16:07:52 +00:00
Sigmund Cherem 38b5a841de [dart-web] Remove dart:web_sql library.
The WebSQL standard was abandoned more than 10 years ago and is not
supported by many browsers.

The `dart:web_sql` library was marked as deprecated in Dart 2.14. This
CL makes the library inaccesible, removes support for `dart:web_sql` imports,
and removes the `Window.openDatabase` API. The old code for `dart:web_sql` is
still generated by the html generators. Removing that will be handled by a
separate change.

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

Change-Id: I892107396b3b227b4f33344377585aa5e5328288
Bug: https://github.com/dart-lang/sdk/issues/46316
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216080
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-10-19 01:00:08 +00:00
Riley Porter d17fd4b14f Reland "Re-land "Add a generic return type for js_util functions""
This reverts commit b70a134933.

Reason for revert: google3 linter bugs disabled with a comment and Flutter PR with new js_util landed with ignore comments. Should be safe to reland.

Original change's description:
> Revert "Re-land "Add a generic return type for js_util functions""
>
> This reverts commit 66cbeb6718.
>
> Reason for revert: Causes dart analyzer and dart linter to find
> issues within google3 and flutter, causing breakages and blocking
> the roll.
>
> Original change's description:
> > Re-land "Add a generic return type for js_util functions"
> >
> > This relands commit 46486cf260.
> >
> > The differences from the original commit:
> >   - jsify is no longer being made generic
> >   - Updated the CHANGELOG
> >
> > Change-Id: Ibc3402833cce2babbec9a57ad73963d7b9442ed8
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216920
> > Commit-Queue: Riley Porter <rileyporter@google.com>
> > Reviewed-by: Sigmund Cherem <sigmund@google.com>
>
> TBR=sigmund@google.com,srujzs@google.com,rileyporter@google.com
>
> Change-Id: Ic2ff63bc9658ccafcab3db75bdd06814d2f17b76
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216963
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

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

Change-Id: Ia8c753b568b0aca10e7784126048bddd9e1ab976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217148
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-10-18 18:41:53 +00:00
Siva Annamalai b70a134933 Revert "Re-land "Add a generic return type for js_util functions""
This reverts commit 66cbeb6718.

Reason for revert: Causes dart analyzer and dart linter to find
issues within google3 and flutter, causing breakages and blocking
the roll.

Original change's description:
> Re-land "Add a generic return type for js_util functions"
>
> This relands commit 46486cf260.
>
> The differences from the original commit:
>   - jsify is no longer being made generic
>   - Updated the CHANGELOG
>
> Change-Id: Ibc3402833cce2babbec9a57ad73963d7b9442ed8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216920
> Commit-Queue: Riley Porter <rileyporter@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

TBR=sigmund@google.com,srujzs@google.com,rileyporter@google.com

Change-Id: Ic2ff63bc9658ccafcab3db75bdd06814d2f17b76
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216963
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-10-15 03:40:28 +00:00
Riley Porter 66cbeb6718 Re-land "Add a generic return type for js_util functions"
This relands commit 46486cf260.

The differences from the original commit:
  - jsify is no longer being made generic
  - Updated the CHANGELOG

Change-Id: Ibc3402833cce2babbec9a57ad73963d7b9442ed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216920
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-10-14 22:56:45 +00:00
pq 53a3080c25 linter 1.13.0
NOTE: this release introduces a new dependency on `test_reflective_loader`; the SDK roll that picks this up will need to update the linter's `dart_vm_test` target in `third_party/dart/linter/BUILD` to include it.



Change-Id: Ica8e200d333a2574abefa3c56df1153869259adc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216263
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-14 12:07:52 +00:00
Erik Ernst 63e5b0db57 Update CHANGELOG.md to include information about function updates
In 2.15, function objects have had their specification and
implementation updated such that several inconsistencies have been
eliminated, and the specification has been clarified and generalized.
In particular, equality is now more consistent and compositional,
canonicalization is applied also for expressions that are constant
but not in a constant context, generic instantiation gives rise to
function objects that are identical/equal in cases where they weren't
previously, and similarly for some tearoffs.

Change-Id: Ic26bbc1f047500c1030f52fe69bb06963b0193f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216289
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-10-14 09:23:52 +00:00
Alexander Aprelev 3b1d941ae8 [io/sendmessage] Update CHANGELOG with note about newly added RawSocket sendMessage/receiveMessage
Bug: https://github.com/dart-lang/sdk/issues/46328
Change-Id: Ibab66e04c61647968cc8531cfc7533f3a8d7daad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216700
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-10-13 18:24:26 +00:00
Alexander Thomas d146c8e0e9 [release] Add release notes for 2.14.4
Change-Id: Ib27a83ae929dcb9514439df791d6d5028eb63a35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216620
Reviewed-by: Michael Thomsen <mit@google.com>
2021-10-13 09:02:30 +00:00
Michael Thomsen edb76fa0a7 Add changelog entry for TLS change
Change-Id: I0fe114426b0b0747d5080ab5bbbf6d2334d222d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215404
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-10-05 13:25:30 +00:00
Robert Nystrom b927288ed1 Remove "dartfmt" entrypoint from the SDK.
Change-Id: I32a9f95d7b22d3311767ba22c350f197592abcab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215300
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-10-04 18:40:57 +00:00
Alexander Aprelev 48db681c66 [vm/sendandexit] Add CHANGELOG for Isolate.exit([port, message]) change.
This is follow-up to 56403a0d35.

Change-Id: I222c04fd4d41e272eeb3e8fd62c55035eee1c12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215143
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-10-01 22:04:36 +00:00
Alexander Thomas 06bb7992d2 [release] Add release notes for 2.14.3
Change-Id: I23ef2861a264670023b16964d49cca3c0ee4199a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214940
Reviewed-by: Michael Thomsen <mit@google.com>
2021-09-29 10:54:42 +00:00
Lasse R.H. Nielsen bdbd3c0602 Make unawaited accept a nullable argument.
The associated `unawaited_futures` lint triggers for expressions
of type `Future?` as well, so we should allow the workaround to
handle such expressions.

This change makes a static function more permissive, and is not expected
to be breaking in any way.
(It does mean that you need Dart 2.15.0 to use the function with
nullable arguments. I've changed the annotation to say `@Since("2.15")`.
That means anyone using a 2.15 SDK should assume that they need a 2.15
SDK to use it, and someone using a 2.14 SDK will not see the argument
as nullable. If anyone uses `@Since` annotations for anything at all.)

Change-Id: Ib2da4b353104cc88a834208a6ebd788ae55b4544
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214406
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-09-27 11:58:16 +00:00
Leaf Petersen 8a9a2e4066 Add CHANGELOG message for constructor tearoffs beta release.
Change-Id: I5f25129fdad1cb58b9f7c03797d18d1712092372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212521
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-09-24 18:34:20 +00:00
Lasse R.H. Nielsen 18f37dd8f3 Add extension name getter on Enum.
We use an extension getter instead of an instance getter because
it doesn't conflict with any potential existing or future enums
which want an element named `name`.
Keeping the namespace for enum elements open is a priority.
We currently only reserve `index` and `values`.

BUG: https://github.com/dart-lang/language/issues/1511

Fixes language issue #1511, which is a long-standing request,
and should replace a number of alternative implementations
which are based on parsing the `toString()`.


This version has two fields on the shared superclass, the index
and private name, and has a separate `toString` for each `enum` class
which hard-codes that enum's class name.

An earlier version had both `"name"` and `"ClassName.name"` as fields
to be able to reuse the same `toString` method on all enum classes,
but that cost too much for JS compiled code.
Even having just `ClassName.` as a field and then combining inside
`toString` requires more code to create the enum instances.
Instead this version hardcodes the `ClassName.` string once
in the `toString` method, which means each enum class has its own
toString (which can *potentially* be tree-shaken then.)

This still tree-shakes slightly worse than the previous implementation
where every enum class had its own `index` and `_name` fields
independent of each other, which could then be tree-shaken independently.
However, the `index` was already made an interface member with the
addition of the `Enum` interface, so code which accesses `.index`
on something of the `Enum` supertype could prevent tree-shaking of
all enum classes' `index` fields.
Likewise any general access to the "name" of an enum would necessarily
do the same for the name.
This CL makes up for some of that by sharing more implementation
between enum classes.

DartVM AOT CodeSize impact: ~0.15% regression on gallery (little less on big g3 app)

TEST= New tests added to enum_test.dart

Change-Id: Id25334e6c987f470f558de3c141d0e3ff542b020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-22 14:20:16 +00:00
Martin Kustermann 7e108dc53d [vm/concurrency] Add CHANGELOG.md entry for work on isolates
Issue https://github.com/dart-lang/sdk/issues/46754
Issue https://github.com/dart-lang/sdk/issues/36097

TEST=ci

Change-Id: Ic0b1ecf88790576ae1f31b6a003b2175b9af1c66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213343
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-09-22 08:39:35 +00:00
pq f1824fb1e7 linter 1.12.0
Change-Id: I1dd5a8b56144ce48d38eea0d1ef64e5f7a983552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-20 18:32:11 +00:00
Alexander Thomas a6f97d13fc [release] Add release notes for 2.14.2
Change-Id: If57db9e64e2e351acd5232830af3d2cc355e640e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213460
Reviewed-by: Michael Thomsen <mit@google.com>
2021-09-15 09:57:04 +00:00
Ahmed Ashour d6975c1905 master branch to main
Fixes #47190

TEST=None, only markdown files where edited.

Change-Id: Ife204f9c792b6bce30d0cd7bf2260ced11c8f2b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213049
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-15 06:22:23 +00:00
Sigurd Meldgaard d787e78d21 Bump pub
New commits in this revision:

git log --format=%C(auto) %h %s cafadd17ba285dad9ebe6d34c617bc0d70d096b3..98a01e1cdbf441f030f1be76417860b6b372663d ✓
 cafadd17 Don't use null safety (yet) (#3112)
 98a01e1c Store credentials in a config directory (#3092)
 4ee280b7 Fixed messages (#3110)
 bbdac802 Third party hosted pub registry authentication (#3007)
 b1bedc53 `--examples` for get/upgrade/downgrade/add/remove (#2857)

Change-Id: Ibf6ffe33820c97114958c1564a7c22a46ff73d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213348
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-09-14 16:05:00 +00:00
Sigurd Meldgaard a7041168e7 Roll pub
New commits in this version:

git -C third_party/pkg/pub log --oneline cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e..d95c5713dda518ed53ada70e00789e6aadbfbe48
d95c5713 (HEAD, origin/master, origin/HEAD) Remove duplicate global invocation on Windows (#3055)
4c5198df master->main (#3101)
e793fd52 More tool/test.dart tweaks (#3097)
1b228edd Report retracted packages (#3093)
4fedb6c5 Tweak strict dependencies error message for `_validateBenchmarkTestTool` (#3087)
e608ab6e Improve test script (#3091)
abf702c4 Detect potential leaks in `dart pub publish`. (#3049)
9941c1f9 Fix broken simplification of prerelease constraints (#3078)
f0cdfa27 format (#3086)
5a1242c6 Fix unicode terminal detection windows (#2933)
58e2296d Dart format (#3084)
1426601c use incremental compilation in the tool/test.dart script (#3075)
9954f851 Fix a typo (#3062)
44489b31 Use relative import for path.dart (#2959)
77702ab1 Always precompile scripts before running them (#3074)

Change-Id: I913ab9e3b5bc7181d483a2de96ec4ad917028b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213262
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-09-13 11:02:19 +00:00
Michael Thomsen dca853faca Add 2.14.1 to changelog
Also add release dates for 2.14.0 and 2.14.1

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

Closes https://github.com/dart-lang/sdk/pull/47182
https://github.com/dart-lang/sdk/pull/47182

GitOrigin-RevId: 0830cdc0bb4546a95a13458aa93134bb646e0dad
Change-Id: Ia7909f5cfb57d5a037d169889c3b6a1520cfb843
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213060
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-10 07:57:35 +00:00
Lasse R.H. Nielsen 39a165647a Add compareByIndex helper function to Enum.
Fixes https://github.com/dart-lang/language/issues/1836

Bug: https://github.com/dart-lang/language/issues/1836
Change-Id: I43ef26403a379c795a0bdcdeb470b4818ffb721e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212573
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-09-09 12:02:15 +00:00
Emmanuel Pellereau 0933086397 Revert "[dart:html] Update Trusted Types APIs"
This reverts commit bda31c2c13.

Reason for revert: Breaks google3 (See b/195948578).

Original change's description:
> [dart:html] Update Trusted Types APIs
>
> Closes b/195948578
>
> Modifies Trusted Types APIs to be compliant with the spec in
> https://w3c.github.io/webappsec-trusted-types/dist/spec/.
>
> Change-Id: I65d52ace12342ce777ab596a9dd2e9a3f74b2f05
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212270
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Riley Porter <rileyporter@google.com>

TBR=sra@google.com,srujzs@google.com,rileyporter@google.com

Change-Id: I6c74fe5bfb1ecb39e01304b882ec306d5cf34442
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212741
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Michal Terepeta <michalt@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2021-09-08 08:35:45 +00:00
pq 52b70d488f bump to released linter 1.11.0
Change-Id: Ib26921cdee1a00ee18e485988546af8a413b3506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212611
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-07 23:43:54 +00:00
Alexander Aprelev bbe0791f2e Revert "linter 1.11.0"
This reverts commit 281b0d3257.

Reason for revert: broke mac buildbots, builds on macs

Original change's description:
> linter 1.11.0
>
> Change-Id: I81870800408fe15fdbc0fedebbb5d4d8f8fd15ab
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212480
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Phil Quitslund <pquitslund@google.com>

TBR=brianwilkerson@google.com,pquitslund@google.com

Change-Id: I73af2cfc919a1a9c1841f74cbd07a1e89654ef8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212613
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-09-07 22:16:27 +00:00
pq 281b0d3257 linter 1.11.0
Change-Id: I81870800408fe15fdbc0fedebbb5d4d8f8fd15ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-07 20:55:46 +00:00
Srujan Gaddam bda31c2c13 [dart:html] Update Trusted Types APIs
Closes b/195948578

Modifies Trusted Types APIs to be compliant with the spec in
https://w3c.github.io/webappsec-trusted-types/dist/spec/.

Change-Id: I65d52ace12342ce777ab596a9dd2e9a3f74b2f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212270
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-09-07 18:03:18 +00:00
pq b3cb952a69 fixed Linter CHANGELOG entry
Follow-up from:

https://dart-review.googlesource.com/c/sdk/+/210500/12/CHANGELOG.md
https://dart-review.googlesource.com/c/sdk/+/209765/3/CHANGELOG.md

Change-Id: I6524f93dc8d75331cf7a5910d01a9186d78f4911
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212600
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-07 17:14:33 +00:00
Kevin Moore f42cc14c3c Fix link to native extensions deprecation issue
Follow-up to bda70c8489

Change-Id: I76f042a08a6d313bfdee297b078e01fd81784b97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212545
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-09-06 16:46:53 +00:00
Lasse R.H. Nielsen 2b41685519 Move the CHANGELOG entry for dart:cli deprecation to 2.15.0
Change-Id: I73bfdd310af6df6cc1d62311e155fc432b84165d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212567
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-06 12:26:11 +00:00
Vyacheslav Egorov bda70c8489 [vm] Remove support for dart-ext: imports
Per breaking change #45451 we are removing support for dart-ext:
style native extensions from the Dart VM.

This CL removes the associated VM code, tests and samples. It also ports
a single test which used dart-ext: import to use FFI instead.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/45451
Change-Id: Iae984bce32baf29a950b5de1323939006a217b94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212050
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-02 14:14:35 +00:00
Erik Ernst 65b5125223 Add item in CHANGELOG.md about relaxed constant factory constructor rule
Change-Id: Ia4a9ffa1b4e27abcea66dca985d099f9fef75790
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211400
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2021-08-31 15:09:40 +00:00
Paul Berry 1b18e8f5ac Flow analysis: account for initializers of implicitly typed variables.
Previously, initializers of implicitly typed variables did not
contribute to the SSA tracking performed by flow analysis (see
https://github.com/dart-lang/language/issues/1785).  This change fixes
the bug, however the fix is conditioned on the "constructor tearoffs"
language feature to avoid compatibility issues (we don't want someone
to publish a package taking advantage of the fix, without realizing
that it makes their package unusable on older SDKs).

TEST=standard trybots
Bug: https://github.com/dart-lang/language/issues/1785
Change-Id: I1143440c7a9795b059e8f4b84e3f4125cd80732c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211306
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-08-27 15:01:15 +00:00
pq 85156a691d linter 1.10.0
# 1.10.0

- improved regular expression parsing performance for common checks
  (`camel_case_types`, `file_names`, etc.)
- (internal) migrated to analyzer 2.1.0 APIs
- fixed false positive in `use_build_context_synchronously` in awaits inside
  anonymous functions
- fixed `overridden_fields` false positive w/ static fields
- fixed false positive in `avoid_null_checks_in_equality_operators` w/
  non-nullable params
- fixed false positive for deferred imports in `prefer_const_constructors`



See: https://github.com/dart-lang/linter/pull/2804

Change-Id: Ib069a6eeb0f9a8ca14c01acf21cad66831c26def
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-08-25 16:42:42 +00:00
Michael Thomsen 484825eb09 Add dart2native discontinuation to changelog
Follow-up to https://dart-review.googlesource.com/c/sdk/+/210241

Change-Id: I828adafb04ae92731378b2e372a127dc35de12cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210921
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-08-23 20:54:22 +00:00
Paul Berry f5a3bce734 Fix scope resolution of metadata on type parameters
Previously, when encountering identifiers in metadata on a class's
type parameter, the analyzer would resolve them using the type
parameter scope, but then fall back on using implicit `this`.  The CFE
would resolve them using the class body scope.  In both cases, the end
result was that the annotation could refer to static class members.

This change brings the behavior of both the analyzer and the CFE in
line with the spec, by preventing the use of implicit `this` in these
annotations, and resolving them in the type parameter scope.

This is not expected to break any code in practice, because
annotations on type parameters are rare, as are annotations referring
to static class members, and the overlap between these two should be
negligibly small.

Fixes https://github.com/dart-lang/language/issues/1790.

Bug: https://github.com/dart-lang/language/issues/1790
Change-Id: Ibe5a421e04a53d29074a8b1509e1390658ed72e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210040
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-17 15:17:02 +00:00
Lasse R.H. Nielsen f4ddc8dc6b Deprecate the dart:cli library and waitFor method.
Change-Id: Ia7af0febf17b310de9561eca254f1bd9add079ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210125
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-08-16 13:49:48 +00:00
pq c22a170429 linter 1.9.0
Change-Id: Id833d90a90caefe7578451f6086828fd33002529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-08-11 23:05:13 +00:00
Lasse R.H. Nielsen ae1e2bd3a6 Add HTTP access control headers to CHANGELOG and add @Since.
Change-Id: I860fbe6b821061695c50319204d8d6ba9c98a839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209109
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-08-09 14:48:38 +00:00
Srujan Gaddam f5a98e7676 [ddc] Unify pkg:js types and allow subtyping between them
Removes the lazy loading of the underlying type in LazyJSTypes.
As such, this removes the need to keep AnonymousJSType and
LazyJSType separate, and is therefore refactored to
PackageJSType. Similarly, subtyping is fixed such that
PackageJSTypes are all subtypes of each other.

Change-Id: If489defdbeb5cb932db802a7d146ad2fc393b12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207982
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-07-30 00:33:54 +00:00
pq cb5d0b39ca linter 1.8.0
See: https://github.com/dart-lang/sdk/issues/46663

Change-Id: I836498caf61ee311a9c6674f20ab3a959bdc9e9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-07-28 03:18:44 +00:00
mnordine 408e4c2a1f Remove redundant language block
Closes https://github.com/dart-lang/sdk/pull/46593
https://github.com/dart-lang/sdk/pull/46593

GitOrigin-RevId: a7d5667164a9da6c730b40311a47d73fce160f8a
Change-Id: I79b87e9a53accf5879a7650754874269d4cfa673
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206602
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-07-13 01:48:45 +00:00
Mark Zhou 4b858b95f8 [dart2js] Moving 'legacyJavascript' flag to shipping.
This effectively enables ES6 language features in Dart2JS by default.
Also adapts some tests to expect ES6 Method Definition syntax.

Change-Id: Iec36fbf9d22afd1083f7560a16fa73fbf15fb85c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205741
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-07-09 20:32:56 +00:00
Kevin Moore 359fcac96d CHANGELOG: move language section to the top of 2.14
Also apply new formatting style to dart format section

Change-Id: I5e7ad454ff2794dc98eb4f1868416beb45b1c68e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206340
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-07-09 17:14:15 +00:00
Kevin Moore f5e59f8a04 Cleanup and standardize format of changelog
Using https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

Change-Id: I6a9dca93d8852a606b143394318691de9890b9a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206302
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-07-09 01:34:24 +00:00
Robert Nystrom 7804da29be Roll dart_style 2.0.2 into SDK.
Change-Id: Ie221a1138ee66f820fe5c0f3fe4c911fd9626c31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205941
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-07-08 23:50:53 +00:00
Lasse R.H. Nielsen 3835374fb9 Update Symbol constructor documentation.
No longer state that it only accepts some strings as arguments.
Document the expected equality, and the relation to symbol literals.

Fixes #46521

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

Change-Id: If317beda0ac4fef380583105f0f5a3b4b456049b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205791
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-07-05 16:41:57 +00:00
pq 283450336d linter 1.7.0
Change-Id: I5b0c89ddded519cda337777ca64fe111e653792e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205361
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-01 16:16:28 +00:00
Kevin Moore 03b2b6bac9 Fix changelog for dart:html for 2.14
Change-Id: I866378cba43db7f559e37d3c0bf163843f74d186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204941
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-25 21:47:29 +00:00
Lasse R.H. Nielsen 43cff26365 Add supertype to enum classes.
TEST= language/enum/enum_test

Change-Id: I83b7fd1c29103c3aa4dc7ad3e41141fb8c62339e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203564
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-25 14:08:16 +00:00
Lasse R.H. Nielsen 83376bf1ee Add Object.hash and Object.hashAll static helper methods.
Fixes #11617.

Bug: http://dartbug.com/11617
Change-Id: Id06fb5b3914bee24713427edbd3b9b7e86f86449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/73360
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-25 11:40:35 +00:00
Alexander Thomas af16281712 [release] Add release notes for 2.13.4
Change-Id: I5bce7cfc6b136e457ce719c2d7f3a487f2b95742
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204720
Reviewed-by: Michael Thomsen <mit@google.com>
2021-06-23 10:25:13 +00:00
Lasse R.H. Nielsen 902f149e2c Add unawaited function and ignore extensions member.
The `unawaited` function in `dart:async` is intended for use with the `unawaited_futures` lint which is hopefully going to be part of the Dart recommended set of lints.

The `ignore` extension method is there to provide an alternative if you even want to ignore errors from a future. By having both, it makes the distinction clearer and makes it easier to not think one can be used for everything.

Change-Id: Ib96ed5ff64ead4b228721e5210efa82f76119c9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200428
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-22 20:03:13 +00:00
Devon Carew 6b4f2a7aae [dartanalyzer] have the dartanalyzer command emit json output to stdout
Change-Id: I2044771cc28a3b04a2b8bd3bd79b5261b4d20467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-17 23:39:51 +00:00
pq b5e7656833 linter 1.6.1
Change-Id: I801f4192c732f91aaf02b0a846c4f11fc4cb2f1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-15 22:31:23 +00:00
Emmanuel Pellereau cbe818facc Revert "linter 1.6."
This reverts commit aa07721aa1.

Reason for revert: breaks google3 (b/191082239)

Original change's description:
> linter 1.6.
>
>
> See also: https://github.com/flutter/flutter/issues/84577 for coordinating breaking change to `sort_directives`.
>
>
> Change-Id: Iefde221bcf9d20d990537d8cfe050aaf381a459f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203540
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Phil Quitslund <pquitslund@google.com>

TBR=brianwilkerson@google.com,pquitslund@google.com

Change-Id: I148627aa2d8f23c5e1564474909549646b6d65d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203562
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2021-06-15 07:08:30 +00:00
pq aa07721aa1 linter 1.6.
See also: https://github.com/flutter/flutter/issues/84577 for coordinating breaking change to `sort_directives`.


Change-Id: Iefde221bcf9d20d990537d8cfe050aaf381a459f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-14 22:50:39 +00:00
Gabriel Castro 820ba59dda [html] Fix nested JS Map to Dart assignment
Added check to convertNativeToDart_Dictionary to recursively convert native objects within a map to their Dart equivalent.

Fixes: https://github.com/dart-lang/sdk/issues/44319
Change-Id: I80a2bc0541454900b1c7d9635debaf72d7c120f2
Bug: 44319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201200
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-06-14 21:18:08 +00:00
Alexander Thomas 30321de787 [release] Update release notes for 2.13.3
Change-Id: I6a96bbafc3c473eaba03e400526661f07a9f4603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202776
Reviewed-by: Michael Thomsen <mit@google.com>
2021-06-09 10:30:19 +00:00