Commit graph

101572 commits

Author SHA1 Message Date
Jens Johansen 81f5879ca0 [parser] Rename firstToken to beginToken in beginSwitchCase/endSwitchCases
This makes it more consistent with other listener calls.

Change-Id: Iae98ae4c37078c15ea785faef1cb21b2ea85bb48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-04 08:23:36 +00:00
Martin Kustermann ed409e53ff [dart2wasm] Avoid optaining substitutions if dst type is not generic
If we do a type check against a class that isn't generic, then we can
safely ignore all the type arguments - because irrespective of their
values - either the class we test against is in the transitive super
hierarchy of an object's class or not.

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

Change-Id: Ibf6950492d4c33d7eaf55d6ce8389ebfac201b00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2024-06-04 06:35:59 +00:00
pq a35de7937c quick fix for FINAL_MIXIN_CLASS
Change-Id: Ief41674c064116a6152f413bf42a2d23b404eda2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369504
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-04 00:44:41 +00:00
Sam Rawlins feea19e376 Remove old UpdateSdkConstraints fixes
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I01acce254064c667ec641114ffd8d7247d11a0e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-06-03 23:18:18 +00:00
Sam Rawlins e5f3a50a7a DAS: Support Parse-only correction producers
This brings the soft static enforcement that we had before: a producer
that extends ParsedCorrectionProducer cannot access the
ResolvedUnitResult of a ParsedUnitResult.

Also we add some runtime enforcement that the producers used for parse-
only lint rules are ParsedCorrectionProducer.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: If77fa66ae6fc070de1c7e931eb992a4adc14b68a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369561
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-06-03 23:13:18 +00:00
Konstantin Shcheglov 1f3d1b6c81 QuickFix. Issue 55773. Flatten FutureOr() when convert to async.
Bug: https://github.com/dart-lang/sdk/issues/55773
Change-Id: I09653a5bce4c590fc95cbfb25eb3fbde1ffeb7c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369502
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 23:10:09 +00:00
pq 3971aa9e4c quick fix for INTERFACE_MIXIN
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I536eb9bf75ad1c7df3e697c75874954f4a882905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369503
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 22:41:59 +00:00
Srujan Gaddam e832d98448 Reland "Update package:web rev to 7604578eb538c471d438608673c037121d95dba5"
This reverts commit 8c049ac2ea.

Reason for revert: Relands with patch fixes to google3 and after
updating video_player.

Original change's description:
> Revert "Update package:web rev to 7604578eb538c471d438608673c037121d95dba5"
>
> This reverts commit 751052e826.
>
> Reason for revert: Broke a target in google3 due to name collisions of "Module"
>
> Original change's description:
> > Update package:web rev to 7604578eb538c471d438608673c037121d95dba5
> >
> > Includes 7604578eb5.
> >
> > Change-Id: I7437304ee64cb71608ed36597d26921991faa3b6
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367520
> > Auto-Submit: Srujan Gaddam <srujzs@google.com>
> > Reviewed-by: Devon Carew <devoncarew@google.com>
> > Commit-Queue: Devon Carew <devoncarew@google.com>
>
> Change-Id: I419f2b044be8196554bad7c3a9530e30acabcafc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368041
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I64094a4b26c2ab10155625e855a6205c637aa5ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368042
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-03 21:51:20 +00:00
pq a86ec25ffb wildcard variable test for unused_result validation
We talked about migrating these tests to using language version overrides but I lost the plot over the weekend :).

Can you suggest how I'd modify this? How would I opt into this feature with a language version override if there is not version in which we have it enabled?


Change-Id: Ie0411d8f24e7468692a99cc2bc645bdbd3d5a500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369420
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 21:45:12 +00:00
Konstantin Shcheglov cba9543c70 QuickFix. Issue 55805. Create extension setter.
Bug: https://github.com/dart-lang/sdk/issues/55805
Change-Id: I0972eee46a1b0ab8e14235e9a56fd08949f634f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369522
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 21:29:20 +00:00
Kevin Moore b981930894 vm_service: code cleanup
Change-Id: I4a53d9b4f570cf2c8b7c5bf119542a7e4702ce2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369380
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2024-06-03 21:23:38 +00:00
pq 23b2d6b72e quick fix for FINAL_MIXIN
Change-Id: I470970907a35feb644f0a5286b7fbe16120f6095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369541
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 21:21:16 +00:00
Sam Rawlins cc00e980f5 linter: Allow lint rules to specify afterLibrary actions
Add `NodeLintRegistry.afterLibrary` API which allows a lint rule to
register a callback to be called after the last CompilationUnit is
visited.

Change-Id: I77bf279412617e6f2c825b6dbeaf34849e515156
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368524
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-06-03 20:26:50 +00:00
pq 46cefa8228 quick fix for FINAL_METHOD
Change-Id: I1e8bbe663c3f3ca8aa3c6bd50aed7e274a36bb44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 19:57:12 +00:00
Devon Carew 87239aa8ec [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, cli_util, clock, collection, convert, crypto, csslib, dartdoc, ecosystem, file, fixnum, glob, html, http, http_multi_server, http_parser, json_rpc_2, lints, logging, markdown, matcher, mime, package_config, path, pool, pub_semver, shelf, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, sync_http, term_glyph, test_descriptor, test_process, test_reflective_loader, typed_data, vector_math, watcher, yaml
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (b3608bd..6a5a2e6):
  6a5a2e6  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/args#276)

async (f933ddf..4073129):
  4073129  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/async#276)

bazel_worker (2ec90c0..c76d7c8):
  c76d7c8  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/bazel_worker#93)

benchmark_harness (6fa42b0..f6ef33d):
  f6ef33d  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/benchmark_harness#107)

boolean_selector (84467e5..62f82f6):
  62f82f6  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/boolean_selector#62)

browser_launcher (0dcf224..7348cea):
  7348cea  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/browser_launcher#60)

cli_util (9fe3eeb..c37d5e1):
  c37d5e1  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/cli_util#104)

clock (80e70ac..7cbf08e):
  7cbf08e  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/clock#65)

collection (fe2e800..586a5e8):
  586a5e8  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/collection#346)

convert (056626e..302af1b):
  302af1b  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/convert#106)

crypto (3f815ac..0a10171):
  0a10171  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/crypto#171)

csslib (141dd65..23c314b):
  23c314b  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/csslib#202)

dartdoc (ed97585..45627f9):
  45627f92  2024-06-01  dependabot[bot]  Bump the github-actions group across 1 directory with 3 updates (dart-lang/dartdoc#3777)

ecosystem (ad9da15..bc25c0c):
  bc25c0c  2024-06-01  dependabot[bot]  Bump the dependencies group with 4 updates (dart-lang/ecosystem#265)

file (8ce0d13..07cacae):
  07cacae  2024-06-03  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 (google/file.dart#240)

fixnum (ac892ad..a8157d8):
  a8157d8  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/fixnum#130)

glob (ee48ea8..eaec6a4):
  eaec6a4  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/glob#94)

html (00d3461..3bc803d):
  3bc803d  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/html#247)

http (6337ee3..7bfbeea):
  7bfbeea  2024-06-01  Anikate De  `ok_http`: Add BaseClient Implementation and make asynchronous requests. (dart-lang/http#1215)

http_multi_server (4a791af..25941e2):
  25941e2  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/http_multi_server#70)

http_parser (702698a..551e0e4):
  551e0e4  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/http_parser#93)

json_rpc_2 (3187f7b..5b1cbd6):
  5b1cbd6  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/json_rpc_2#115)

lints (b254c7e..baaaa56):
  baaaa56  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 (dart-lang/lints#191)

logging (7f722dc..73f043a):
  73f043a  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 (dart-lang/logging#166)

markdown (c1013dc..3d8d7a8):
  3d8d7a8  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/markdown#614)

matcher (4ac4096..0abd405):
  0abd405  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/matcher#249)

mime (b01c9a2..8d2d559):
  8d2d559  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 (dart-lang/mime#124)

package_config (3909676..903a0e5):
  903a0e5  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/package_config#155)

path (aea50fa..8fc4c72):
  8fc4c72  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/path#167)

pool (1a6f2df..88e4636):
  88e4636  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/pool#87)

pub_semver (f57c9c3..a9025f3):
  a9025f3  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/pub_semver#104)

shelf (338962c..ea3c983):
  ea3c983  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/shelf#434)

source_map_stack_trace (6834af5..96a8213):
  96a8213  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/source_map_stack_trace#55)

source_maps (181a41c..caa79c2):
  caa79c2  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/source_maps#94)

source_span (e80cb44..59a3903):
  59a3903  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/source_span#113)

sse (1bb0a98..7dcde16):
  7dcde16  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/sse#111)

stack_trace (4d346f7..ab09060):
  ab09060  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/stack_trace#155)

stream_channel (61ad872..b41ff7a):
  b41ff7a  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/stream_channel#107)

string_scanner (32468bd..7b37c1b):
  7b37c1b  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/string_scanner#75)

sync_http (82553db..7622bdd):
  7622bdd  2024-06-03  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.6 (dart-lang/sync_http#47)

term_glyph (a46b48b..c86e817):
  c86e817  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/term_glyph#53)

test_descriptor (d61bf6c..b23d7cc):
  b23d7cc  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/test_descriptor#67)

test_process (4ab3f1c..862eaf3):
  862eaf3  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/test_process#59)

test_reflective_loader (f8807e0..816942e):
  816942e  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/test_reflective_loader#63)

typed_data (fb1958c..d14f965):
  d14f965  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/typed_data#88)

vector_math (43f2a77..3c03ac3):
  3c03ac3  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.2 to 4.1.6 (google/vector_math.dart#325)

watcher (c182cd3..c00fc2a):
  c00fc2a  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/watcher#168)

yaml (8fb8147..7873b3f):
  7873b3f  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/yaml#165)

Change-Id: I734de0d6c7013c49b879f927d5ecda4d675b19ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369520
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-03 17:50:18 +00:00
Jackson Gardner 9fa160b706 Revert "[dart2wasm] Check import/export pragmas in user code"
This reverts commit 35bc17a0fa.

Reason for revert: Breaking flutter web engine unit tests: https://github.com/flutter/flutter/issues/149600

Original change's description:
> [dart2wasm] Check import/export pragmas in user code
>
> Change-Id: I926d108a4571d685c67d3a174a8e506910cce8f7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369020
> Commit-Queue: Ömer Ağacan <omersa@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: Iba57910e7492abb7371172ecdb4fc2cc18fed66e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369500
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2024-06-03 17:28:36 +00:00
Sam Rawlins 030b79dc1c analyzer: Report bare 'super' expression as ExpressionFunctionBody
Fixes https://github.com/dart-lang/sdk/issues/55525

Change-Id: Id6e1321d093b4b77f0504748e931db8f460c1b45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369122
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-03 17:24:26 +00:00
Sam Rawlins 6e2ef10cde linter: Migrate avoid_implementing_value_types tests
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I8272cdf06e811344c1ec104f367eaf7bd578eb19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369340
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-06-03 15:54:00 +00:00
Sam Rawlins 42b262d0dd linter: Migrate avoid_classes_with_only_static_members tests
Change-Id: I82e92148c7b3f21db2a7e218cc6e0532b73a6f5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369260
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-03 15:46:39 +00:00
Danny Tuppeny d3c06c4822 [analysis_server] Fix handling of semantic tokens when roots are being built
This fixes https://github.com/dart-lang/sdk/issues/55889 which is repeat of https://github.com/Dart-Code/Dart-Code/issues/3929 (but semantic tokens was not fixed with that CL).

The issue was when the server was initialized with no roots (for example an empty workspace) and then a new file opened with requests being sent immediately before the roots were updated.

The fix changes from directly calling `server.getResolvedUnit` to instead using `requireResolvedUnit` which handles this situation by waiting for any in-progress context changes and retries.

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

Change-Id: Id078947e5c6665b2afb9e31adc244f16987870f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-06-03 15:45:56 +00:00
pq 92fcb8d21c quick fix for FINAL_ENUM
Change-Id: I17a21c98a2034e762d5f0f8b54bb99b4c88a3896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369400
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-03 14:56:29 +00:00
Johnni Winther 4692937341 [cfe] Support extension types in macro introspection
Change-Id: I946ba3461ca2ff897cf4c1071b3aa356bf835535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368102
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-06-03 13:04:31 +00:00
Jens Johansen 1c3d4dbe42 [io/socket] Test of being able to read big chunks from a socket
Follow-up to https://dart-review.googlesource.com/c/sdk/+/369243 where
without that CL (i.e. after
https://dart-review.googlesource.com/c/sdk/+/369141 but before the fix)
the test will hang. With the CL the test finishes as it should.

Change-Id: I7b37be1c515a3666a8040d1790b55ff99b68a1be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369463
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-06-03 12:56:19 +00:00
Jens Johansen 552240b0a6 [CFE] Delete unused code
Change-Id: Ic2ab2cbe10cbabc7743fae756dc52d5808fc41e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369460
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-06-03 12:15:00 +00:00
Jens Johansen 05e5e49fc7 [CFE] Delete more unused code
Change-Id: Ib22393a41ee0e8b1a11f06249bdb812664177060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354302
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-06-03 11:41:26 +00:00
Jens Johansen ed4b9377d0 [io/socket_read] Fix available bug when limit of aggregated read bytes goes into effect
In 7fa9b814d2
(https://dart-review.googlesource.com/c/sdk/+/369141) a limit was
introduced to prevent OOM.
It however introduced a bug where `available` would be out of sync
(> 0 when it should be 0) causing issues - seemingly an infinite loop
where it continues trying to read even though no data is available - and
e.g. the weekly bot timed out after 12 hours because stuff didn't work.
(I think the issue is `stopRead()` returning false, but isn't sure).

This CL fixes the issue by updating the field before the possible break.

TEST=Hopefully a test will be added in a follow-up.

Change-Id: I722c8868fd7354fc9403e8d2f387914c3fab884a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369243
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-03 11:00:09 +00:00
Sergey G. Grekhov 4ff851e5b2 [co19] Roll co19 to 0a9f7daccd0e682ab791f04ecc23f1dbcee04977
2024-05-30 sgrekhov22@gmail.com dart-lang/co19#2641. Add super parameters tests (dart-lang/co19#2687)
2024-05-29 sgrekhov22@gmail.com Fixes dart-lang/co19#2678. Add more extension types static vs instance conflict tests (dart-lang/co19#2692)
2024-05-29 sgrekhov22@gmail.com Fixes dart-lang/co19#2668. Reorder switch expressions to avoid flow analysis secondary issues (dart-lang/co19#2693)
2024-05-28 sgrekhov22@gmail.com dart-lang/co19#2641. Add external functions and covariant parameters tests (dart-lang/co19#2691)
2024-05-28 sgrekhov22@gmail.com Fixes dart-lang/co19#2689. Add more extension methods tests (dart-lang/co19#2690)
2024-05-27 sgrekhov22@gmail.com dart-lang/co19#2641. Add extension types tests (dart-lang/co19#2688)

R=brianwilkerson@google.com

Change-Id: Ie5c551e3198e748b55d45ec5039d1ff836444ee2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369000
Auto-Submit: Sergey Grekhov <sgrekhov22@gmail.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-06-03 09:12:56 +00:00
Martin Kustermann ed36bdd851 [dart2wasm] Make _TypeUniverse a purely abstract class with static methods
There's no need to make an instance of _TypeUniverse and pass around a
`this` reference to method calls as there's no state.

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

Change-Id: I522a3ef677d0301c0a5dcd1d83499a99293618a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369242
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-03 07:24:14 +00:00
Johnni Winther b2517e934f [cfe] Remove Env.isNonNullableByDefault
+ a few other references of 'isNonNullableByDefault'

Change-Id: Ifcd6bf5c2cc5dbbca7dda1576248fc4cd59eed5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369023
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-03 06:42:54 +00:00
Johnni Winther e3efaf2b66 [cfe] Remove isNonNullable from type_algebra et al.
Change-Id: Idcb55bcbc2cf42f4a6f49fb0751f9883a47ff66b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369041
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-06-03 06:42:54 +00:00
Johnni Winther ce12e3c8ac [cfe] Remove isNonNullableByDefault from class hierarchy
Change-Id: Ib5942357578a6481e8038dd090e4a9d9ff49f831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369022
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-06-03 06:42:54 +00:00
pq a446cd9667 update DEAD_CODE analysis for local wildcard functions
See: https://github.com/dart-lang/sdk/issues/55680

Change-Id: Ib65be42206c6bd66ddaaf54224490870acf4a2bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368941
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-03 02:39:32 +00:00
Konstantin Shcheglov 1b9cc28879 CQ. Make FileSource API, move to lib/source.
Change-Id: I981d3f0904917ada322ca06448f03ff33ae1f095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369360
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-06-03 00:36:59 +00:00
Vyacheslav Egorov fc4bcab2ef [io] Propagate cancellation in _HttpOutgoing.addStream
If HttpResponse is being closed prematurally (e.g. because client
decided to close its request) we need to propagate cancellation
to the stream which is being piped into the response. Otherwise
we will keep that stream forever hanging around and leak underlying
resources.

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

TEST=tests/standalone/io/regress_55886_test.dart
R=kustermann@google.com

Change-Id: I7c294ed19cc7c350fd101b078bd650ce8a6526a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369061
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-02 20:33:26 +00:00
Martin Kustermann a4d3ee054d [tests] Use asyncStart/asyncEnd for two language tests
In order for asynchronous tests to work on the web, they have to tell
the test runner that

* the test is async
* when the async test has finished running

This is done via calling asyncStart/asyncEnd.

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

Change-Id: I790960d7da708de4e36be9197ceb3e89f316a84e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368581
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-01 21:51:11 +00:00
Brian Quinlan 51ea22f13f [vm/io] Explain why the return of inflateReset can be ignored
Change-Id: I9e2bda9786f15118b422db2d6dc9c2b4aee3e272
Tested: comment-only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369180
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-05-31 22:29:07 +00:00
Sam Rawlins 28be4efd8f meta: require that @mustCallSuper only annotates overridable members.
Previously, this behavior was custom-wired into the Dart analyzer, but
now it is specified with TargetKinds.

In the analyzer we remove special annotation-target-verification for
`mustCallSuper`.

Change-Id: Ibd3ada0a612069c5286facffaad557671c7a85b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-31 21:41:43 +00:00
Ryan Macnak 3bf8f35014 [standalone] Remove dead VM sections from blob container format.
TEST=ci
Change-Id: I78940e2c617c33983748e7532cec305b1ecd1c18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369101
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-31 21:12:28 +00:00
Brian Quinlan ea44765874 [vm/io] Add support for decompressing concatenated zip/gzip blocks.
Bug:https://github.com/dart-lang/sdk/issues/55469
Change-Id: I030e22cafba9164b305972c53d3ba9342503a836
Tested: unit tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363964
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-05-31 20:23:53 +00:00
Konstantin Shcheglov 4f6cca1e1e CQ. Extract package:analyzer/error/error.dart library cycle.
By removing unnecessary references to higher level libraries we
can extract a separate 19 libraries cycle, related to errors. Maybe
later we can break it further.

This reduces the mono-cycle from 295 to 270 libraries.

Change-Id: Id9db12002dba10788b65262d3d7325ad6079ceff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-31 20:22:28 +00:00
Konstantin Shcheglov 2628bfe733 QuickFix. Issue 55805. Create extension method.
Bug: https://github.com/dart-lang/sdk/issues/55805
Change-Id: Ifbe1420413ebe20e6e5e28c49da6c1cde6f801ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-31 20:07:31 +00:00
Konstantin Shcheglov f69ac337ca CQ. Stop using File.createSource() in analyzer/.
This mixes layers, which I believe one of the ways that cause large
library cycles.

Change-Id: Ie1cf991bcd40b19127a6ade7efc5ad5fd69d0018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368942
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-31 20:06:28 +00:00
Konstantin Shcheglov d696014fe5 CQ. Stop using File.createSource() in analysis_server/.
This mixes layers, which I believe one of the ways that cause large
library cycles.

Change-Id: Id7124b9f4e4bf81838f637255fe04fd28f5fda01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-31 19:43:58 +00:00
Alexander Aprelev 7fa9b814d2 [io/socket_read] Limit aggregated read bytes to prevent OOM.
Also use non-copying BytesBuilder.

Fixes https://github.com/dart-lang/sdk/issues/55885
TEST=ci and repro from the github issue

Change-Id: Ida0feff32a3c9ee1e89add3b3696efefdc94fc28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369141
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-05-31 19:39:59 +00:00
Devon Carew fd45d2c39d Update Triaging-Dart-SDK-issues.md
Closes https://github.com/dart-lang/sdk/pull/55874

GitOrigin-RevId: 844c34723af107ad3f315fdce4cc70a69704b9fa
Change-Id: If186d28ca57a8a50c276e6602ff01ac0e7e5aff9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368840
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-05-31 18:09:32 +00:00
Kallen Tu fcfc66f834 [wildcard-variables] Add wildcard import prefix tests.
Bug: https://github.com/dart-lang/sdk/issues/55652
Change-Id: I9f17727bcc96bec9fbb01664244a44710f8f02e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368061
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-05-31 17:39:54 +00:00
pq 8cb19d85f0 quick fix for SEALED_MIXIN
Change-Id: Ib0c2cbe337d1b5acc7e3b341d57ded83b6957cdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368961
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-31 17:26:30 +00:00
Sam Rawlins 43791032fc analyzer: Allow generic function types as type arguments in const creations
Fixes https://github.com/dart-lang/sdk/issues/55459

Change-Id: I0903f3784a4f370981926c29561904d61420ef34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-05-31 17:12:49 +00:00
Ömer Sinan Ağacan d56cef5b3b [dart2wasm] Simplify calculateTransitiveImportsOfJsInteropIfUsed
- Don't convert the result to list: we don't need the result as list so
  conversion is not necessary.

- Return empty set instead of null when empty: `null` and empty set
  represents the same thing, using just one value is simpler for the
  downstream as we don't need to check both the null case and whether
  the set is empty.

Change-Id: I925e9bd8962eeb91a4a20ab5b7218a27d263bece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369021
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-05-31 16:49:59 +00:00
Konstantin Shcheglov 9f6db2b92d CQ. Stop using File.createSource() in analyzer_plugin/.
This mixes layers, which I believe one of the ways that cause large
library cycles.

Change-Id: Ic21292f2d831229a3ba444abf3131c66ec9968d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-31 16:14:31 +00:00