Commit graph

98812 commits

Author SHA1 Message Date
Simon Binder ada6b81761 [vm/ffi] Improve error messages on Windows
Use `FormatMessageA` to allocate an English description of an error code.
Previously, only the error code itself was shown.

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

TEST=tests/ffi/dylib_open_test.dart
Cq-Include-Trybots: luci.dart.try:vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-aot-win-debug-x64c-try,vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try
Change-Id: Iccae6c763fb16d4bb999b9c260fcfea9c5de276b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328420
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-20 13:24:16 +00:00
Jonas Termansen 669060f8c7 [build] Omit SDK and Git hashes on RBE.
Bug: b/296994239
Change-Id: I70c10fddc3bd01fef5ed5182e1d28d0797c431e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342421
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-20 12:23:56 +00:00
Jens Johansen c152cce35c [frontend server] Add test for expression compilation on/in extension types
This is done via the new json communication channel, which initially
also added support for sending "scriptUri" and "offset".

The js version of expression compilation still needs updating.
Flutter etc will also still have to be updated.

Change-Id: I428bda68aaa13aa947b57e87f7a5bfb28802cf95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341921
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-12-20 11:14:57 +00:00
Jens Johansen 69a8834d15 [frontend_server] Take json when wanting to compile expressions
This adds an option to compile expressions (vm ones and javascript ones)
by communicating via json. This allows for future expansion without
destroying the communication channel.

For now the old versions will continue to exist, again to not destroy
alreadyy used communication channels.

Flutter etc. should be updated to use this new json communication,
but it can wait until plumbing in passing offset and scriptUri anyway.

Change-Id: Ifbff752527fea35e09a73e0bb210072d8ab81cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-12-20 10:39:01 +00:00
Johnni Winther 1f109d10ec [cfe] Run suite in together in update_expectations.dart
This speeds up update_expectations.dart by avoid to restart
the expectation testing for each suite.

Change-Id: Idaeb1cff3ac861b6d4781a4166442a102c754c71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342586
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-12-20 09:53:48 +00:00
David Morgan 0c4db1ea87 [macros] Deduplicate RemoteException.
It's not clear that we need two; I kept the one with the better
`toString`.

R=jakemac@google.com

Change-Id: I80934c0f1b05b0c486105654b03b628e7acf439b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341920
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
2023-12-20 09:49:38 +00:00
David Morgan 0a00546277 [macros] Add language tests for macro class augmentation.
R=jakemac@google.com

Change-Id: Ifa13747e2e05bcdc9dcb82a11acf0a043c9e9545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341483
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2023-12-20 09:27:18 +00:00
Johnni Winther 41d2d8d5a4 [analyzer,cfe] Support contained types in as-pattern
This adds a new rule to exhaustiveness handling of the as-pattern. The
new rule checks whether the cast type is fully contained in the space
of the subpattern. If so, we can assume that the whole context type has
been matched because there is no value that passes the as-test that
would be rejected by the subpattern.

Closes #51986
Closes #54125

Change-Id: I0dc7fb072395aa3bc9f0b143afb320966f9d64c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338760
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-20 09:05:26 +00:00
Ömer Sinan Ağacan 72fd1e01d2 [dart2wasm] Simplify and fix async* element type computation
Fixes tests:

- co19/Language/Functions/element_type_A02_t03
- co19/Language/Functions/element_type_A02_t04

Change-Id: Ifc186cb463fee26c59f81012c6da8925d902d9d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342561
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-12-20 08:31:25 +00:00
Konstantin Shcheglov 6bca7060de Extension type. Exclude extension types from sealed hierarchies.
Bug: https://github.com/dart-lang/sdk/issues/54405
Change-Id: I7b52816735a2ae28bb048d33ba5663bb0299fa63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342728
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-20 01:55:58 +00:00
Nicholas Shahan e339deff3a [ddc] Cleanup use of Nullability.legacy
These uses all flow to code that ignores the nullability so `.nonNullable`
works just as well.

Issue: https://github.com/dart-lang/sdk/issues/49996
Change-Id: I5363b8f7f757d421866b60c9a9308bf2370f4e50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342723
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-12-19 23:28:27 +00:00
Parker Lougheed aabc9badd0 [linter] Add some not-bad examples to avoid_empty_else
Fixes https://github.com/dart-lang/site-www/issues/5341

Also migrates its tests to reflective tests.

Change-Id: I3171aedc304347bd24aa757b3f9d77351bb75cb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342280
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
2023-12-19 23:18:53 +00:00
Sam Rawlins b87217f564 linter: Inline UnrelatedTypesVisitor into collection_methods_unrelated_type rule
After the previous two rules were removed, this is the only rule that
uses this logic, and there is no need to overcomplicate the rule.

Change-Id: I49f5b989da02e1be404ee76809b3d0a0602b5f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-12-19 23:17:29 +00:00
Keerti Parthasarathy 1a11cfd12a Remove just the declaration for unused variable for method invocations.
fixes https://github.com/dart-lang/sdk/issues/53820

Change-Id: I38d99c6f3afcbba609d150291f1dc0ad79f8c6b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342725
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-19 23:03:27 +00:00
Brian Wilkerson 1fabc670d2 Disable verification for three diagnostics
I have opened https://github.com/dart-lang/sdk/issues/54416 to track
fixing the docs.

Change-Id: I9fee04ca8404f83366fdef8985de900989092a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342724
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 22:55:17 +00:00
Sigmund Cherem 29d0a7296e [ddc] Properly locate d8 in ddb script.
A recent change added an architecture subfolder to the distribution
of d8 binaries (see
https://dart-review.googlesource.com/c/sdk/+/336200). In the process
a lookup for the 'arch' was added in most uses of d8 in the repo,
but the changed missed the one in ddb (probably because this has no
test coverage).

Change-Id: I2a7639fb19f8fa0131fc636f31b233aef701e8c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342660
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-12-19 22:03:59 +00:00
Brian Wilkerson bf22c59509 [code complpletion] Convert argument list suggestion generation
Change-Id: I88fb8e3ce89b4ce0b5698e4436814ac4524767ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342701
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-19 21:54:18 +00:00
Kenzie Schmoll a86eb8bd11 Bump devtools_shared dependency to ^6.0.3
Change-Id: I611457fec4032e06cb5456020e884530e42f0b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342720
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-12-19 21:27:33 +00:00
Derek Xu cd5d399e2b Reland "[ DDS ] Fix DDS AOT snapshot build rules"
This is a reland of commit 0a393f1b69

The problem was that the checks for whether or not dartaotruntime
existed were always returning false on Windows because the ".exe" suffix
wasn't being taken into account. Patchset 2 addresses this.

Original change's description:
> [ DDS ] Fix DDS AOT snapshot build rules
>
> dds_aot.dart.snapshot was not being generated for runtime build targets,
> and dds.dart.snapshot was being built regardless of whether or not we
> were building for an IA32 target.
>
> This change also adds a check for IA32 in 'dart run' so the "Could not
> find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
> isn't printed when we fall back to using dds.dart.snapshot.
>
> This change also reverts 2cc08595a6, which
> failed to fix the issue it was attempting to fix.
>
> TEST=pkg/vm_service tests
>
> Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TEST=pkg-win-release-try, pkg-win-release-arm64-try, and pkg/vm_service
tests

Change-Id: Ieab41edcb6bffca3be6bf628e357871f28949323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342640
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-12-19 21:17:15 +00:00
Johnni Winther 8791b441a7 [cfe] Report errors on primary constructors
This adds reporting of errors on initializing formals and
function formal parameters in primary constructors of
extension types. These are not supported by the current grammar.

Change-Id: I9e09ea599b9a455398a20c34b79c375fd884423d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342583
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-12-19 21:13:49 +00:00
Konstantin Shcheglov 291e82a51e Macro. Use covariant LibraryImplFromElement.
Change-Id: I46af080fcd2434da7c85059909361bbfea1884bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342722
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 21:07:23 +00:00
Konstantin Shcheglov 4676cb07ef Macro. Implement DefinitionPhaseIntrospector.topLevelDeclarationsOf()
Change-Id: I461154725867dccbb1ab8d6f1d80ac05ac0ae01d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342721
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 20:26:28 +00:00
Jake Macdonald fe8a13d0b3 clarify the behavior of resolveIdentifier
Change-Id: I159db1f89cc1cd2976c8999480d7b85aa554c1f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342680
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-12-19 18:08:54 +00:00
Konstantin Shcheglov 051f276b3f Augment. Use the namespace of the enclosing library or augmentation during AST resolution.
Change-Id: I1e371f89577fdbe51d5d9abde36edc53c0f48ba2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342482
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 17:43:49 +00:00
Jake Macdonald 298988c972 clarify a few macro docs
Change-Id: I160c3695bbe0e489170b9c2206b6bb7a67792a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-12-19 17:31:04 +00:00
Danny Tuppeny 63772f10fe [analyzer] Ensure watchers can be subscribed to more than once
The stream created by memory resources was a single-subscriber stream. The stream from the physical file system watchers was a broadcast stream, but the code to translate FileSystemException to the abstractions was written in a way that made it single-subscriber.

This fixes both to ensure that a `ResourceWatcher` can support multiple subscribers that can subscribe and cancel at different times.

We don't currently use this, so this change should effectively be a no-op right now, but it will allow us to reuse the temporary catchers we create when set up analysis roots instead of creating new ones.

There's an issue at https://github.com/dart-lang/sdk/issues/54274 discussing changing how we watch here, but it may still be worth picking the low-hanging fruit in the short-term.

Change-Id: I3bda77ddaee676c573021aa671cb01bae48bd56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-12-19 16:53:59 +00:00
Sergey G. Grekhov 8f6be08cbb [co19] Roll co19 to b80c9a4cb6fb22b5c8a7395d532c8e461fe33ab9
2023-12-19 sgrekhov22@gmail.com Fixes dart-lang/co19#2441. Fix roll failures (dart-lang/co19#2443)
2023-12-18 sgrekhov22@gmail.com Fixes dart-lang/co19#2435. Fix roll failures (dart-lang/co19#2437)
2023-12-18 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Variables (dart-lang/co19#2431)
2023-12-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2430. Update expected errors positions for CFE (dart-lang/co19#2433)
2023-12-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2432. Remove excessive expected error for CFE (dart-lang/co19#2434)
2023-12-14 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Maps (dart-lang/co19#2426)
2023-12-14 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Lists (dart-lang/co19#2424)
2023-12-14 sgrekhov22@gmail.com dart-lang/co19#2139. Fix wrong failure of Language/Functions/element_type_A02_t06 (dart-lang/co19#2429)
2023-12-13 sgrekhov22@gmail.com dart-lang/co19#2350. Add more factory constructors tests (dart-lang/co19#2427)
2023-12-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2415. Update `StreamController.broadcast()` test according to the changed documentation (dart-lang/co19#2425)
2023-12-13 sgrekhov22@gmail.com dart-lang/co19#2350. Add/update factory constructor tests. Part 4 (dart-lang/co19#2367)
2023-12-12 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Enums, trivial cases (dart-lang/co19#2423)
2023-12-11 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Enums (dart-lang/co19#2422)
2023-12-11 sgrekhov22@gmail.com dart-lang/co19#2386. Rename well-bounded tests. Update descriptions (dart-lang/co19#2405)
2023-12-08 sgrekhov22@gmail.com dart-lang/co19#2415. Change expectations for Stream.asyncMap() according to the current behavior (dart-lang/co19#2421)

Change-Id: I777eba4f1615c8477a5d2044f295696dfc210b1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342582
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2023-12-19 16:20:14 +00:00
Alexander Markov 6b12473f75 [vm] Adjust return value of async/async*/sync* after the language spec change
Calculation of element type for the value returned from
async/async*/sync* functions was recently adjusted
in the spec to address soundness issue
(https://github.com/dart-lang/language/pull/3218).

This change adjusts Dart VM to conform to the new spec.

TEST=language/async/regression_54311_test
TEST=co19/Language/Functions/element_type_*

Fixes https://github.com/dart-lang/sdk/issues/54316
Issue https://github.com/dart-lang/sdk/issues/54311
Issue https://github.com/dart-lang/sdk/issues/54159

Change-Id: I4c51e7cba704d034350519375210bdb2086c5432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342082
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-12-19 16:14:39 +00:00
Dan Chevalier e58efcb049 Connecting DTD and DTD_impl together.
This change adds the happy path for DTD_impl and DTD being able to:
- register streams
- register serviceMethods
- postEvents to streams
- call serviceMethods

Change-Id: I73865071745ef19a4493f86714e0855930243dd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-19 15:36:22 +00:00
dependabot[bot] 08e3d3ee5a Bump actions/stale from 8.0.0 to 9.0.0
Closes https://github.com/dart-lang/sdk/pull/54303

GitOrigin-RevId: 5d98a35bd98e6fea52e28efff3e550c1e24ed275
Change-Id: I9e59c3da9b431a9c4d215311f5c65e2631811815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340840
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-12-19 15:34:36 +00:00
dependabot[bot] 7e13d4c2dd Bump actions/upload-artifact from 3.1.3 to 4.0.0
Closes https://github.com/dart-lang/sdk/pull/54393

GitOrigin-RevId: a80d7e70716f0dffc082984f62191cd23d42330e
Change-Id: I8c5b2ccd5b5b4b7c58ca51a59a4a0b7b7bce4beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342320
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 15:34:19 +00:00
Paul Berry 1de6bc74d2 Restore mixed-mode language tests.
This change reverts https://dart-review.googlesource.com/c/sdk/+/341020.

The reverted CL removed tests from `tests/language` that contained
legacy code (code with a language version less than 2.12). The primary
purpose of the removal was to unblock removal of legacy support from
the analyzer. It seemed safe to do because legacy code isn't supported
anymore, and no legacy code exists in google3 anymore. However,
several of those tests exercised important "weak mode" runtime
semantics of the web and VM platforms. See discussion at
https://dart-review.googlesource.com/c/sdk/+/341020/comments/bce31aa1_f5392ce1
for details.

This CL restores the deleted tests. Fortunately, since all the
restored tests are annotated with `Requirements=nnbd-weak`, they will
be skipped on the analyzer (thanks to
https://dart-review.googlesource.com/c/sdk/+/342080), so restoring
them no longer gets in the way of removing legacy support from the
analyzer.

Change-Id: Ib828be76f5c7eaeecaad0b7e7f7b0e3ff2f4bdb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342090
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-19 13:50:18 +00:00
Chloe Stefantsova a52b9edb9b [cfe] Reland "Check type variable dependency cycles via extension types"
The original CL: https://dart-review.googlesource.com/c/sdk/+/337183

Closes https://github.com/dart-lang/sdk/issues/54097
Closes https://github.com/dart-lang/sdk/issues/54164
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I3291d17b6edcde87b56ff25d3d99902882100f07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342581
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-12-19 11:59:00 +00:00
Jens Johansen bf96a722bc [frontend_server] CFE team takes ownership of package:frontend_server
First of we apply the wanted lints etc we prefer.
This includes but isn't limited to using types (i.e. no "var") and
being explicit about creation (i.e. no missing "new").

Change-Id: I516bccdac9760221ea5311af4567466bb4a65c77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341960
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 10:38:28 +00:00
Jonas Termansen a5109dc82b [build] Handle RBE in -fdebug-prefix-map.
The RBE build happens in a different working directory when run
remotely and the -fdebug-prefix-map option with a local path inhibits
cache sharing between tryjobs and developers. This change fixes the
RBE object files so they don't contain the remote absolute path and
also ensures the build commands can be cache shared.

Bug: b/296994239
Change-Id: I6d2cd42fd775724ccb5c335c85b5f31ad279624f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342342
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-19 10:28:33 +00:00
Jonas Termansen 2ff976e9e3 [infra] Specify Linux in RBE platform.
Bug: b/296994239
Change-Id: Ice6ed1bda597e300600d6d6823901ec21f5cfcd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342420
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 10:23:52 +00:00
David Morgan 12c548d331 [macros] Add first language tests for introspection.
R=jakemac@google.com

Change-Id: Ic6e081a0a97f23c35b90bc3d935d3c97f4ec5bcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341963
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2023-12-19 09:56:46 +00:00
Chloe Stefantsova 3eeba4a4e2 [cfe] Refactor FunctionNode.futureValueType into emitted value type
Previously we would encode the type of the value returned in `async`
functions as the field `futureValueType` on `FunctionNode`. For all
other kinds of functions, such as `sync`, `sync*`, and `async*`, that
field would be null. This CL renames `futureValueType` into
`emittedVAlueType`, and for functions of kinds `async`, `sync*`, and
`async*` that is expected to be the type of values emitted via
`return` or `yield` statements. For `sync` functions that field is
supposed to contain `null`.

In response to https://github.com/dart-lang/sdk/issues/54159

TEST=existing

Change-Id: I1efdbcc4e75d150f5618c7ca50cfe49a0e54fce6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341662
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-12-19 08:44:43 +00:00
Johnni Winther 8d8c4c6125 [cfe] Handle extension types in *Concatenation nodes
Closes #54357

Change-Id: Ie5ff5c6c61c537658dcc6715054ff82c6f8537c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341961
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-19 08:43:56 +00:00
Parker Lougheed f49c786443 [cfe/analyzer] Report error on invalid abstract final class modifier combinations
Fixes https://github.com/dart-lang/sdk/issues/54143

Bug: https://github.com/dart-lang/sdk/issues/54143
Change-Id: I5710a8524dfea94b8e42595c8907b1ebf738405c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-19 08:35:33 +00:00
Martin Kustermann 338fd6501b [dart2wasm] Make _RecordType use WasmArray<>s instead of List<>s
Change-Id: I063d35209dbd5a66fbcf591ccb6a04d5139afa26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341901
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-12-19 07:43:17 +00:00
Paul Berry 355d7e02fc Stop testing nnbd-weak and nnbd-legacy on analyzer.
After discussion with Siggi about
https://dart-review.googlesource.com/c/sdk/+/341020 (which removed a
lot of mixed-mode tests from the language test suite), we've decided
that these tests are worth keeping around, because they exercise
important "weak mode" runtime functionality on the web platform, and
weak mode is still used inside google3.

However, we would like to unblock removal of legacy support from the
analyzer (because this is _not_ used inside google3 anymore, and
there's a nontrivial cost to maintaining it). So, to ensure that
removing legacy support from the analyzer doesn't cause test failures,
we need to stop running these "weak mode" tests on the analyzer
platform.

The test runner already has the ability to recognize these tests and
skip them; it recognizes them by the comment `Requirements=nnbd-weak`
at the top of the test. We simply need to instruct the test runner not
to run these tests on the analyzer platform anymore.

This CL also disables running of `Requirements=nnbd-legacy` tests on
the analyzer. No such tests exist anymore, but since support for this
requirements comment still exists in the test runner, it makes sense
to include it in the effect of this CL.

Change-Id: Ib5d5eb7c1bf879581b21fa5093fa7fa6304005a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342080
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-12-19 02:19:39 +00:00
Dan Chevalier 27892de349 Adding DTD and DTD_impl owners.
I neglected to add these while adding pkg/dtd and pkg/dtd_impl.

Adding them now to make sure vm and devtools members have ownership before too many people go on holiday.

Change-Id: I379488255786ff9f4c9b2684a0672e57c5e6aff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342500
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-19 00:54:12 +00:00
Paul Berry 6a9216a46f Remove Requirements=nnbd-weak from superinterfaces_out_of_order_error_test.dart.
The annotation `Requirements=nnbd-weak` controls prevents a test from
being run on a platform that doesn't have weak mode runtime semantics
(e.g. a program running with sound null safety).

In a previous CL
(https://dart-review.googlesource.com/c/sdk/+/341020), I removed
several tests from `tests/language` that contained legacy code, in
order to unblock removal of legacy support from the analyzer; those
tests all contained this annotation. However, after discussion with
Siggi, we've decided that it would be better to keep those tests
around for a while longer, because they exercise important runtime
behaviors of unsound null safety mode on the web and VM platforms, and
not all google3 code has been migrated off of unsound null safety mode
yet.

So, I intend to take a different approach to unblocking removal of
legacy support from the analyzer: stop running tests with the
annotation `Requirements=nnbd-weak` through the analyzer. This will
allow the tests removed in
https://dart-review.googlesource.com/c/sdk/+/341020 to be restored,
but it will have a side effect of causing a small number of additional
analyzer tests to be skipped. All those tests are benign to skip on
the analyzer (because they are purely concerned with runtime
semantics) except for one:
`superinterfaces_out_of_order_error_test.dart`.

This test doesn't have any runtime semantics at all; it merely checks
that the analyzer and CFE produce the correct errors for certain
compile-time type checks that have nothing to do with weak mode
runtime semantics.

So, to prevent a gap in test coverage when the analyzer begins
skipping tests annotated with `Requirements=nnbd-weak`, we need to
remove this annotation from
`superinterfaces_out_of_order_error_test.dart`.

Change-Id: I7932a0200be750116c41a303b48aaef50bc952ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-19 00:08:19 +00:00
Konstantin Shcheglov d646c92abe Macro. Tests for StaticType.isSubtype()
Change-Id: I476d090567074d18bb9d1cb61faf8cb1f7294325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342387
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-18 23:23:25 +00:00
Kenzie Schmoll 5881d669f0 Update DevTools rev to c7aa1df42178b054901c36bb1b8ea25b5542be8c
Change-Id: I72f9fdb249b53b16d34f11919db1696a66ca4b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342384
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-18 23:07:16 +00:00
Sam Rawlins 6359449766 Remove dead code in prefer_constructors_over_static_methods.dart
Dead code like this is allowed to be added when it is made unnecessarily
public. Fields that are not accessed outside a library should be made
private; being made private also gives us sportier static analysis,
detecting unused fields like this.

Change-Id: Ibd322357bfcb3e9ed1603e35aadb76eb0474a8b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342386
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 22:32:14 +00:00
Konstantin Shcheglov 739baa4bc1 Macro. Implement DefinitionPhaseIntrospector.inferType()
Change-Id: I5b2582acf2d55eef07ecbc7535b777cc6e59a3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342385
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 22:24:19 +00:00
asiva 794d3adf93 [VM] - Minor cleanups
TEST=ci

Change-Id: I5c2839fe48f1a4f1f48aa86cee948dc99fcca511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342383
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-12-18 21:39:09 +00:00
Keerti Parthasarathy 3e73f10de0 Disable fixes for unawaited_futures in cascades.
Fixes https://github.com/dart-lang/sdk/issues/54105.

Change-Id: Ibf69c9c52d7d514d709ebc43a8d9a2d363e85e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342382
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 21:19:48 +00:00