Commit graph

47673 commits

Author SHA1 Message Date
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
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
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
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
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
Ben Konyi bcaf745a9b [ package:vm_service ] Add missing code to code generator
Was added originally in https://dart-review.googlesource.com/c/sdk/+/367821

Change-Id: I7873e960319c10e995e24b1bb2514ede0c3299d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371360
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-13 15:03:49 +00:00
Jake Macdonald 57fc55d934 rev the macros version, preps for a new release once publishing the package is fixed, see https://github.com/dart-lang/pub/issues/4305 for context
Change-Id: I8fe93ce7895fc6bb1b2ba896d8256366ae698ce0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371142
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-06-13 14:03:08 +00:00
Martin Kustermann 68229c4e58 [dart2wasm] Make is/as-checker helpers be used even if operand type is not InterfaceType
Right now the optimized is/as-checkers are only used when the operand
type is an [InterfaceType]. That means they don't get used for e.g.

   dynamic obj;
   T obj2;
   obj is String
   obj2 is List<dynamic>;

But we can use the is/as-checkers on any operand type as long as the
type we test against is an [InterfaceType] without arguments or where
the type arguments are equivalent to defaults-to-bounds (i.e. require
no checking).

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

Change-Id: I1adff52b3d880c37c344edb0c42ffd454d7b1164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371124
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-13 13:18:59 +00:00
Martin Kustermann 6d185d2003 [dart2wasm] Make pkg/dart2wasm/tool/compile_benchmark more similar to dart compile wasm
This allows copy&past'ing commands from `flutter build web --wasm
--verbose` and replacing `dart compile wasm` with
`pkg/dart2wasm/tool/compile_benchmark`.

* We make the shell script recognize `-o` flag.
* We make the shell script recognize different platform being passed.

Change-Id: Iabecc7c87b35d35f073ced5e111a9ca5ea0d9298
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371341
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-13 13:18:19 +00:00
Sarah Zakarias d289a725a3 Add topics to pubspec.yaml
Closes https://github.com/dart-lang/sdk/pull/55922

GitOrigin-RevId: 5729941116885da445296f09c5de5d097154c53f
Change-Id: I2c4076506ae8d1411550320f12dba4ae2a6dc559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369510
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2024-06-13 13:02:54 +00:00
pq 70f4e89ddf quick fix for EMPTY_RECORD_LITERAL_WITH_COMMA
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: Ifee29c7623f3322d4a35534e1c2a00d1cd6b0b03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-13 13:02:45 +00:00
pq 5cc92cf696 quick fix for STATIC_SETTER_WITHOUT_BODY
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: Id3b704915c03b61d9ba778b96c6e6fc55e1ef3dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-13 12:12:39 +00:00
Ömer Sinan Ağacan 633e7c4b15 [vm_service] Decode incoming JSON in one step instead of two
Currently we decode incoming data as a string, then parse the string as
JSON.

We can do it in one step by fusing a `Utf8Decoder` with a `JsonDecoder`,
which will be faster.

A difference between `jsonDecode` and the fused version is that
`jsonDecode` returns `dynamic`, the fused version returns `Object?`.

To keep changes as small as possible we cast the return value of the
fused verison to `dynamic` in this CL.

However using `dynamic` values is often slower than type casting it to
the right type and then using it. So it might make sense to cast it to
something like `Map<String, dynamic>` in a separate CL.

Change-Id: I76de535a72ae5532db5a27e543929519c48c701c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371080
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-13 11:53:40 +00:00
asiva 7a068fae7d [pkg/kernel-service] Fix invalid index used in expression
TEST=ci
Bug: 55951
Change-Id: I58d3bd361666324f33a0e4b25f5b1e85ffa71440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371182
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-12 22:13:29 +00:00
Konstantin Shcheglov 78a0c7a5e1 DevX. Issue 54567. Support for joined cases in 'Convert to switch expression'.
Bug: https://github.com/dart-lang/sdk/issues/54567
Change-Id: Idb6cc7ecd88e1e9e3b14c6a54176c958bac36afa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-12 22:10:47 +00:00
Mayank Patke ca3e67a3b6 [dart2js] Add --interop-null-assertions.
This CL adds a new --interop-null-assertions flag (cf.
--native-null-assertions) with the goal of validating that JS interop
APIs with non-nullable static return types do not return null values.
This flag is currently disabled by default but is intended to assist in
sound null safety migrations.

In general, we don't guarantee type soundness of package:js interop
since users can write incorrect static types which are not backed by
any runtime checks. However, it is likely that during the null safety
migration, some interop APIs which should have been made nullable
weren't. Therefore, we want to offer some additional (but limited)
checking for this case.

For static invocations of functions with non-nullable return types, we
can simply perform a null check on the result of the call.
For instance methods (which could be invoked virtually/dynamically), we
want to perform a null check on the return value in the callee (the
interceptor method) itself when possible.

It's possible for multiple interop bindings to share the same
interceptor method. We produce a null check in the interceptor method
body if all the methods have non-nullable return types. Otherwise, we
insert checks at callsites when appropriate.

Change-Id: Ifd155d7f8326152b6d57d61199e0b7973c4a1211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369784
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-06-12 21:28:23 +00:00
Konstantin Shcheglov bb66bd92c8 DevX. Issue 53744. Remove 'const' that starts implicit constant context, add sibling 'const's.
Bug: https://github.com/dart-lang/sdk/issues/53744
Change-Id: Ie0dbfa420d247be47405f014f5b089bc59dde9f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-12 21:11:55 +00:00
Jake Macdonald f4899aa62e skip failing macro test
Bug: https://github.com/dart-lang/sdk/issues/55992
Change-Id: Ib2bfaf980d0edc7ac8a0e2a891983a3294ee1588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371220
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-12 20:59:34 +00:00
Daco Harkes 9588927faf [vm] Native asset relative path resolution with symlinks
This CL moves native assets resolution to the embedder.

The Dart VM looks up the asset path (for example
`['relative', 'foo.so']`) with the asset id. The embedder defines
callbacks for asset loading, and returns a handle to the dylib.
Then the VM calls the embedder again with `dlsym` to lookup the symbol.

The Dart VM & kernel compiler are responsible for the asset id to
asset path mapping. The kernel compiler compiles it into the snapshot
and the VM looks it up in the snapshot.

Relative paths are resolved relative to the isolate script uri (kernel
snapshot, jit snapshot, aot snapshot, or `dart compile exe` result).
The embedder is responsible for remembering the script uri it set when
spawning the isolate group.

This CL does not add `dlclose` or `dladdr` embedder callbacks yet.
Bug: https://github.com/dart-lang/sdk/issues/55521
Bug: https://github.com/dart-lang/sdk/issues/55966

TEST=pkg/dartdev/test/native_assets/build_test.dart
TEST=tests/ffi/native_assets/asset_relative_test.dart

Bug: https://github.com/dart-lang/sdk/issues/55410
Bug: https://github.com/dart-lang/sdk/issues/55523
Bug: https://github.com/dart-lang/sdk/issues/55207
Change-Id: I75ec4a368c5fb3d2f76b03771e796ff56bcac941
Cq-Include-Trybots: dart/try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-win-release-arm64-try,vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-msan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/361881
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-06-12 16:45:19 +00:00
Ben Konyi 6b788d2a77 [ Service / DDS ] Re-introduce explicit cast to remove dynamic invocation of operator[]
Fixes failures in type flow analysis tests introduced by https://dart.googlesource.com/sdk/+/cf9623f3d9520bc58b7d3cba146934b69dba1d8f

TEST=pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart

Change-Id: I401d12d42a64c64537722ef346dd86b1eff78f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371140
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-12 16:34:17 +00:00
Kallen Tu 8095cb32c6 [cfe] Formal parameter wildcards are non-binding.
This CL changes the following:
- Formal parameter wildcards can have duplicate declarations.
- Formal parameter wildcards will produce an error when used.

Most of this CL is still needed even if we want to keep these parameters in scope. I'm working on that so I'll put this out in the meantime. The tech debt is small compared to getting a move forward on the functionality of wildcards.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I5a8b6a8081ea6deb4cfd4bf2626280c6e8c98989
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370761
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-12 14:42:51 +00:00
Kallen Tu 2ec0ca25a8 [cfe] isWildcard set only with experiment on.
Only set `isWildcard` on variables when the experiment for wildcards is enabled.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I54a1f0ba1b9192df6c86e44e92d5ff4bebc9a232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371020
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-06-12 14:25:59 +00:00
Johnni Winther 726f9f1a68 [analyzer] Generate multiple cases in missing cases fix
This pipes multiple witnesses from a non-exhaustive switch expression
or statement to the ADD_MISSING_SWITCH_CASES fix, such that multiple
cases can now be inserted in a single fix.

Change-Id: I5625bbb81c72917f10f4388cfe96d1bd1536c269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371062
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-12 12:45:09 +00:00
Johnni Winther 5986f91820 [cfe] Split CompilationUnit and LibraryBuilder
This moves CompilationUnit from being a supertype of LibraryBuilder
to only being implemented by DillLibraryBuilder and SourceLibraryBuilder.
This is done in preparation for fully separating CompilationUnit from
LibraryBuilder.

Change-Id: Id2e9488d5f35ab108d5067583541dec433b90cf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371081
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-12 10:46:18 +00:00
Martin Kustermann dd92e9a0b4 [dart2wasm] Faster search in RTT supers data structure
If the transitive supers graph contains many classes we use a binary
search instead of a linear search.

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

Change-Id: I1018082e8d27090293b67a2239abfaf279270b9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370860
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-12 10:42:22 +00:00
Jens Johansen c15466034e [status_files] Cleanup status files
Make tool (by default) give error when test entry specified in status
file does not exist. Make -w (by default) remove such entries.

Cleanup most status files, fixing a few entries containing `.dart` and
removing obsolete entries (i.e. entries pointing to nonexisting tests).

This should for instance have given an error in
https://dart-review.googlesource.com/c/sdk/+/370600 saying that the file
I specified didn't exist (in that I shouldn't have specified the `.dart`
part).

TEST=No tests, this is status file maintenance.

Change-Id: Ie977bf15dea2e3dad8d771fd3e99917317e975f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370886
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-06-12 10:21:23 +00:00
pq 86b43dc50c update status of unreported COVARIANT_CONSTRUCTOR
`COVARIANT_CONSTRUCTOR` is not reported by the parser (today) and constructors are treated the same as other members. This change updates fix status bookkeeping making it clear that the diagnostic isn't reported and so is not fixable.

Change-Id: I4944beef64e4c9ee42757430383291a54ae75f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371061
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-12 09:29:39 +00:00
Sam Rawlins 21829623da linter: move avoid_js_rounded_ints tests
Change-Id: Ie569dba08fa0bf6fc25447b39015be381e79fe7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370461
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-12 08:38:35 +00:00
pq a5cacf80b6 quick fix for STATIC_GETTER_WITHOUT_BODY
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I4a212bc638cc2a36d805af9eedd319fd3dc9c00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-12 08:17:57 +00:00
pq f1cf8c22d1 quick fix for LITERAL_WITH_NEW
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I43629f21645ed330b6a4732ae7f3e9ea616b3a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370840
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-12 07:48:59 +00:00
Konstantin Shcheglov d0998d6996 DevX. Issue 29106. Don't NON_ABSTRACT_CLASS_XYZ if the concrete extended class also has this problem.
Bug: https://github.com/dart-lang/sdk/issues/29106
Change-Id: Ie676295f104fcbb8458fbb27f3f01ed52e99fef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-06-12 00:31:59 +00:00
Brian Wilkerson 2c97c6949e Include an empty body when suggesting a name for a top-level declaration that does not have a body
Change-Id: I92875fdb80b0541eaa5505b507e822915181ee52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370980
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-12 00:26:59 +00:00
Konstantin Shcheglov 73cd7c6439 CQ. Deprecate exports from package:analyzer/src/source/source.dart
Change-Id: I6256ad2a8472636fd39a9db7e0360f8d7104da0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369560
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-11 22:49:51 +00:00
Jake Macdonald fac11694b4 Track async microtasks scheduled by macros, and ensure they have all completed before a macro returns.
Does not track certain events such as async I/O, but will refuse to execute the scheduled callbacks when those do complete.

Bug: https://github.com/dart-lang/sdk/issues/55426
Change-Id: Ie81100e9e4dbe49d050bad875cc9b6a65969863d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-11 21:02:29 +00:00
Ben Konyi cf9623f3d9 [ DDS ] Update DDS launch sites to assume DDS process closes stderr
Removes risk of DDS connection information being split across two stream
events, causing JSON decoding to fail.

Also updates DDS to close stderr, even in the error case.

TEST=Existing service and dartdev tests

Change-Id: I5cceab899aac1fa63bd7578dd658b34096722bd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371000
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-11 18:41:01 +00:00
Devon Carew f97004f639 Bump collection to c90b19f07b48391f3b1b4c39dd06ef0177f8e07c
Changes:
```
> git log --format="%C(auto) %h %s" 141d83a..c90b19f
 https://dart.googlesource.com/collection.git/+/c90b19f blast_repo fixes (348)
 https://dart.googlesource.com/collection.git/+/a1d2507 Add flattenedToList and flattenedToSet (328)
 https://dart.googlesource.com/collection.git/+/e9219c7 Deprecate whereNotNull from IterableNullableExtensions (332)
 https://dart.googlesource.com/collection.git/+/9e441f1 Deprecate transitiveClosure (336)

```

Diff: https://dart.googlesource.com/collection.git/+/141d83af3d7586ae9d27de610fd426071c98e5d3..c90b19f07b48391f3b1b4c39dd06ef0177f8e07c/
Change-Id: I9ed24345c132ad92ae65c5e70ab37647fad0ec00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370960
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-11 17:27:21 +00:00
Brian Wilkerson 45835b0933 Use the max number of suggestions to limit the number of candidate suggestions being retained
Change-Id: I4a60569fb4efe4af576b9adbb375c6e2e0b1727c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370720
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-06-11 17:03:05 +00:00
Ben Konyi d96ff605e2 [ CLI / DDS ] Close stderr for dart development-service after connection details have been printed
This will simplify logic in clients parsing this information by
providing a clear signal that all connection data has been sent over the
stream and is ready to be decoded.

Change-Id: Iae3779fe13662bf15187e9fa41febba94af4f2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370940
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-11 16:06:47 +00:00
Danny Tuppeny b8cb98d0bb [dds/dap] Prevent duplicate values showing in variables views when a class has both a field and a getter with the same name
When a class contains both a field and getter with the same name, we'd include both in the `variables` response. In most cases these are the same value (although it's not guaranteed).

I've chosen to just hide the field in this case and always show the result from evaluating the getter (since I think that's what the user would expect, even in the case where they happen to have different values). Another option could be to show both (but change the name so that fields/getters are shown differently), however in that would change the display (for example adding `get ` in front of all getters) we should probably only do that if it's clear there is demand for it.

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

Change-Id: I9e23d22a844ee22c38988456b1f275422c5c9e04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370640
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-06-11 14:43:15 +00:00