Commit graph

101834 commits

Author SHA1 Message Date
Sam Rawlins 3c65563735 linter: Fix issue with extension type methods as possibly const arguments
Fixes https://github.com/dart-lang/linter/issues/4978

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I532f491355bc34028b19d323102f038dff861445
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371780
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-14 19:42:24 +00:00
Srujan Gaddam 7ec9514093 [benchmarks] Add Function.toJS benchmark
Adds a benchmark to test converting Dart functions to and
from JS as well as calling them.

Specifically, tests some combinations of the following:
- Converting vs calling functions
- JS vs Dart functions
- Calling instance methods vs static methods vs closure vs
  closures stored in fields

Change-Id: I8f5b63781201042c4068437fe84c3043d6dfb446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368064
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-14 19:42:10 +00:00
Srujan Gaddam 06ec78851b [dart:js_interop] Add static error for converted functions that contain named params
Like type parameters, these parameters can't be passed from JS and
such functions already do not work as intended as there is no way
to pass named args to a JS function. These named parameters were
being silently ignored in dart2wasm when creating the function
trampoline.

Change-Id: Iebb890de05f8b242e0542c1ec8f2c0582c5232df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368062
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-06-14 19:42:10 +00:00
Nate Biggs b9b4d616a4 [dart2js] Fix record field get receiver type serialization.
Internal users reported a compiler crash when using sequential compilation. Their change involved adding a class hierarchy in which the constructor of a superclass included a RecordIndexGet. When analyzing the constructor of the subclass we also analyze the body of the super constructors.

In this rare case the member being analyzed does not match the member containing the receiver node. Usually calls act as a layer of indirection that we do not analyze across.

When we then save the type of the receiver, we do so in the context of the wrong member (the subclass constructor rather than the superclass constructor). We just have to be more careful to use the correct context member.

The added test fails prior to this change.

Change-Id: I8b9a3b8a7692b8604d5c37c59b94bb8d46afff75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371580
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-06-14 19:17:14 +00:00
pq 5d3578a2a9 quick fix for WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER
(`error_fix_status.yaml` to be updated when pending quick fixes are landed.)

See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I042f6dc2171a37d008c6c2c4d1f843e0bcffc46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371662
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 19:03:50 +00:00
Devon Carew ff733cc81a [deps] rev collection, http, http_parser
Revisions updated by `dart tools/rev_sdk_deps.dart`.

collection (c90b19f..9354f38):
  9354f38  2024-06-13  Kevin Moore  Require Dart 3.4, test wasm on 3.4, prepare release (dart-lang/collection#349)

http (e2e2170..8c325b9):
  8c325b9  2024-06-14  Anikate De  pkgs/ok_http: Stream response bodies. (dart-lang/http#1233)

http_parser (53d4041..71b4c2c):
  71b4c2c  2024-06-13  Graciliano Monteiro Passos  `CaseInsensitiveMap`: added constructor `fromEntries`. (dart-lang/http_parser#99)

Change-Id: I0f848975241261f42e0759d00188fef12731a085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371740
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-14 18:14:10 +00:00
Sam Rawlins 800d824d97 analyzer: Fix typo in property_access_test test name
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I26eef316b7bf711edb6e2e3285752244d0da2e82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Sam Rawlins <srawlins@google.com>
2024-06-14 18:04:12 +00:00
Konstantin Shcheglov ad54e9b224 Macro. Issue 55696. If no/wrong number of type arguments, get them from actual DartType.
Bug: https://github.com/dart-lang/sdk/issues/55696
Change-Id: I6798ab5b262b6961edc2640342b9c39568cc7af2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 17:55:29 +00:00
Keerti Parthasarathy 205ad1c492 [dart-fix] Output pubspec error code in lower case, similar to other error codes.
Fixes https://github.com/dart-lang/sdk/issues/55945

Change-Id: I3e03148222e215ea1afd53377f83e86e0983bca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371502
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-06-14 15:52:23 +00:00
Danny Tuppeny 1b302b8df0 Move tests for switch enum cases for >= 2.19 from AddMissingEnumCaseClausesTest to AddMissingSwitchCasesTest_SwitchStatement
The tests in this class were duplicated when pattern support was added, one set
of tests for <= 2.19 and one for > 2.19. The> 2.19 tests were marked as Failing
because this functionality didn't work.

This functionality has now been implemented, but because the error code and fix
are different, these tests continued to fail. This change moves the tests to
the equivalent pattern-enabled fixes tests and removes `@FailingTest` for
those that can now pass.

There are still a few marked `@FailingTest` because of differences in the new
implementation.

See https://github.com/dart-lang/sdk/issues/52180#issuecomment-2166814402

Change-Id: Ie1dfa5bc5c608d38a191507f5f0403d20ba2ef31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 15:48:51 +00:00
pq 24156d0b67 [wildcards] code folding tests
Fixes: https://github.com/dart-lang/sdk/issues/56009

Change-Id: Iad1f197388d0b89e9bd9b31cc82a496cf578380b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371663
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 15:44:19 +00:00
Ben Konyi fa89a0183e [ package:vm_service ] Prepare for 14.2.4 release
Change-Id: Ibee954dcbac5f7ac592686440e3d6a7fdc83b522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371581
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-14 14:01:58 +00:00
Ömer Sinan Ağacan 76f6a32432 [dart2wasm] StringBuffer improvements
Use `U16List` instead of `Uint16List` as the character buffer type.
Access the Wasm array directly when writing characters and converting
the final buffer to a String. This avoids bounds checks and uses
`array.copy` when allocating the final string.

Change-Id: I570494e8349adc7a268544544516c9947abc8604
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371681
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-14 13:03:41 +00:00
Martin Kustermann 7078310249 [dart2wasm] Specialize string interpolation expressions for 1/2/3/4 arguments
This affects very common string interpolation expressions where we now
avoid creating arrays and looping over arrays and casting references
when getting things out of arrays.

e.g. `StringBuffer.write()` uses "$obj" in it's implementation
which will benefit from this.

Change-Id: Ie6615e5f76a4a8ccb4ff9aa85c05c7e39eab6f00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371660
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-14 12:33:51 +00:00
Johnni Winther 4b704b8f0b [cfe] Use SourceCompilationUnit in SourceLoader.tokenize
This moves a lot of the methods needed for tokenization and
outline parsing from SourceLibraryBuilder to SourceCompilationUnitImpl.

Parts that are still used elsewhere remains in SourceLibraryBuilder
but accessed through SourceCompilationUnitImpl.

Change-Id: I0df431eee4c187e5447850961d2c27be14cb0ba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371682
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-14 10:49:48 +00:00
Martin Kustermann 689852e3f0 [dart2wasm] Fix new web/wasm/allow_import_export_pragmas_test test: Add --extra-compiler-option= before the flag name
This wasn't caught by default CI builders, because
default configurations use `pkg/dart2wasm/tool/compile_benchmark`
which passes all unknown flags to the compiler (for convenience
of local development) but `dart compile wasm` doesn't

Change-Id: I6a92d3f04848e027c92b1feee3d54e7efba9fd27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371661
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-14 10:18:23 +00:00
Sergey G. Grekhov 094f43b22c [co19] Roll co19 to 831b22d5e496fe63a813ca1c1b64f533c2f9fa0c
2024-06-13 sgrekhov22@gmail.com dart-lang/co19#2694. Add more checks for use of `?e` in an expression (dart-lang/co19#2713)
2024-06-13 sgrekhov22@gmail.com dart-lang/co19#2694. Add more null-aware elements syntax tests (dart-lang/co19#2706)
2024-06-13 sgrekhov22@gmail.com dart-lang/co19#2694. Add unnecessary null-aware elements tests (dart-lang/co19#2701)
2024-06-13 sgrekhov22@gmail.com dart-lang/co19#2694. Add constants and runtime semantics tests (dart-lang/co19#2700)
2024-06-13 sgrekhov22@gmail.com dart-lang/co19#2694. Add type inference tests for sets (dart-lang/co19#2697)
2024-06-12 sgrekhov22@gmail.com Fixes dart-lang/co19#2709. Remove outdated error expectation from redirecting_constructor_t03.dart (dart-lang/co19#2710)
2024-06-12 sgrekhov22@gmail.com Fixes dart-lang/co19#2707. Add more `call` member tests (dart-lang/co19#2708)
2024-06-12 sgrekhov22@gmail.com dart-lang/co19#2694. Add the first bunch of null-aware elements tests (dart-lang/co19#2696)

Change-Id: I026509d924976da91294d4d904f03a5d8027115b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371640
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-06-14 10:10:26 +00:00
Johnni Winther 289bba506e [cfe] Remove LibraryBuilder.nullableBuilder et al.
Change-Id: I36b2a8c25568d4df90a6a1b039d15519d244be96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371123
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-14 10:10:20 +00:00
Ömer Sinan Ağacan b807dbd0cd [third_party] Add jsshell binaries to gitignore
Ignore files downloaded with the gclient custom var
"checkout_javascript_engines":

- third_party/firefox_jsshell/js
- third_party/firefox_jsshell/libnspr4.so
- third_party/firefox_jsshell/libplc4.so
- third_party/firefox_jsshell/libplds4.so

Change-Id: I135126867994862b48185ec9fa6be71e113411d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371680
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-14 09:33:07 +00:00
Johnni Winther 74d2eb28a6 [cfe] Add DillCompilationUnit and SourceCompilationUnit
This adds DillCompilationUnit and SourceCompilationUnit and separates
CompilationUnit from DillLibraryBuilder and SourceLibraryBuilder.

This prepares for creating SourceLibraryBuilders only after
CompilationUnits have been resolved into parts and main libraries.

Change-Id: I1b8e77ac66648f7d12ee7f09826d305fdfccb363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371300
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-06-14 08:47:46 +00:00
Ömer Sinan Ağacan 060d841ec0 [vm] Improve JSON copyCharsToList argument type
The buffer type is always `Uint8List`, improve the type from `List<int>`
to `Uint8List`.

Tested: existing tests
Change-Id: I03ad84a0f1fe1ade8a46719545f3c33eeccd99b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371402
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-14 08:31:19 +00:00
なつき bde8d28217 Fix build regression on alpine linux
Closes https://github.com/dart-lang/sdk/pull/55993

GitOrigin-RevId: 0a4d00914442f6be1bce949ca7a234fbd04952cd
Change-Id: I1cb1ad381111853c03ac3a39854a0c0a75a3d31a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371262
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-06-14 07:39:30 +00:00
Daco Harkes 47cb48e415 [vm] Native asset relative path resolution with symlinks - fix
The fallback mechanism wasn't working because the embedded struct by
value wasn't nullptr initialized.

TEST=tested by commenting out `Dart_InitializeNativeAssetsResolver`
in `main_impl.cc`. Without this CL it segfaults, with this CL it works
as expected.

Closes: https://github.com/dart-lang/sdk/issues/56006
Change-Id: If93cf9b077a2791a8385bdc8e75708dd95c8ead6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371620
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-14 07:05:15 +00:00
Martin Kustermann 6f21d19b02 [dart2wasm] Add flag to allow experimental wasm interop.
Adds a flag users can use via

    dart compile wasm \
        --extra-compiler-option=--enable-experimental-wasm-interop

which allows code to import `dart:_wasm` and use import/export
pragmas.

Similar to how we have a way to import `dart:ffi`

    dart compile wasm \
        --extra-compiler-option=--enable-experimental-ffi

TEST=web/wasm/allow_import_export_pragmas_test (positive test)
TEST=web/wasm/reject_import_export_pragmas_test (negative test)

Change-Id: Ibdbbac6c3aa049b2759e96b7b749dd30ecc6aaed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370063
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-14 07:01:58 +00:00
Alexander Thomas ff3f629d4b [3xH] Migrate apply.sh to python 3.12
See https://docs.python.org/dev/whatsnew/3.12.html#imp

Fixes: https://github.com/dart-lang/sdk/issues/55973
Change-Id: I0ac6e60104bddc17cfe5cd537a409c4ded3eb1a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371302
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-06-14 06:52:12 +00:00
Martin Kustermann 18ffc284c3 [dart2wasm] Remove deprecated --name-section flag from dart compile wasm
Change-Id: I1e1746c408a704d23db1dbf05b554afda667a0ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371540
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-14 06:50:18 +00:00
Sam Rawlins 50e4c576b9 analyzer: fix various issues for static extension member resolution
* Unqualified, out-of-scope static extension members are not
  accessible.
* Locally scoped extension members shadow others.
* Static and instance extension members do not conflict.

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

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

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Icd618d044b3857efa24f365c6835d42c0022c176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370323
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-14 00:59:57 +00:00
Konstantin Shcheglov b4e30d1b45 CQ. Deprecate unused static members of AnalysisError.
Change-Id: I46e76defbc9a833a867cc3fa2154635f71a6d085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371422
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 23:39:21 +00:00
Mayank Patke bf83cc30ed [dart2js] Convert VariableUse to a sealed class hierarchy.
Change-Id: I28d71d81031e3e6eefc2b4f6decfe375099a1c32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371185
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-06-13 23:01:34 +00:00
Stephen Adams 18994e6e46 [typed_data] Remove UnmodifiableXXXView classes
In most cases, the (now removed) SDK class was patched so that the constructor redirected to a platform-specific implementation of the unmodifiable view. Uses of the SDK class in the platform code could be rewritten to the more direct use of the implementation class.

The big +/- file changes are from moving the implementation classes from the patch file (typed_data_patch.dart), where they are no longer needed, to the internal file (typed_data.dart).

TEST=ci
Bug: #53785
Change-Id: Iaa7370de25b7fc2d26b24f7733c2892868e593cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370661
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2024-06-13 22:18:29 +00:00
Konstantin Shcheglov 7ae9900059 CQ. Deprecate File.createSource()
Change-Id: I222989d1ef915f7f14d7a3f36eab614a163faec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 21:11:39 +00:00
Ben Konyi 9304826679 [ DDS ] Refactor DDS entrypoint to allow for overriding behavior in google3
This moves the CLI logic into lib/src/dds_cli_entrypoint.dart so it can
be invoked by a custom google3 entrypoint (bin/dds.dart can't be
imported using a package: URI).

Since google3 will be able to perform some custom configuration of DDS,
google3 related logic (e.g., `BazelUriConverter`) is also removed. This
is technically a breaking change, but should be safe as this
functionality isn't currently being used.

Change-Id: I54d8a9927ff2df70e013ca5c8bc1d510b0b95f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371520
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-13 20:27:22 +00:00
Konstantin Shcheglov 02faed0a9a Prepare to publish analyzer 6.6.0 and _fe_analyzer_shared 71.0.0
Bug: https://github.com/dart-lang/sdk/issues/55870
Change-Id: Ic06f4c0a2cc5dc5f07f72335dd172f203b948cb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 19:56:30 +00:00
Mayank Patke 0ddba91190 [dart2js] Convert SubclassResult to a sealed class hierarchy.
Change-Id: I151c2f6f72dcecaff6a6976f058940b9ddf97f47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371461
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-06-13 19:25:28 +00:00
Konstantin Shcheglov cc073a0782 Macro. Re-export package:_macros/src/executor/response_impls.dart from 'package:macros'.
Change-Id: I89e59cbac52edb5197e409e3000c5a3dedd80b3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371421
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2024-06-13 19:12:41 +00:00
Ömer Sinan Ağacan 1ec4677870 [dart2wasm] More JSON decoding improvements
- Use unchecked reads when reading from `U8List` chunks.

- Use unchecked reads when reading from "transition table" in UTF16 decoder.

- Fix a typo in a comment.

Tested: performance refactoring, covered by existing tests.
Change-Id: I1b90781f2b419188d6a560994159b48faad16075
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371301
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-13 18:49:18 +00:00
Konstantin Shcheglov 9974252ac6 Increment DATA_VERSION.
https://dart-review.googlesource.com/c/sdk/+/371260 should have done this.

Change-Id: I34763f6221ad1c0f098d1c24eb9928935f917c78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371442
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-06-13 18:48:25 +00:00
Danny Tuppeny bf7f5171e5 [analysis_server] Treat field formal parameters and fields equally when finding references in LSP
This changes LSP's Find References to treat fields and field formal parameters as a single entity (matching what Document Highlights (Occurences) and Rename refactor does).

It does this in one direction by resolving the initial element to a field if it's a FieldFormalParameter, and in the other by including FieldFormalParameters when collecting the set of elements in the hierarchy to find references to.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4868

Change-Id: I33626a8d58f35d0c3bda574078f32bf98f4bc87c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-13 18:34:33 +00:00
Keerti Parthasarathy 95f90f553f Remove unused code in test method.
Change-Id: I541762501e9546eaaf0f1022ebdebbeefe6413dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371460
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-13 18:30:10 +00:00
Mayank Patke ad3a1a72fd [dart2js] Convert IsTestSpecialization to sealed class hierarchy.
Change-Id: I08552d4dda928259be56e0b99f9f002baeb4d6b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371240
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-06-13 18:21:59 +00:00
pq dcf72c0882 quick fix for REPRESENTATION_FIELD_TRAILING_COMMA
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: Ib278e49749618325c8c5fcc7a5627840f87c4553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371401
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-06-13 18:02:14 +00:00
Danny Tuppeny 1ea71b4b9b [analysis_server] Handle unexpected types in LSP experimental client capabilities LSP gracefully
Previously if you sent values in experimental capabilities that are different types to what we'd expect, in some cases we'd throw an exception and fail to initialize the server.

Since the experimental section is not specified (it's specifically for off-spec things) the behaviour of sending values should (IMO) be considered server-specific. However, reporting a useful message and continuing to function is clearly better than reporting a cryptic error and failing to initialize.

At least one client (`kak-lsp`) appears to be sending values in `"commands"` intended for the Rust LSP server which uses a different format to we're using (a nested Map where we use a List). This change will prevent the failure for them and instead report a warning. My recommendation is that their client is also updated to not send Rust experimental capabilities to non-Rust servers.

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

Change-Id: I8cba1aa3a5beebf884ff247180f809ffd33b3111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-13 17:29:49 +00:00
Devon Carew 1a45349ef6 [deps] rev async, convert, crypto, dartdoc, ecosystem, http, http_parser, path, shelf, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (4073129..a004370):
  a004370  2024-06-10  Kevin Moore  Bump min SDK, tighten dependencies, test wasm on 3.4 (dart-lang/async#277)

convert (70940e3..0c9eab7):
  0c9eab7  2024-06-10  Kevin Moore  latest lints, require Dart 3.4 (dart-lang/convert#107)

crypto (7a9428a..813e35e):
  813e35e  2024-06-10  Kevin Moore  Update min SDK, test wasm on 3.4 (dart-lang/crypto#174)

dartdoc (3decf1e..14d33d3):
  14d33d3a  2024-06-12  Sam Rawlins  Fix referencing an aliased type parameter. (dart-lang/dartdoc#3784)
  12d271a5  2024-06-10  Sam Rawlins  Combine the two implementations of "library canonicalization" (dart-lang/dartdoc#3781)
  ca61935e  2024-06-10  Sam Rawlins  Revert "Deprecate --resources-dir option. (`#3696`)" (dart-lang/dartdoc#3782)

ecosystem (865b2c5..b2b045f):
  b2b045f  2024-06-12  Devon Carew  remove extraneous quotes (dart-lang/ecosystem#270)
  fdedf3c  2024-06-11  Devon Carew  move to logging; check for safety exceptions (dart-lang/ecosystem#269)
  27574e0  2024-06-10  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/ecosystem#268)
  6e53c96  2024-06-10  Devon Carew  updates for the blast_repo tool (dart-lang/ecosystem#267)

http (b522000..e2e2170):
  e2e2170  2024-06-11  David Wimmer  Update README.md (dart-lang/http#1231)
  f8d5bf8  2024-06-12  Anikate De  [pkgs/ok_http] Add functionality to accept and configure redirects. (dart-lang/http#1230)
  93ff4a9  2024-06-11  Anikate De  [ok_http]: Use the Android SDK to generate JNI bindings. (dart-lang/http#1229)

http_parser (551e0e4..53d4041):
  53d4041  2024-06-10  Kevin Moore  blast_repo fixes (dart-lang/http_parser#98)
  1ff06e4  2024-06-10  Kevin Moore  Update min SDK, test wasm on 3.4 (dart-lang/http_parser#97)

path (8fc4c72..04807b6):
  04807b6  2024-06-10  Kevin Moore  Update to latest lints, bump min SDK to 3.4, test wasm on 3.4 (dart-lang/path#168)

shelf (ea3c983..4c54af6):
  4c54af6  2024-06-11  Kevin Moore  [shelf_test_handler] Bump dev deps (dart-lang/shelf#435)

test (83c597e..329c6df):
  329c6dff  2024-06-10  Jacob MacDonald  fix windows failures (dart-lang/test#2244)
  777631bb  2024-06-10  Rexios  Bump min Dart version to 3.4.0 for WASM (dart-lang/test#2242)

webdev (9ada46f..eccc7d8):
  eccc7d87  2024-06-12  Parker Lougheed  Update `package:lints` and clean up library declarations (dart-lang/webdev#2436)

Change-Id: Ic7aede173c9730f0ccd1bc3138f50a92ddf49fce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371440
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 17:15:28 +00:00
Konstantin Shcheglov 09d1522f8a DevX. Issue 39451. Sort (almost) UnlinkedTokenType.
I decided to keep NOTHING at the top still.
The google3 is not an issue any more, AFAIK.

Bug: https://github.com/dart-lang/sdk/issues/39451
Change-Id: Iac96c64326b15527268347ebcadb35c616605279
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 17:10:06 +00:00
pq 9e51c2fa74 quick fix for EMPTY_RECORD_TYPE_WITH_COMMA
(Also improves fix description for `EMPTY_RECORD_LITERAL_WITH_COMMA`.)

See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I742506d8c1a77b10f99861aa84947f8d348916df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-13 17:05:54 +00:00
Derek Xu 92b744d1b2 Fix iso-stress job by preventing --sound-null-safety flag from getting passed to the VM
Runs of this job are currently failing and logging the message "Setting
VM flags failed: Unrecognized flags: sound_null_safety".
e.g. https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/iso-stress-linux/6150/overview

Change-Id: I2fe541dc801794b2e0c12c98bf1bcf6d774e41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371380
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-06-13 17:02:03 +00:00
Konstantin Shcheglov 4e8af3bb56 DevX. Issue 54497. DeclaredVariablePattern in ForEachPartsWithPattern to final.
Bug: https://github.com/dart-lang/sdk/issues/54497
Change-Id: Ifa195d29a1a4db47fa12c221e6969ed0d8578a72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 16:57:51 +00:00
Devon Carew 3d3016ecfa [triage] update the triage workflow to use the dartbot github token
Change-Id: Ib7de276fa13b961e2817fa28db3d3b647062c2aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371420
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-13 16:53:26 +00:00
Brian Wilkerson 80ba2a9524 Produce completion locations where previously produced
There are many places where the code is producing a different location
than OpType is, but those can be handled is a separate CL.

Change-Id: Idea7529a3e64ddb25a9b15bb68f7537abd3d19e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371202
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-13 16:44:48 +00:00
Brian Wilkerson aa3f144f1c Remove unnecessary code from some tests
Change-Id: If3ab5e836a1977ab1089cdefdeb661d8992543ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371183
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-13 16:06:09 +00:00