Commit graph

845 commits

Author SHA1 Message Date
Joshua Litt eab26cd2bd [dart2js] Flip flag to defer class types.
Change-Id: Ia1f913a01f2be006158967b145db3ee34b297cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155660
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-17 20:25:09 +00:00
Sigurd Meldgaard 11b3ae6c8f Move pub changelog items to correct version
Change-Id: Ib06eeeeca5564d01a5e3f9ab27eb1f6d8263ad45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158540
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-08-14 10:20:07 +00:00
Zichang Guo 56d40bad75 Reland "[dart:io] Add Abort() on HttpClientRequest"
The test was poorly written. The response from Socket can arrive
separately. So the check for content-length header will fail.

This is a reland of 4b96f20a79

Original change's description:
> [dart:io] Add Abort() on HttpClientRequest
>
> The breaking change request for this cl: https://github.com/dart-lang/sdk/issues/41904
>
> Bug: https://github.com/dart-lang/sdk/issues/22265
> Change-Id: I36db64b4db307b78cd188a2f1701ec733f2e73db
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147339
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

Bug: https://github.com/dart-lang/sdk/issues/22265
Change-Id: Ibfe9565a3f9d5ef84274fba33a68fb57dbbe28c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155581
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-08-14 01:01:13 +00:00
Sigurd Meldgaard bdfb2bd163 Bump pub
git log --oneline 0d185a398a1684c15ea16a0facc17f5d170e5d51..cf9795f
cf9795f3 (HEAD -> master, origin/master, origin/HEAD) Refresh binstubs after recompile in global run (#2610)
5c741f6d Avoid O(2^N) complexity when reformating an incompatibility-tree of depth N. (#2615)
10fb3f58 (count_outdated_packages) Differentiate between ansi and unicode support (#2608)

Change-Id: Iaa5f0a37ca3179f24c4114315d7b2a6c349750f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158389
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-08-13 15:24:54 +00:00
Alexander Thomas 7b26f6e29d [release] Add release notes for 2.9.1
Change-Id: I8d3ea79f2d0e027ab5834b332a8d63868b7cad2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-08-12 10:32:58 +00:00
Sigurd Meldgaard 4b3db02711 Bump pub version
> git log --oneline 04b054b62cc437cf23451785fdc50e49cd9de139..master
0d185a39 (HEAD -> master, origin/master, origin/HEAD) Push null-safety forwards to 2.11 (#2604)
56f9f27f Hide outdated --mode flag (#2603)
61ce6f81 Avoid double loop (#2605)
fa6e57d7 (disable_mixed_mode_validation) Fix outdated latest ordering (#2598)
6549e4aa Remove unused dependency from pubspec.yaml (#2592)
61543d07 Don't look for external package foo during testing (#2599)
590b448f Fixed license headers (#2595)
04e0601e Don't show entries for dev-dependencies in outdated --json --no-dev-dependencies (#2591)
8c3778c4 Configure GitHub move app (#2578)
eec7beca (top_level_command) Pass --(no-)sound-null-safety arg through to VM. (#2542)
152e4740 Warn about publishing in mixed mode (#2583)
0b7a3abe Removed april fools toys (#2325)
b74a5b73 Actually print hints (#2582)
8ec3a66d (pub2) Fix outdated --no-color (#2572)
7bb3d4e6 Use getSdkPath() in NullSafetyAnalysis (#2573)
3c578f24 Drop the "magic" package concept (#2577)
0e967ff0 Remove unused function (#2570)
988fefef Remove dependency overrides (#2568)

Change-Id: I58bf14234ed55bf9d825de60a40ded1d65281195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158003
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-08-11 15:26:39 +00:00
Daco Harkes d98f777da8 [vm/ffi] Change dart_api_dl.cc to dart_api_dl.c
Adapted the solution from
https://github.com/mraleph/go_dart_ffi_example/blob/master/dart_api_dl/include/dart_api_dl.c
such that we only have one carbon copy of the signatures.

This breaks existing code because the file is renamed, which is
added to the changelog.

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

Change-Id: If9300cac513c6cf5dac9e524bfc069764bb1a3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157965
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-08-10 15:11:21 +00:00
pq 594434d5a0 Linter Changelog note fixes.
Follow-up from: a2fdeaaa53 (r41273696)



Change-Id: Ife82a2ae2ff2f5707995ae405d9c6e5daa8c45c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157862
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-08 05:41:21 +00:00
pq a2fdeaaa53 bump linter to 0.1.118
Change-Id: Id8277810091fbc3431131cb4182532c335d82773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157476
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-06 23:11:09 +00:00
Tim Sneath 4431a664dc Update CHANGELOG.md
Add a date

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

GitOrigin-RevId: a98a5e1ae33c36483f5db9adf87628dbbb28c59f
Change-Id: Idc3848f5e8a1de432e1616754aa807c3e07c2813
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157343
Reviewed-by: Kevin Moore <kevmoo@google.com>
2020-08-05 18:26:11 +00:00
Kevin Moore 9f19742c61 Changelog: move entry for BytesBuilder to v2.10
Change-Id: I2969f8c089d087042b2aa681d2d8a61a8f956556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156101
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-08-05 17:07:04 +00:00
Johnni Winther 37c8c709bf Move BytesBuilder class and implementation to dart:typed_data.
Change-Id: Ic4fe1944ef4af19732f23c389845b6a74af0bc32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154682
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-24 11:37:21 +00:00
Daco Harkes 202e32afeb [vm] Native API: Introduce Dart_FinalizableHandle
Introduces Dart_NewFinalizableHandle which does auto delete itself,
but does not allow accessing the weak referenced object.

Issue: https://github.com/dart-lang/sdk/issues/42312

Change-Id: I24ea732925122c453213c4fa3f629761c352f838
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154695
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-23 11:30:39 +00:00
Zichang Guo 40fd1c456e Revert "[dart:io] Add Abort() on HttpClientRequest"
This reverts commit 4b96f20a79.

Reason for revert: Windows bots are broken. Because --socket-short-read is specified, the server doesn't receive full header at once.

https://dart-ci.appspot.com/log/vm-kernel-win-debug-x64/dartk-win-debug-x64/8907/standalone_2/io/http_client_connect_test/3

Original change's description:
> [dart:io] Add Abort() on HttpClientRequest
> 
> The breaking change request for this cl: https://github.com/dart-lang/sdk/issues/41904
> 
> Bug: https://github.com/dart-lang/sdk/issues/22265
> Change-Id: I36db64b4db307b78cd188a2f1701ec733f2e73db
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147339
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,zichangguo@google.com

Change-Id: I48f7a2ee3bb75e0e0ba0bd24ed53fcac372e016d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/22265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155548
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-07-23 02:31:10 +00:00
Zichang Guo 4b96f20a79 [dart:io] Add Abort() on HttpClientRequest
The breaking change request for this cl: https://github.com/dart-lang/sdk/issues/41904

Bug: https://github.com/dart-lang/sdk/issues/22265
Change-Id: I36db64b4db307b78cd188a2f1701ec733f2e73db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147339
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-07-22 22:03:09 +00:00
Sigurd Meldgaard ad3be0ab96 Bump pub
git log --oneline 85bdb898aeb2ac7cea76489ba0bf4e52ff7a79bf..master
04b054b6 Find sdk path with cli_util (#2567)
36c195b9 Only alert about new prereleases for prereleases (#2556)
00b36394 Stop using deprecated mapMap from pkg:collection (#2544)
477cbe72 Improved expectations in flutter_plugin_format validator test (#2532)
a8e2442b `pub run` Don't write about precompilation if no terminal is attached (#2531)
d83d36a4 Don't precompile dependencies of global activate from path (#2530)
870f395c Sanitize git cache folder names (#2522)
03b7f9a5 Avoid divisive terms (#2523)
b239ada4 Remove divisive term (#2517)

Change-Id: I55ea52a86121a382dca5c0f85addd4513ada50bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154940
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-07-20 13:38:34 +00:00
Kevin Moore 0716e2d63f 2.9 changelog: cleanup entry for pub client
Change-Id: I15306c9873a78e15c2ab5070644021e7e8d82887
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154846
Reviewed-by: Kathy Walrath <kathyw@google.com>
Commit-Queue: Kathy Walrath <kathyw@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-07-17 23:58:03 +00:00
Sigmund Cherem c632a629ff [web] remove mirrors patch for web compilers.
This makes both compilers report a compile-time error when importing dart:mirrors.

Change-Id: I23360b87ee31fba36fe7c111cee1987aa2d50638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154622
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-07-16 00:12:22 +00:00
Ryan Macnak 51d3fae7d3 Revert "Move BytesBuilder class and implementation to dart:typed_data."
This reverts commit 084f9faf81.

Reason for revert: Breaks ABI without relevant version updates 

Original change's description:
> Move `BytesBuilder` class and implementation to `dart:typed_data`.
> 
> Change-Id: I3e66e61940a1060e4970427799e0d8ebdaebb310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150523
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>

TBR=lrn@google.com,nbosch@google.com

Change-Id: I2b79063b7ff70de7ce039283a10d56460594a6ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154563
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-07-15 21:35:35 +00:00
Lasse Reichstein Holst Nielsen 084f9faf81 Move BytesBuilder class and implementation to dart:typed_data.
Change-Id: I3e66e61940a1060e4970427799e0d8ebdaebb310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150523
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-07-15 15:09:14 +00:00
Srujan Gaddam ff8f128a76 [dart:html] Update console interface
Closes https://github.com/dart-lang/sdk/issues/42213

Adds nullability to Console, adds missing methods and cleans
cleans existing ones up, and removes a stale template. Most
modifications are derived from https://console.spec.whatwg.org/
and the rest are derived from the MDN.

Change-Id: I26a099b15e53a4748afb61c7532bdbf64d7c4d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151091
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-30 23:32:27 +00:00
Aske Simon Christensen 3c3a00f331 [vm] Adjust internal UTF-8 encoder to match dart:convert.
The breaking change https://github.com/dart-lang/sdk/issues/41100
changed the UTF-8 encoder to encode unpaired surrogates as replacement
characters.

However, the VM contains its own, internal UTF-8 encoder, which is used
for printing and for the Dart_StringToUTF8 function in the Dart API.
Here, this encoder is changed to also encode unpaired surrogates as
replacement characters.

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

Change-Id: I9d55168f67d124dbc7987fb759696a98e7526c29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149292
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-06-29 16:10:13 +00:00
Lasse Reichstein Holst Nielsen 17d0ba55e8 Add Stream.multi constructor.
A generalized stream which provides a controller for each listener.
Can be used to implement both broadcast streams and single subscription streams,
as well as any stream behavior between the two.

Change-Id: I7a75f8736ca6bc91ce266e768db68536efd24dfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150936
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-06-29 14:04:53 +00:00
David Morgan 1d3fbbed7c Revert "Fix duration.toString() to conform the description"
This reverts commit 038e981f89.

Reason for revert: Breaks some tests; visible changes to some web UIs.

Original change's description:
> Fix duration.toString() to conform the description
> 
> Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
> But when `hours` is less than 10, toString() doesn't have the leading
> zero, which is "H:MM:SS.mmmmmm".
> 
> The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733
> 
> Bug: https://github.com/dart-lang/sdk/issues/41737
> Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,zichangguo@google.com

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

Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I4d7ef5de9807e8e2b2a77c2171d1693b7527f671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151848
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-22 10:29:15 +00:00
Zichang Guo 038e981f89 Fix duration.toString() to conform the description
Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
But when `hours` is less than 10, toString() doesn't have the leading
zero, which is "H:MM:SS.mmmmmm".

The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733

Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-06-19 22:52:30 +00:00
Kevin Moore eb21b006ac Improve the changelog entry for linter
- Order items to make them more parsable
- Remove items that won't affect SDK users
- Consolidated entries

Change-Id: I855b81f22377d55aa19b12decef95a58f211fd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150800
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-06-11 18:44:11 +00:00
pq 5b51895652 linter 0.1.117
Change-Id: I2489c5ff7f2dd5c70b41fa49550e3743e9d3d529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-06-10 17:10:37 +00:00
Jonas Finnemann Jensen 64b761b31b Bumped pub revision
Change-Id: I8ca3203423a98f8a0b02f0f8b458623025f1ddd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149847
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-06-03 21:32:39 +00:00
Alexander Thomas 099415b8b8 [release] Add release notes for 2.8.4 to the changelog
Change-Id: I5f9c36c92c17d57214eb8e5388ac46c9e10d6cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149598
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-06-03 10:12:02 +00:00
asiva 1c6fa369ab [Library] Change signature of dart:io exit to return Never
(see issue - https://github.com/dart-lang/sdk/issues/42006)

Bug:42006
Change-Id: I72b474c6ea398f4e7bd746beac650e625be8857c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148920
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-05-29 18:45:04 +00:00
Alexander Thomas b59abe0cf9 [release] Add release notes for 2.8.3 to the changelog
Change-Id: I5c269666a2ab9ac6ae76062d598e4402887c3118
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149004
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-05-26 16:28:11 +00:00
pq fb3ed85af4 linter 0.1.116
Change-Id: I76b96981ee32e5beb3445d1584105f7b4b6fc631
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-05-25 23:41:29 +00:00
Sigurd Meldgaard 629e87b4a1 Bump pub version
Includes the following changes:
a4bc2dd08630f85a94f506eab037fcaaedb42222 Rename --v2 to --dart-dev-run (#2498)
958862efa33605af3136c4bd366015bace62d869 Update outdated.dart (#2488)
2cc09730f73204afced1df606416c07d5ee1e67d outdated: work with no lock file (#2491)
7c73dae26df2b3ef3e3019d7296fd2871dd23c49 Do not fallback to bin/main.dart (#2478)
27bc4f7ef65928c95535baf51245fd5b01162d0f Preserve windows line endings in pubspec.lock if they are already there (#2489)
31cfec521db6fe607f0f0424e747dff2e4950711 pub outdated --mode=null-safety
da05bbaee8c53b769d1f90458e28b3b7f9a22187 Fix `pub run` precompilation with relative PUB_CACHE paths (#2486)
dd005e586fc17545f22fc6e75eedfc9f075f9092 Show summary count of outdated packages after running `pub upgrade`  (#2444)
1b927956e653ea74a153513e593ff417617cabf0 Outdated: If current is a prerelease, use prereleases for latest if no newer stable (#2484)
678bd84a328fabb3fee360f837ac782f2831d753 Warn first time a package version opts in to null-safety (#2465)
8e76d46a4b8180ab247ecf6382f4f7abd34591f1 Force colors when --color is given (#2481)
572a23f815a5d632a8c2b259b691792674cd8b4d Rely on terminal telling if we can use colors (#2475)
363ed6fe54c084df43bbec1704757d0d6c64cbb7 pub run --v2 for use in dartdev (#2435)
aa5bbbb7261fc492866b5d6b94357cbe8df5e09a Use a 8-bit ansi palette for grey (#2474)
3929b1138a589b4f506018d98b3005a3e76dcea6 Format with new dartfmt (#2476)
6deb457048deb435009b36a4cd2d86003d107cf4 Use line length to wrap usage (#2457)
6e2ce2e4add80c4e15c8346a976cbf760d707f6a Use gzip decoder from dart:io. (#2382)
5b5fe72a33a66e4cab7070b3248596877e3a854e Improve the `pub outdated --help` text (#2429)

Change-Id: If9a719bfc374f085bd26856330547682c14f0df4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148532
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2020-05-20 13:06:02 +00:00
Zichang Guo cdc98a045f [dart:io] Support abstract unix domain socket on Linux
Abstract unix domain socket(UDS) is not supported on platforms other
than Linux/Android. So it has not been supported in the initial design.

This cl will enable users to use abstract UDS.

As long as InternetAddress has a path starting with '@', it will be
interpreted as abstract UDS on Linux/Android.

For abstract UDS, checkout unix man page for more information.

Bug: https://b.corp.google.com/issues/156871566

Change-Id: I393d798b2fc65304677a60639223f90e20aabaa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148380
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-05-19 21:33:10 +00:00
Zichang Guo 79db1008cd [dart:io] Update httpparser size limit in CHANGELOG
Previous change has made a 8K size limit on http parser. It should be
put into CHANGELOG.md.

36496047b4

Bug: https://github.com/flutter/flutter/issues/56580
Change-Id: I3e06848ff018ddacd022877b16ec69dc88f8a24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147322
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-05-13 21:29:17 +00:00
Alexander Thomas 33056425af [release] Add release notes for 2.8.2
https://github.com/dart-lang/sdk/issues/41816

Change-Id: I34b6b3febfd00760b3ea75f0f68305a791be2c1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147481
Reviewed-by: Michael Thomsen <mit@google.com>
2020-05-11 09:49:26 +00:00
Srujan Gaddam c5943523cc [dart:html] Add changelog note for EventStreamSubscription.cancel
Closes https://github.com/dart-lang/sdk/issues/41653

Change-Id: I0e5cac66a3a80c3c753d740bf8bf90f68addaf6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146880
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-05-06 19:30:17 +00:00
Aske Simon Christensen 3efa014657 Changelog entry for UTF-8 breaking change
Closes https://github.com/dart-lang/sdk/issues/41100

Change-Id: I91b39af42cfc6c738056e20c1a96cad6fd3cfde6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145785
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-05-04 10:48:32 +00:00
Nate Bosch 9b34bee90b Add InternetAddress.tryParse
Closes #40692

Allows a better pattern for parsing user input than catching an
`ArgumentError`.

- Add a new static method to InternetAddress and implement it in all
  patch files.
- Add tests which match the tests for the constructor.

Change-Id: Idc76fc4875578f7a381219c0e7e12d1931d98fd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136406
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2020-04-30 17:19:02 +00:00
Alexander Thomas 3a65f2ccd0 [release] Change version for 2.8 to 2.8.1
2.8 needs another cherry-pick but 2.8.0 has already been released on the
Flutter beta branch. To be on the safe side, bump the version to 2.8.1.

Change-Id: I977113b3272264e903b9150b5185c0eadb769057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145581
Reviewed-by: William Hesse <whesse@google.com>
2020-04-30 06:54:58 +00:00
Alexander Thomas 437a4bae26 [release] Update tentative release date for 2.8.0
Change-Id: I539f677d35ddd19e584a56d6f7aa8b30ca74b82e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144947
Reviewed-by: William Hesse <whesse@google.com>
2020-04-28 07:33:48 +00:00
Robert Nystrom 064f4e7a93 Roll dart_style to 1.3.6.
This should fix the Windows failures from the 1.3.5 roll.

Change-Id: If0470b63ae301b5ce3a8a92458cf7388d5b5ddf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144686
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-04-24 07:40:21 +00:00
Alexander Thomas 68e77baf59 [release] Add 2.5.2 release notes missing on master
The 2.5.2 release notes were never copied from stable to master.

Change-Id: I270227bb1701fbbf1df2f22de6f72d022214175a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144561
Reviewed-by: William Hesse <whesse@google.com>
2020-04-23 15:40:02 +00:00
William Hesse dfaca330c4 Revert "Update dart_style to 1.3.5."
This reverts commit 334dd63dac.

Reason for revert: There are unit test failures on Windows, including crashes of the formatter.

Original change's description:
> Update dart_style to 1.3.5.
> 
> The main change is not directly user visible: it brings in the new
> Command used by the new "dart" tool to invoke the formatter. But there
> are also a handful of minor formatting changes.
> 
> Change-Id: If7ce92e5a97d527749030714397b7b56773d9987
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142541
> Commit-Queue: William Hesse <whesse@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>

TBR=whesse@google.com,rnystrom@google.com,athom@google.com

Change-Id: If6afb82e83c2e491c63e5fa0859b10daaa7d4f33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144563
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-04-23 12:39:30 +00:00
Robert Nystrom 334dd63dac Update dart_style to 1.3.5.
The main change is not directly user visible: it brings in the new
Command used by the new "dart" tool to invoke the formatter. But there
are also a handful of minor formatting changes.

Change-Id: If7ce92e5a97d527749030714397b7b56773d9987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142541
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-04-23 09:50:39 +00:00
Sam Rawlins 01251b8a42 Bump linter to 0.1.115
Change-Id: I88316694213f8ab8fc7dd160614467d42b84aa09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144460
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-04-22 18:18:39 +00:00
Alexander Thomas 0c28ddc170 [release] Prepare changelog for the 2.8.0 stable release
* Add tentative release date.
* Fix some bad characters.
* Move changes that didn't make the cut to 2.9.0.

Change-Id: I13d7ffa45ec96057d7b3d08b4437662d48d4d732
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144288
Reviewed-by: William Hesse <whesse@google.com>
2020-04-21 14:28:53 +00:00
David Morgan 22ad590c68 Revert "bump to linter 0.1.115"
This reverts commit b41f7dd1d9.

Reason for revert: Too many new analyzer issues to land in google3.

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

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

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

Change-Id: Icad6d31d19e64444c94fabd9d851c2a6bd03a820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142989
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-14 14:09:56 +00:00
Sigmund Cherem 7baa21d97a [changelog] Add implements-Function breaking change to the changelog
Change-Id: I32a4800a73861922040e3f9b1130b702fafa1d56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143332
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-14 05:35:09 +00:00
Zichang Guo 17294842e9 Reland "[dart:io] Making OSError implements Exception"
This is a reland of ae392b8e00

https://github.com/flutter/flutter/pull/53258 will be landed first to unblock the roll.

Original change's description:
> [dart:io] Making OSError implements Exception
>
> Bug: https://github.com/dart-lang/sdk/issues/40934
> Change-Id: Icff457333bd570d81cdf9c3136ee4fe1cadfaae8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139406
> Reviewed-by: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>

Bug: https://github.com/dart-lang/sdk/issues/40934
Change-Id: Ibc17c0a5717c2005898ce279d4d16edbdbbf44fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140910
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-04-11 01:29:22 +00:00
pq b41f7dd1d9 bump to linter 0.1.115
Change-Id: Ib20ee6049ce1155a5ba36664f607b09a502f0340
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143186
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-04-10 23:25:12 +00:00
Srujan Gaddam 0764c70cd9 [dart:html] Remove nullability from CssClassSet funcs
Pre-nnbd, add and toggle were allowed to return null, but with the
change in the Set interface, they must return a non-nullable bool.

Change-Id: I1dfcb43d8c816f46f847d22d6f62507c6a77e4a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141500
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-04-02 19:29:09 +00:00
Robert Nystrom 9014495aa5 Add other breaking changes to CHANGELOG.
Change-Id: I0616669dc6d8d9a676d057da54d59ea932ec67f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141208
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Franklin Yow <frankyow@google.com>
2020-03-27 00:18:42 +00:00
Robert Nystrom db1cf5d113 Fix Markdown link in CHANGELOG and remove duplicate entry.
Change-Id: I99b50febfb985c73f3990ac63116a96a69431ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141162
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Franklin Yow <frankyow@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-26 22:00:05 +00:00
Kevin Moore bdedd7a574 Update changelog with dart2js --package-root removal
Follow-up to b3522564d9

Change-Id: I47e75fc3f7916cc6ec0464ace1b6df93638dd80b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141163
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-26 17:28:24 +00:00
pq d18b648062 linter 0.1.114
Change-Id: I91eaaf6299065c18876fa8ebb0ca0f570a086743
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-03-25 22:47:56 +00:00
Leaf Petersen a55e37289e Deprecate CastError.
CastError is deprecated.  See
 https://github.com/dart-lang/sdk/issues/40763 for details.

Change-Id: If00963e68987a259396c4b5a0cd6d703bc7ac76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140885
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-25 19:41:03 +00:00
Robert Nystrom 113c4e1793 Pretty up the CHANGELOG in anticipation of 2.8.0.
The changes are mainly:

- Add a brief intro section.

- Fix indentation to make Markdown happy. In particular, +4 is needed
  for nested lists to format correctly.

- Do a little copy-editing on the text. Mostly changing future tense to
  present tense.

- Merge the two dart2js sections together.

- Change some inline links to reference links since those are a little
  easier on the eyes.

Change-Id: I72f4d3a4f74d7b83afa8d02dd95589aeddc613d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140771
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-03-25 18:24:02 +00:00
Lasse R.H. Nielsen 8760283247 New implementation of runZoned.
A combination of `runZoned` and `runZonedGuarded` where only the latter allows an `onError` parameter,
and only that has a nullable return type.

Retains the `onError` parameter on `runZoned` for now because it's too breaking to remove it until packages have been migrated off of it.
It will be removed in a follow-up CL.

Change-Id: If0e86c8d14e13fa089c66f4af975aeacb2616cf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137302
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-03-25 00:24:33 +00:00
Kevin Moore 29f47fdccb changelog: add link to the vulnerability advisory for the 2.7.2 entry
Change-Id: I09a334aec6ece1d13a7d4048030f6d716f7354de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140780
Reviewed-by: Michael Thomsen <mit@google.com>
2020-03-24 17:05:55 +00:00
Sigurd Meldgaard 21451f8cfa Bump pub version
New commits:

```
b923cd84ed6e746734af4dc2f3fe352fa660e191 (HEAD -> master, origin/master, origin/HEAD) Warn about deprecated LICENSE and README.md file names (#2381)
5c0e3592d7015369015779569aa1ca57f1fc9227 Download hosted packages in parallel when repairing cache (#2377)
b49089d72071c11a423d2f1ae501f9ce3c6fe908 Fix `pub outdated` for circular dependency on root. (#2379)
ad4b7a84c39ac08b26d8f81a88b7a84b9ceb2a1c Use path operations for validating CHANGELOG filename (#2378)
d97d5dca3164fac64dda92bc556992b73289e6bb Add a missing word in solver documentation (#2376)
```

Change-Id: I402921893c10d6705d56446cf246cd3c7a756916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140657
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-03-24 13:45:19 +00:00
Kevin Moore c4e526d7d8 Add a changelog entry for the NodeValidator fix
Change-Id: Id13be5f6f1adadb2a3cd00f7b5bfb5428b2fd575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140701
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-23 20:21:54 +00:00
Lasse R.H. Nielsen 8ab3dcf709 Make ArgumentError.check* functions return the valid argument.
This makes these checks useful in situations where you don't want to spend
an extra statement, like `=>` bodies or initializer lists (including
forwarding generative constructors).

Change-Id: Ia55b8741a7c75af631db48ac70e64597d8f96c73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135649
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-23 18:00:09 +00:00
Zichang Guo ed83a28d3e [dart:io] support Unix domain communications
Support Unix domain sockets communication on Linux, MacOS and Android.

Changes:
1. Add a field for InternetAddressType named unix.
2. Constructor of InternetAddress gains one more optional field: type. InternetAddress(String address, {InternetAddressType type});
3. Add another constructor to InternetAddress which taks raw address/path for ip/unix addresses as an argument. InternetAddress.fromRawAddress(Uint8List rawAddress, {InternetAddressType type});

The operation for unix domain sockets communication is basically the same as normal sockets except an InternetAddress with type unix should be passed.

Change-Id: I6a1135bbdd7f4e4fc745ccf8f95dec5272b6839b
Bug: https://github.com/dart-lang/sdk/issues/21403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125932
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-23 03:51:40 +00:00
Jonas Finnemann Jensen 9734463617 Bump DEPS for pub to include pub outdated
Change-Id: I714205bb7a2f561ba715ae214539eb92c86211d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140062
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2020-03-20 12:54:32 +00:00
Leaf Petersen 7aace6fa60 Make StackTrace generally not nullable in migrated NNBD library.
Bug: https://github.com/dart-lang/sdk/issues/40130
Change-Id: I13aba0c2a3fa5b1c3d3995f075ffd38f03aca897
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139880
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-19 23:31:30 +00:00
Jonas Termansen 96cf889e6b [dart:io] Fix HeaderValue parsing, toString(), and support null values.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40709

This change makes the HeaderValue parsing more strict in two invalid
edge cases, supports parameters with null values as a feature, and fixes
toString() so it always produces tokens or quoted-strings valid per RFC
7230 3.2.6.

The empty parameter value without double quotes (which is not allowed by
the standards) is now parsed as the empty string rather than null. E.g.
HeaderValue.parse("v;a=").parameters now gives {"a": ""} rather than
{"a": null}.

Invalid inputs with unbalanced double quotes are now rejected. E.g.
HeaderValue.parse('v;a="b').parameters will now throw a HttpException
instead of giving {"a": "b"}.

The HeaderValue.toString() method now supports parameters with null
values by omitting the value. E.g.:

  HeaderValue("v", {"a": null, "b": "c"}).toString()

now gives

  v; a; b=c

This behavior can be used to implement some features in the Accept and
Sec-WebSocket-Extensions headers.

Likewise the empty value and values using characters outside of RFC 7230
3.2.6 tokens are now correctly implemented by double quoting such values
with escape sequences. E.g.:

  HeaderValue("v",
      {"a": "A", "b": "(B)", "c": "", "d": "ø", "e": "\\\""}).toString()

now gives

   v;a=A;b="(B)";c="";d="ø";e="\\\""

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: Iafc790e03b6290232cac71fe14f995ce0f0b036b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136620
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-18 11:36:36 +00:00
pq 0e0d4fb76b linter 0.1.113
Change-Id: I75cc9478171de15df24bc5addfa0aca4dcf7e97a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139660
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-16 19:48:00 +00:00
Ben Konyi 09f756b9a1 [ dart:developer ] Added filterKey optional parameter to TimelineTask constructors.
Providing `filterKey` will result in all timeline events associated with
the TimelineTask including a `filterKey` entry in their arguments map,
set to the value provided in the constructor. This will allow for a
consistent way for tooling to filter asynchronous timeline events.

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

Change-Id: I06d3f9c73f06c2ff0e495f1b6a57fcf357d625a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139312
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-16 18:04:58 +00:00
Sigmund Cherem 344e149a89 [ddc, dart2js] readd dart:mirrors
Technically almost no user of ddc should be able to reach this compile-time error if they are using webdev (it appears a couple users do invoke it directly, though).  Project sass demonstrated that users of dart2js can notice this breaking change.

Given that we are bundling many breaking changes for null-safety on the next release, it seems like making imports to dart:mirrors a compile-time error is not strictly necessary at this time.

One idea is to change this to a compile-time error in our tools when users opt-in their libraries or when they enable strong null-safety mode.

Change-Id: I7f12657eba508e2d071dda60087a21475a303d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139494
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-14 03:04:37 +00:00
Alexander Thomas ca694e5ebf [release] Update CHANGELOG.md for 2.7.2
Change-Id: I1647e94a0371f1976a57b6db4906f499986a9b82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139288
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2020-03-13 14:09:52 +00:00
Jonas Termansen 5ae4448779 [dart:io] Provide epoch timestamps in the FileStat notFound object.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40706

The dummy object returned if FileStat.stat() and FileStat.statSync()
fail now contains Unix epoch timestamps instead of null for the
accessed, changed, and modified getters.

These timestamps are always non-null if the API succeeds and the
timestamps are meaningless when the API fails and returns the
FileSystemEntityType.notFound type. This change makes the timestamps
always non-null, which avoids all legitimate accesses needing a needless
null check when Dart becomes null safe. This change is consistent with
the mode and size getters that are initialized to non-null dummy values
when the API fail.

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: Iff6b34d04b60f4c9f4cf8d9dd0679f721d142ba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136585
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-11 13:39:13 +00:00
Keerti Parthasarathy 8329bd7ca8 Do not check for '.analysis_options' for default options file in builder.
Change-Id: I9decba4d0db318caedcfd3695f41c127b66f416f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2020-03-09 19:31:24 +00:00
Nate Bosch d3c0d59706 Disallow non-external generative JS constructors
Towards #40434
Towards #38875
Fixes #33834

- Add a shared error message for a non-external constructor.
- Check for non-external non-factory constructors constructors in the JS interop
  checks.
- Remove commented out code in Dart2JS that used to handle this check.
- Clean up skipped tests due to the missing static error. The status in
  `legacy_status_dart2js.csv` has no behavior impact but is removed for
  completeness.
- Add `external` to a few test cases.
- Remove unused dart2js error message.
- Add `annotating` to hardcoded spelling list.
- Ignore missing example for web specific error message.
- Switch some dart2js error expectations to GENERIC since the message is no
  longer defined with other dart2js errors.

Non-external synthetic constructors are ignored for now. An upcoming change will
automatically convert these to external.

Change-Id: I3b4a042392826c528689d81c4255f5369a0a7a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138043
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-06 17:06:39 +00:00
pq 3ebc8a6b08 linter 0.1.112
Change-Id: Icaaf4a1c489490e6c1588fed30f7f898970ece0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-28 17:00:32 +00:00
pq 7eaafa01cc linter 0.1.111+1
Change-Id: I9e311527a41f65b888c4208615158715e3ff6dbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137321
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-26 20:34:31 +00:00
Aman Kumar 4223717bfd Fixed typo
Spelling correction in line #33

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

GitOrigin-RevId: a5437b1d6ba15427a91970cfd7c5bc4287de079a
Change-Id: I0eab6bc8b2ade6b5feef13f4723d33107bebe7e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136806
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-02-22 00:14:23 +00:00
Aman Kumar 1cb77e8a00 Update CHANGELOG.md
Fixes some grammatical errors

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

GitOrigin-RevId: e3a580355e061b19885f8a48bbc641fd323bc010
Change-Id: I4fb31773e13c45754ec627095278730497e60b2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136803
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-02-22 00:14:09 +00:00
Zichang Guo a32f1936f9 [dart:io] format description of change in CHANGELOG
Some leftover from previous change. https://dart-review.googlesource.com/c/sdk/+/135357

Change-Id: I15b42bc36efaa0b64851d162d55fe7a695c285ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136760
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-02-21 19:52:41 +00:00
Lasse R.H. Nielsen 98b4635aa9 Make TypeError no longer implement AssertionError.
This means that TypeError no longer inherits a spurious `message` member.
The message of a platform-thrown TypeError is still available as `toString()`.

Fixes #40317

Bug: http://dartbug.com/40317
Change-Id: I77312859ebae3f92c2e56aeea6283b075b71c8d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136129
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-21 14:02:57 +00:00
Jonas Termansen 13ce2a8de4 [dart:io] Update CHANGELOG for new socket option semantics.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40702

The change originally landed in fddbc53a64
but it was decided to file a breaking change request about this change
as it is observable.

Change-Id: Ie9b045f3abec858486d8efb335eedf2c68e78951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136583
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-21 13:33:31 +00:00
Jonas Termansen 0683e9273d [dart:io] Throw StateError in meaningless getters on detached processes.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40483

The Process class will now throw a StateError if the process is detached
upon accessing the exitCode getter. It now also throws when not
connected to the child process's stdio upon accessing the stdin, stdout,
and stderr getters. Previously these getters would all return null.

The getters in question are meaningless for detached processes and there
is no reason to use them in that case. To provide a better experience
when Dart becomes null-safe, these getters are changed to throw and
never return null, which avoids all legitimate uses of the getters from
needing a null check that will never fail.

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: I776e0dc8bcd517d70332c60dd8ab88db17746aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134329
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-20 13:18:38 +00:00
Srujan Gaddam 59370f29c5 Fix html methods without returns
Several method bodies did not return a value conditionally or at all.

Change-Id: I01ca87e2e0501597bacb49bcddd10668b59026b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135626
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-19 20:43:34 +00:00
David Morgan 40ba886fa7 Revert "Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API""
This reverts commit 082aece5f4.

Reason for revert: tonic fix not yet landed in google3.

Original change's description:
> Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> 
> This reverts commit 34447c8dbb.
> 
> Reason for revert: Last Dart_AllocateWithNativeFields usage removed in Tonic
> 
> Original change's description:
> > Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> > 
> > This reverts commit 3d1b8b26c2.
> > 
> > Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
> > 
> > Original change's description:
> > > [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> > > 
> > > These methods are no longer necessary and all objects should be created
> > > using Dart_New instead.
> > > 
> > > Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> > > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> > 
> > TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
> > 
> > Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
> > Reviewed-by: Clement Skau <cskau@google.com>
> > Commit-Queue: Clement Skau <cskau@google.com>
> 
> TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,cskau@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: I2ac83e1bfccccd9b626acfa4a6ac517b4f3968fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136020
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,cskau@google.com

Change-Id: I74b6fafc86a3adcb52ca9f924fceda7831be8fc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136222
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-02-19 09:28:29 +00:00
Ben Konyi 082aece5f4 Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
This reverts commit 34447c8dbb.

Reason for revert: Last Dart_AllocateWithNativeFields usage removed in Tonic

Original change's description:
> Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> 
> This reverts commit 3d1b8b26c2.
> 
> Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
> 
> Original change's description:
> > [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> > 
> > These methods are no longer necessary and all objects should be created
> > using Dart_New instead.
> > 
> > Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> 
> TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
> 
> Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Clement Skau <cskau@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,cskau@google.com

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

Change-Id: I2ac83e1bfccccd9b626acfa4a6ac517b4f3968fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136020
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-18 17:34:44 +00:00
Daco Harkes 3c9f52a499 [vm/ffi] Fix DynamicLibrary extension name
And add changelog entry.

Follow up of: https://dart-review.googlesource.com/c/sdk/+/135463

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

Change-Id: I877f735c54e466031715c775d37544617402f9ff
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-kernel-nnbd-linux-release-x64-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136124
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-17 14:55:25 +00:00
Zichang Guo d39cdf03f8 Reland [dart:io] Stop forcing lower case on HttpHeaders
This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501

HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.

This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.

The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.

Bug: https://github.com/dart-lang/sdk/issues/33501
Change-Id: Ieb9f4061b27ed3bbc6d82e6a408c77d11abb037b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135357
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-14 22:23:17 +00:00
Ben Konyi 06f86bf58a [ VM ] Added nullability aware Type methods in embedding API
Added the following methods to the VM embedding API:
  * Dart_GetNonNullableType
  * Dart_GetNullableType
  * Dart_TypeToNonNullable
  * Dart_TypeToNullable
  * Dart_IsLegacyType
  * Dart_IsNonNullableType
  * Dart_IsNullableType

Change-Id: I7de1a99179c4d16a0e6a040bb209de18db379436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135484
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-14 18:29:17 +00:00
Zichang Guo 4512dfee4d add CHANGELOG for http status code change
Original cl: https://dart-review.googlesource.com/c/sdk/+/134763

Bug: https://github.com/dart-lang/sdk/issues/38898
Change-Id: Id587835ef0272d56f3c497ef386416be167fe25f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135493
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-14 17:18:17 +00:00
Mayank Patke 989180af3e [dart2js] Add normalization to RTI.
Change-Id: Ieecb90fbc6fdf13a44373d285fc5da450a9876b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134960
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-14 01:59:12 +00:00
Clement Skau 34447c8dbb Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
This reverts commit 3d1b8b26c2.

Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.

Original change's description:
> [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> 
> These methods are no longer necessary and all objects should be created
> using Dart_New instead.
> 
> Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-02-13 08:27:07 +00:00
Ben Konyi 3d1b8b26c2 [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
These methods are no longer necessary and all objects should be created
using Dart_New instead.

Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-12 22:48:08 +00:00
Ryan Macnak d71b1e5b04 [vm] Remove 'dynamic' from 'dart:core'; add missing accessors to the embedding API for dynamic, void and Never.
Fix crash when create type errors involving Never.

Bug: https://github.com/dart-lang/sdk/issues/12478
Bug: https://github.com/dart-lang/sdk/issues/40176
Change-Id: I8cff7042850717d02da36ad935cf0a49ace80c3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134886
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-07 23:47:50 +00:00
Ryan Macnak a73b0ceda2 [vm, lib] Teach mirrors about the Never type and member signatures.
Bug: https://github.com/dart-lang/sdk/issues/12478
Bug: https://github.com/dart-lang/sdk/issues/40497
Bug: https://github.com/dart-lang/sdk/issues/40510
Change-Id: I841d7e239b8235555ec26fbcb74ca41b5de60f58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134806
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-07 20:57:46 +00:00
Nicholas Shahan 35cd61819a Remove dart:mirrors library from dart2js and ddc SDKs
A followup change will delete the patches that are no longer needed once
these changes have been "mirrored" :P to the libraries files in the
flutter repos.

Change-Id: I7d255838b97922198248b29311facd4956001e25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134405
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 17:34:54 +00:00
Jonas Termansen fddbc53a64 [nnbd] Reland backporting socket option semantics from NNBD dart:io.
The Socket class will now throw a SocketException if the socket has been
destroyed or upgraded to a secure socket upon setting or getting socket
options.

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: If7029f8b42fd4b05cfb79eb439c09dc206dd3b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134328
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-02-05 14:26:09 +00:00
Jake Macdonald 12b5e23084 Revert "[dart:io] Backport semantic changes from the dart:io NNBD migration."
This reverts commit 4cd6243d77.

Reason for revert: Breaks anything using the bazel_worker package (which is used for modular compilation with build_runner).  https://travis-ci.org/dart-lang/build/jobs/645748778

Original change's description:
> [dart:io] Backport semantic changes from the dart:io NNBD migration.
> 
> The NNBD migration required making subtle changes to some dart:io
> semantics in order to provide a better API. This change backports these
> semantic changes to the unmigrated SDK so any issues can be discovered
> now instead of blocking the future SDK unfork.
> 
> The Process class will now throw a StateError if the process is detached
> upon accessing the stdin, stdout, stderr, and exitCode getters.
> 
> The Socket class will now throw a SocketException if the socket has been
> destroyed or upgraded to a secure socket upon setting or getting socket
> options.
> 
> Change-Id: I956fd07e713e51ebd479ebbfe4790d8d2fdf0744
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133989
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=sortie@google.com,lrn@google.com

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

Change-Id: I744662fcd14ca232bf44a584bb6f3974d48da69a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134361
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-02-05 10:03:47 +00:00
Jonas Termansen 4cd6243d77 [dart:io] Backport semantic changes from the dart:io NNBD migration.
The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports these
semantic changes to the unmigrated SDK so any issues can be discovered
now instead of blocking the future SDK unfork.

The Process class will now throw a StateError if the process is detached
upon accessing the stdin, stdout, stderr, and exitCode getters.

The Socket class will now throw a SocketException if the socket has been
destroyed or upgraded to a secure socket upon setting or getting socket
options.

Change-Id: I956fd07e713e51ebd479ebbfe4790d8d2fdf0744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133989
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-03 15:10:45 +00:00
Zichang Guo 91a3ea89c8 Revert "[dart:io] Stop forcing lower case on HttpHeaders"
This reverts commit b2b7337ad4.

Reason for revert: flutter build broke!!

Original change's description:
> [dart:io] Stop forcing lower case on HttpHeaders
> 
> This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501
> 
> HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.
> 
> This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.
> 
> The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.
> 
> Bug: https://github.com/dart-lang/sdk/issues/33501
> Change-Id: I6f7f2ef907b229773c283140c07f2de4cd500981
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119100
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=whesse@google.com,sortie@google.com,lrn@google.com,zichangguo@google.com

Change-Id: I4d4299393ad6549b250053df8823e726855e2baf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/33501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134102
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-01-31 22:32:22 +00:00
Mayank Patke 023f286772 [dart2js] Update generic function subtyping.
We now test bounds for mutual subtyping rather than structural equality
up to renaming of bound type variables and equating all top types.

Change-Id: I7dd23a3211a1631e463ea90c3173f3deae46ca23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134042
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-31 18:33:02 +00:00
Zichang Guo b2b7337ad4 [dart:io] Stop forcing lower case on HttpHeaders
This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501

HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.

This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.

The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.

Bug: https://github.com/dart-lang/sdk/issues/33501
Change-Id: I6f7f2ef907b229773c283140c07f2de4cd500981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119100
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-31 17:08:52 +00:00
Nate Bosch 833c70be61 Add the first Kernel check for invalid JS interop
Add a visitor that checks for invalid JS interop usage and reports
diagnostics. Wire the visitor up to the `DevCompilerTarget` and `Dart2jsTarget`.

- Add a message without an analyzer code for this error. In the long term we may
  want to also add it to analyzer.
- Add a new package `_js_interop_checks` to share the kernel visitor between
  dart2js and ddc. Some of the code is copied from ddc, and in the long term we
  can centralize more of the detection of JS interop annotations to this
  package.
- Implement the first check to detect definitions of `operator []` or
  `operator []=` which are not allowed in JS interop classes.

Change-Id: I095a4b7f4732796dbc3cae55b32d5fc9bcdbd798
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130733
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-28 22:39:10 +00:00
pq 9c04bdf1c6 bump to linter 0.1.110
Change-Id: I4763c5f99e06036f990a347954fc13e9d5f42d0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133436
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-28 17:15:28 +00:00
Danny Tuppeny 4b9887b406 Correct date of v2.7.1 release (32nd -> 23rd Jan)
Change-Id: I1ab72d5641491b6edbd3b571afb9fc6ff99ba33d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133221
Auto-Submit: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-01-24 13:18:07 +00:00
Alexander Thomas d202ee3b72 [release] Prepare CHANGELOG for 2.7.1
Change-Id: Id7bd33db6b399dc3c6b2f1861a63d570b30f2fbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133062
Reviewed-by: Michael Thomsen <mit@google.com>
2020-01-23 11:53:55 +00:00
Lasse R.H. Nielsen 0c71fb2d95 Add new constructors to TypedData classes.
The new constructor creates a view of a (sub range) of the elements of another TypedData object.
It works for both typed lists and ByteData.

The advantage over the .view constructors is that it handles other views properly, including their
offsetInBytes in the start computation, which it is easy to forget to do when you call

  SomethingList.view(other.buffer)

directly, and that constructor cannot compensate for the information because it only existed on the object
that the buffer was extracted from, not on the buffer itself.

Change-Id: I8abafbf2a81a32ea67f5d4c0f65dcfea08b49bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127321
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-01-22 14:39:48 +00:00
Sigurd Meldgaard be1ddc8a64 Bump pub revision in DEPS
New commits included in this revision:
```
$ git log --pretty=oneline 4d8ecbd409d773fec47da33b7e6c8db0b51487fd..429a06039d185149f387a65e3503b0693ce6d24e
429a06039d185149f387a65e3503b0693ce6d24e (HEAD -> master, origin/master, origin/HEAD) Parallel fetching of available versions (#2280)
6705b085b9bf4754a4c8002a070f436f115dc4d1 Retry on all SocketExceptions (#2254)
a1820273b9f3c7bb5a13d26cd14d30d5bab187ae Use a unqiue file name for the snapshot during testing. (#2303)
72686563e767f8a359e48a267a2c323953a6a0ef Include osx and windows testing on Travis (#2299)
a7a66821d13920b9b22cc394dfa55c679e971e40 Fail travis for lints and warnings (#2301)
25aa24c023453f064dad8f3cce1bbd55269d0efa Omit languageVersion when there is no SDK constraint (#2300)
82e60a3dcb3afe753563e7d304827fb650bc4833 Use LOCALAPPDATA for system cache on windows (#2297)
ceaa86f2c7eb35f044b4c202268a17361de68d13 Enforce and fix lints from package:pedantic (#2291)
6ce1606564352c305bd0f6d97704f0f7f6ebbca0 Use more collection literals for args (#2293)
be245e6baeebb71aaf3b3a260fcfbbb011a9a7e0 Rename some test utilities from Mock to Fake (#2294)
f7638ce85298df7d9e73d717dd4d81f499681720 Refactor Set.add following !Set.contains (#2295)
390022b24bc076cb934385936ac7904f045a75ba Filter out `null` from `getCachedPackages`. (#2292)
0eea0c4421ed0b83c8597b62dacf68b93de172b9 Fix existing hints and lints (#2290)
7cf2fe860a40517ccb65f5efdda9e4dc350142c3 promote strict deps failures to errors from warnings (#2289)
```

Change-Id: I62782b29e16092114940df00811bfdd20c8045fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131839
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-01-16 14:45:59 +00:00
pq 55637a41a8 linter bump to 0.1.109
Change-Id: I975655beb1fd8c5eca986da498e9707b85efd50f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-15 17:27:34 +00:00
pq c0dfdb27e7 linter 0.1.108
UPDATE (1/3): blocked on a new analyzer roll (details: https://github.com/dart-lang/linter/issues/1927)
UPDATE (1/8): updated to 0.1.108


Change-Id: I4fc825c5019fee05b4d9e1ec38bd50f9044f42dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130081
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
2020-01-08 19:28:51 +00:00
Sigmund Cherem d735f1f12d (dart2js): enable new-rti by default
This change:
* adds the `--use-old-rti` flag to revert to the old behavior
* enables the new behavior by default
* changes the -rti- builders to run the old rti instead of the new rti
* documents the change in CHANGELOG.md

I've kept around the logic as `useNewRti` to avoid swapping all the conditions
in the compiler.

Change-Id: I773ac33b658cb60f72e0b6beef83375abec31bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127492
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-01-04 00:44:25 +00:00
Nate Bosch 113ff6c993 Enforce that allowInterop is used in DDC
Fixes #39074

DDC emits Dart code that can usually be called with the same semantics
as JS there is no guarantee that a function passed to JS and then
invoked successfully was wrapped with `allowInterop`. The wrapping is
always required in Dart2JS. To make DDC more strict, add interceptors
that check for the usage of `allowInterop`.

Whenever a JS interop function or setter is passed an argument which is
statically typed as a Function, but not wrapped with `allowInterop` at
the call site, wrap it with `assertInterop` which will check the
argument at call time and fail with a clear error if it was not wrapped.

Whenever a JS interop function is torn off, either at the top level or
from an instance, wrap it with a function that will also inject these
checks at runtime.

There are still holes where we can't catch the mistake:
- An argument which is statically dynamic and a Function at runtime
  won't be caught.
- A Function which is stored in a collection won't be caught.
- A JS interop definition where a getter returns a Function which takes
  a Function as an argument is not checked.
- A dynamic call through to javascript is not checked.

Changes:

- Refactor `_isJsLibrary` and add `isJsMember`, and `isAllowInterop`
  utilities to determine what needs wrapping.
- Update `assertInterop` to give a more clear error when it fails, and
  to ignore non function arguments.
- Add `tearoffInterop` to wrap a function an ensure that any function
  typed arguments are wrapped.
- Inject `assertInterop` around Function arguments passed to JS methods.
- Inject `assertInterop` around Function arguments passed to static or
  instance JS setters.
- Inject a runtime wrapper around static or instance Function tearoffs.
- Add a test covering all flavors of checks that are supported.
- Change the interop expando to an `Expando<dynamic>` in the NNBD SDK to work
  around a stricter type check. https://github.com/dart-lang/sdk/issues/39971

Potential improvements:

If the `tearoffInterop` turns out to be too heavy, we could loosen it so
that we only wrap methods if any of their argument types are statically
declared to be a Function.

Change-Id: Ibc92df5b54e1a041b4102a07b8398b774b6bd1d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128462
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-01-02 20:24:26 +00:00
Srujan Gaddam 02fbf8c47d Modify changelog for native return type changes
Bug: https://github.com/dart-lang/sdk/issues/39627

Changelog reflects changes in
https://dart-review.googlesource.com/c/sdk/+/128368.

Change-Id: Idace6e7c7af81ebd9e0b61639e239205e55e53d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128640
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-12-17 19:17:30 +00:00
Sigurd Meldgaard 1fe9d7c4b6 Bump pub version
This includes the single commit:

```
4d8ecbd409d773fec47da33b7e6c8db0b51487fd Don't precompile on pub get/upgrade by default (#2277)
```

Change-Id: I1e72498487858cfc61f3af03e2eeb3397499d246
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128070
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2019-12-13 08:06:28 +00:00
Nicholas Shahan c561a9eacc [dartdevc] Delete the legacy version of DDC
Change-Id: I2dc3999b0b7e93252402422d662fb5da4dcca3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127840
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-12-12 21:53:08 +00:00
pq 3e8e11b95a bump to linter 0.1.106
Change-Id: I59aa5f6ad1c469c281d09697c701a10b27e68054
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-12-11 18:52:07 +00:00
Alexander Thomas 0f4a673a10 [release] Merge the two 2.7.0 sections in the changelog
For some reason, a second 2.7.0 section was added. This CL merges the
additions from https://dart-review.googlesource.com/c/sdk/+/127480/ into
the exisiting 2.7.0 section.

Change-Id: Ie23df9c8656d3c0fd4f8cd3bd21e7bc85ba28cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127889
Reviewed-by: William Hesse <whesse@google.com>
2019-12-11 09:44:24 +00:00
Robert Nystrom bbd850eac8 Tweak the CHANGELOG for 2.7.0.
Looks like everyone has been keeping it neat and tidy, so there was
little to do. I added a very short blurb about extensions and then just
tweaked some formatting a little.

Change-Id: If4d7666a1ec10313a3b37f0b4eaa1b981e3f610b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127450
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-12-10 02:17:04 +00:00
Alexander Thomas 7bf088e4dd [release] Prepare the CHANGELOG for 2.7.0
TBR=whesse@google.com

Change-Id: I3ba75be4eb7194ded270179c842ed8949a75d4ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127480
Reviewed-by: Alexander Thomas <athom@google.com>
2019-12-06 15:13:28 +00:00
pq a3953b607d linter 0.1.105
Change-Id: Id3d59bf77326a6fb98e8d5632953e9a3f1ddf512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127340
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-05 23:01:41 +00:00
mnordine 73cca4480c Fix typo
I believe it should be `dart_tool`

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

GitOrigin-RevId: 057e2fd1b72e50894d09c774f15026c9ca4e89a5
Change-Id: I90054ce5ecc8c1b75a25a518d685575d17016ec2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124720
Reviewed-by: Michael Thomsen <mit@google.com>
2019-11-20 11:26:45 +00:00
Ben Konyi 1c12878d05 [ dart:io ] Added timeline events for HttpClient connections and requests
Setting the `enableTimelineLogging` property of `HttpClient` to true results in
timeline events being created for HTTP connections and HTTP requests.
Timeline events contain general connection information, including:
  - Request type
  - Status code
  - Request / response headers
  - Cookies
  - Non-sensitive proxy information
  - Relevent error messages for failed connections

Change-Id: Ibe16a312ab5398c9ae886ea07bea5ca70b63e440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123540
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-11-16 00:46:46 +00:00
pq bb29b1545b linter 0.1.104
Change-Id: I03b72ba583146d1c3224f6941bdaaaa68a6997e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124915
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-11-14 14:30:06 +00:00
Leaf Petersen 158559bc03 Changelog update for extension method prefix change.
Change-Id: I530e8c0c704da41c49b12a20a7843ecd5e40abb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124941
Reviewed-by: Michael Thomsen <mit@google.com>
2019-11-12 18:19:44 +00:00
Alexander Thomas 64b0bfac68 [infra] Update CHANGELOG.md for 2.6.1
Change-Id: I0a508941b160af012833c12d1c4febfb6e2c176a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124690
Reviewed-by: Michael Thomsen <mit@google.com>
2019-11-11 11:52:13 +00:00
Alexander Thomas 2db4368eb8 [infra] Update CHANGELOG.md for 2.6.0
Change-Id: Ie8387c2b9c9903ef414fab4b5d7f87ad03e68835
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124131
Reviewed-by: William Hesse <whesse@google.com>
2019-11-05 15:11:02 +00:00
creativecreatorormaybenot 6c0387da67 Fix typos in CHANGELOG.md
Closes #39215
https://github.com/dart-lang/sdk/pull/39215

GitOrigin-RevId: fa4a20b0caabcad6c6a25c354fc5adb45d853420
Change-Id: I725728f68b7fd45115cdfd45fac62fda34c9a5ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124040
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-11-04 11:22:38 +00:00
pq b76ab4012d linter 0.1.103
Change-Id: Ibdb145bde6617d25885a6cc666e34404e487290f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-11-01 22:16:38 +00:00
Ryan Macnak d96cd87896 [vm, reload] Initialize new fields in existing instances lazily.
Change-Id: I29c52feba2a404a7910888ce2bbb46e9aa8dd50f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123547
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-01 20:06:52 +00:00
pq ebd059030b bump to linter 0.1.102
Change-Id: I749f392901734ac265ccd2fe2650930edc579a72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-29 20:06:56 +00:00
Sigurd Meldgaard 3ce89fdfff Update the pub version
Includes the following commits:
80ac76400ff58fde3c5a335d860d196c3febe837 Warn about authors field in pubspec.yaml
6b6e02fcdd8094ccbba919b2fdc74947b1cebb71 Warn about old flutter plugin registration format (#2233)
8308acbc48ebd4da4ab7f45169af8dee4df18e79 Language versioning
b18d4f6a5d035f4f72ef187e9cdb133d18848c2d update doc
408bdd58ab01689fd82cc036b4142f7b592b4ba0 Added utility for faster local testing (#2235)
055fc19d2e06e819dbd47b3b56909c47bd893f66 Upgraded package:yaml to 2.2.0 (#2237)
0f3baf7abb13702f7fb1ff3709c584065df1435c Remove unused Map `availableVersions`
cfa9dc760b6b601f9473e65d15f15b60a319336d Fix to show proper error message when git is not installed (#2209)
d99b0d58f4059d7bb4ac4616fd3d54ec00a2b5d4 Rephrase warnings for missing deps (#2203)
76b8c30395b37f96d3db3e842344cc842bdd7c24 Don't mention 'transformed dependencies'. (#2199)
4bd65e0f54e6e4540f03467b0272a5666e8d54ba return the hashCode of the description (#2198)
92b52682e8fc6eed9ef2e77ed890647f75570165 Test more pre-release behavior. (#2175)
066ac118d406500f672339e25f0154af9321deac update to latest pkg:analyzer (#2172)
289804a5d2c9746b4e86c271c2abcfe17417e20f Minor typo fixed (#2166)

Change-Id: I3922bcaacb5399853a291b92d7192d21f719d224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123404
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2019-10-29 14:28:44 +00:00
Zichang Guo 2e15d0eb8c [dart:io] add IOOverrides.serverSocketBind to enable overriding ServerSocket.bind()
Fix: github.com/dart-lang/sdk/issues/39094
Change-Id: Iaf8b224e89210027a62815596c759034cca1d4f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123220
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-10-28 22:04:39 +00:00
Daco Harkes c49378aadf [changelog/ffi] Document dart:ffi changes for D26 - tweaks
Follow up of https://dart-review.googlesource.com/c/sdk/+/122149

Change-Id: I74f93e0a17a4a648da742cd2e62a424cfc1eb3db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122621
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-10-23 09:45:25 +00:00
Michael Thomsen c8b903c2f9 Update CHANGELOG.md
Clarify that extension methods in 2.6 are in preview

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

GitOrigin-RevId: 6f6a43bcfa314a0a7eea644ef588555550bef434
Change-Id: If018d323a358db465e9c60ae1ef1d0baec8ed178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122400
Reviewed-by: Alexander Thomas <athom@google.com>
2019-10-22 13:33:20 +00:00
Daco Harkes 2c1d405c15 [changelog/ffi] Document dart:ffi changes for D26
Change-Id: I371a9b9bac29bc75bc5b69f960da56854f515680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122149
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-18 19:20:43 +00:00
Ben Konyi 8fd83cb222 [ dart:developer ] Remove optional 'parent' parameter from TimelineTask.withTaskId to avoid ID collisions
If parent is a param in the TimelineTask.withTaskId() constructor, we have the possibility of running into this situation:

TimelineTaskA - id 0

TimelineTaskB - id 1
TimelineTaskC - id 2 - parentId 1
TimelineTaskD - id 0 - parentId 2 (this task created with TimelineTask.withTaskId(0, parent: C))
TimelineTaskE - id 3 - parentId 0 (now who is the parent of E? D or A?)

If we do not allow the user to specify parent in the withTaskId() constructor, we remove the possibility of this clash. This clash happens because the user was able to inject an event with id 0 into an async tree defined by the parent parameter.

By removing the parent parameter from the withTaskId() constructor, we can rely on different sources of truth for the different TimelineTask constructors.
  - If taskId is specified via TimelineTask.withTaskId(), then that is the source of truth for inferring the async event tree (events with the same async id are in the same async tree).
  - If parent is specified via TimelineTask(parent: parent), then that is the source of truth for inferring the async event tree.
  - If neither taskId nor parent are specified (e.g. TimelineTask()), we default to timestamp inference.

Change-Id: I491a20cf1d1aaea744ab92e56602269390e73fb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121680
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2019-10-14 23:37:48 +00:00
Michael Thomsen e6a856a3b3 Update CHANGELOG.md with dart2native
Fixes https://github.com/dart-lang/sdk/issues/38768

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

GitOrigin-RevId: 233a7297f53f53fc0cc6823259ba8ddaf011879f
Change-Id: I54fa5f5f1da165a85751e3d7ce6d37950b685136
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121360
Reviewed-by: Clement Skau <cskau@google.com>
2019-10-11 14:21:04 +00:00
pq b716137c90 linter 0.1.101
Change-Id: I9a507ecd0d4756f681f31994c2a31dcb4b347309
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-10 17:11:17 +00:00
Mark Zhou 36e4d5e3c2 Reland "[dartdevc] cleaning up unused web files"
This is a reland of e866f043cf

Original change's description:
> [dartdevc] cleaning up unused web files
>
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
>
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: I7e01fb4ad60e47808721fa49b3ca3498e7aeaf46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120200
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-05 00:27:22 +00:00
pq 2ca8125d7a bump to linter 0.1.100
Change-Id: I4c5a1b4298b7d3161ee6f0f062990b4452c3cf24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-04 17:53:05 +00:00
David Morgan d6c6d12ebf Revert "[dartdevc] cleaning up unused web files"
This reverts commit e866f043cf.

Reason for revert: Breaks google3.

Original change's description:
> [dartdevc] cleaning up unused web files
> 
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
> 
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=scheglov@google.com,vsm@google.com,markzipan@google.com

Change-Id: I1db094d94d699d4d18c4091f57c7cb775eb95dd5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120040
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-10-04 10:11:30 +00:00
Lasse R.H. Nielsen ad78373d6c Add changelog for static extension members.
Change-Id: I85bb821ce8b4331540b67e0288c6b029bf0ec0df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119842
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
2019-10-04 08:27:54 +00:00
Mark Zhou e866f043cf [dartdevc] cleaning up unused web files
Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649

Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-04 02:40:43 +00:00
Ben Konyi e87f3407c8 [ dart:developer ] Added optional parent parameter to TimelineTask constructors.
Specifying a parent will result in an argument being added to 'start'
events for that TimelineTask named 'parentId', which contains the task
ID of the parent. This is to be used by DevTools to show relationships
between asynchronous tasks that are not currently supported in the trace
event format used by Catapult.

Change-Id: Id0a030f018f5a6ac1e3b0ef2e89c1cd732790f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119520
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-10-03 16:33:38 +00:00
pq 470c5eab8e bump to linter 0.1.99
Change-Id: I40f4be96d6fc953ae536203f86360dda6139467a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-01 14:31:57 +00:00
Alexander Thomas e39a15b6d6 [release] Add 2.5.1 to CHANGELOG.md
TBR=whesse@google.com

Change-Id: Id50b298857133c6b3b89626c8b84f1412c1940be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119329
Reviewed-by: Alexander Thomas <athom@google.com>
2019-09-30 11:32:25 +00:00
pq 87d795c177 fix formatting
Change-Id: I45984e866ff5403a90fbd996ea39a5bce0e5787b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119020
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-26 16:27:02 +00:00
pq 863694b7eb bump to linter 0.1.98
Change-Id: I7f6893038fb55a441ed9d899d2f78518f27aa952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118468
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-23 22:19:00 +00:00
Alexander Markov 2e34231c8e [vm] Do not mirror default values of parameters of abstract methods
In bytecode mode default values are part of the method body, which is
omitted for abstract methods.

In anticipation for this future change, default values of parameters of
abstract methods are no longer available through dart:mirrors.

Please also see https://github.com/dart-lang/sdk/issues/38464

Change-Id: I47742b588690ea96cb3ca636ff86e4e042bfe5a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117299
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-09-18 20:12:50 +00:00
Dmitry Stefantsov a62289451d Update changelog to include the recent breaking change
Link to the breaking change request:
https://github.com/dart-lang/sdk/issues/37985

Change-Id: I0fcb058e953a43a20e7b663f63bb88100f376a6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116762
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-12 07:37:17 +00:00
Alexander Thomas 35a7f4b552 [release] Update CHANGELOG.md for 2.5.0
TBR=aadilmaan@google.com

Change-Id: Ibe6b6e41cde9631f7aeaf354a1f27c130c9198d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116521
Reviewed-by: Alexander Thomas <athom@google.com>
2019-09-10 11:28:13 +00:00