Commit Graph

689 Commits

Author SHA1 Message Date
Robert Nystrom 732b07a42b Roll dart_style into the SDK.
I'm still chasing down a couple of google3 failures, but this is ready for review so that I can get it approved and land it once the last couple of failures are fixed. Here is who I think should review what:

athom@ for:

- DEPS

johnniwinther@ for:

- pkg/_fe_analyzer_shared
- pkg/front_end
- pkg/kernel

brianwilkerson@ for:

- pkg/analysis_server
- pkg/analyzer_plugin
- pkg/analyzer_utilities

kenzieschmoll@ for:

- pkg/dartdev

pquitslund@ for:

- pkg/linter/lib/src/lint_codes.g.dart

If you're not the right person, feel free to summon someone else.

Most of the changes here are re-running code generators that auto-format the code they generate. The changes are:

Roll in the latest dart_style commit:

- DEPS

Manually updated these test expectations to expect the new style:

- pkg/analysis_server/test/lsp/format_test.dart
- pkg/analysis_server/test/services/refactoring/agnostic/change_method_signature_test.dart
- pkg/analysis_server/test/src/domains/flutter/set_property_value_test.dart
- pkg/analysis_server/test/src/services/flutter/container_properties_test.dart
- pkg/analysis_server/test/src/services/flutter/widget_descriptions_test.dart
- pkg/analysis_server/test/src/services/refactoring/convert_selected_formal_parameters_to_named_test.dart
- pkg/analysis_server/test/src/services/refactoring/move_selected_formal_parameters_left_test.dart

This was auto-generated by something, but I'm not sure why it thinks there is a diff:

- pkg/analyzer_plugin/doc/api.html

Updated to require a version of dart_style that accepts a language version in DartFormatter():

- pkg/analyzer_plugin/pubspec.yaml

Updated to always use the latest language version (and thus new style) when invoking the formatter:

- pkg/analyzer_utilities/lib/tools.dart

Manually updated the formatting in the code templates so that they matched the formatting expected by the tests, which implicitly format using the latest language version:

- pkg/dartdev/lib/src/templates/...

The rest are all generated files that are formatted so re-generated using the new style:

- pkg/_fe_analyzer_shared/lib/src/experiments/flags.dart
- pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
- pkg/analysis_server_client/lib/handler/notification_handler.dart
- pkg/analysis_server_client/lib/src/protocol/...
- pkg/analysis_server/lib/protocol/protocol_generated.dart
- pkg/analysis_server/test/integration/support/integration_test_methods.dart
- pkg/analysis_server/test/integration/support/protocol_matchers.dart
- pkg/analyzer_plugin/lib/protocol/...
- pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart
- pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
- pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart
- pkg/analyzer/lib/src/dart/error/...
- pkg/analyzer/lib/src/error/codes.g.dart
- pkg/analyzer/lib/src/manifest/manifest_warning_code.g.dart
- pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart
- pkg/analyzer/lib/src/summary/format.dart
- pkg/analyzer/lib/src/wolf/ir/ir.g.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_000_1.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_001_0.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_010_0.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_100_0.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/simple/...
- pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
- pkg/front_end/lib/src/codes/cfe_codes_generated.dart
- pkg/front_end/lib/src/util/parser_ast_helper.dart
- pkg/front_end/test/parser_test_listener.dart
- pkg/front_end/test/parser_test_parser.dart
- pkg/front_end/testcases/...
- pkg/kernel/lib/src/coverage.dart generated
- pkg/kernel/lib/src/equivalence.dart generated
- pkg/linter/lib/src/lint_codes.g.dart

Change-Id: Ice0141b763e63b84f54692cd19a442a0719673c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391263
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-11-06 18:42:25 +00:00
Siva Annamalai 74c5aa3a7a Revert ""[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory""
This reverts commit f81a402aa1.

Reason for revert: golem benchmarks are failing to run

TEST=ci

Original change's description:
> "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
>
> Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime
>
> This reverts commit 75e6a748f7.
>
> TEST=ci
>
> Original change's description:
> > Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
> >
> > This reverts commit 1b331d05c2.
> >
> > Reason for revert: golem builds are failing
> >
> > Original change's description:
> > > [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
> > >
> > > TEST=ci
> > >
>
> Change-Id: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: Iec494940412aa31dbefdc5280e35ae99e8cecb26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393764
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-11-06 05:37:46 +00:00
asiva f81a402aa1 "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime

This reverts commit 75e6a748f7.

TEST=ci

Original change's description:
> Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
>
> This reverts commit 1b331d05c2.
>
> Reason for revert: golem builds are failing
>
> Original change's description:
> > [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
> >
> > TEST=ci
> >

Change-Id: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-06 03:10:31 +00:00
Siva Annamalai 75e6a748f7 Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
This reverts commit 1b331d05c2.

Reason for revert: golem builds are failing

Original change's description:
> [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
>
> TEST=ci
>
> Change-Id: I96ed52994e0d955300c18026032e68003504666d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: I5dc14973f4ee4e577b2c996839d5e497c97fb440
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393761
Commit-Queue: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-05 21:58:09 +00:00
asiva 1b331d05c2 [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
TEST=ci

Change-Id: I96ed52994e0d955300c18026032e68003504666d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-11-05 20:39:15 +00:00
Martin Kustermann c549a73d62 [deps] Roll dart-lang/native to new version
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Change-Id: I78f0ece02c337b3b132f161fa7cc5e88db223b57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389500
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2024-11-04 12:56:53 +00:00
asiva 0b38e4b189 [dartdev] Add 'compile js-dev' command in the Dart cli tool.
Added the option 'js-dev' to the compile command to allow compilation
of Dart sources using DDC. This ensures that tools will not be reaching
into the internal implementation details of a Dart SDK to run DDC.

TEST=unit tests added in compile_test.dart

Change-Id: I3c670b43a989dfa60c75622fdbc1b7f99b399293
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392202
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-29 20:54:59 +00:00
Danny Tuppeny 97ab888201 Remove spawning of DDS from DAP and let the spawned dart run/dart test do it
Fixes https://github.com/dart-lang/sdk/issues/56733

Change-Id: I23acd9ba4cd48dd7fe5e23fc388d143db8779754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386500
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-10-24 20:44:34 +00:00
Ben Konyi 6a9a4f0d0c [ CLI ] Support --suppress-analytics before CLI commands and for dart test
Fixes https://github.com/dart-lang/sdk/issues/56842

TEST=pkg/dartdev/test/commands/test_test.dart

Change-Id: I1692352e3847c977c72a948d26be8ef8311ec69e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390900
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-10-18 15:02:06 +00:00
Siva Annamalai 1e624b8122 Reland "[SDK] Reland : Switch dart2js to an AOT snapshot."
This reverts commit ceba7a5e65.

Reason for revert: Flutter tools has been fixed to use 'compile js' option instead of directly naming the snapshot.

Original change's description:
> Revert "[SDK] Reland : Switch dart2js to an AOT snapshot."
>
> This reverts commit 9fec00aeed.
>
> Reason for revert: flutter tools needs an update to use the 'compile js' command instead of reaching into the dart-sdk and using snapshot names (see https://github.com/flutter/flutter/issues/156654)
>
> Original change's description:
> > [SDK] Reland : Switch dart2js to an AOT snapshot.
> >
> > TESTS=ci
> >
> > Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> Change-Id: I72bd9ad731b2b60d154c1e6477cce913d72acec4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390020
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I15a9dc3092e436cdcb0fa84c8e7ddd1dac195074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390620
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-16 20:05:10 +00:00
Siva Annamalai ceba7a5e65 Revert "[SDK] Reland : Switch dart2js to an AOT snapshot."
This reverts commit 9fec00aeed.

Reason for revert: flutter tools needs an update to use the 'compile js' command instead of reaching into the dart-sdk and using snapshot names (see https://github.com/flutter/flutter/issues/156654)

Original change's description:
> [SDK] Reland : Switch dart2js to an AOT snapshot.
>
> TESTS=ci
>
> Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I72bd9ad731b2b60d154c1e6477cce913d72acec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390020
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-14 17:34:49 +00:00
Devon Carew d27e14496f Bump args to 09c0fca1785c9df39288a48f767994eed80bed40
Changes:
```
> git log --format="%C(auto) %h %s" e623652..09c0fca
 https://dart.googlesource.com/args.git/+/09c0fca Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (286)
 https://dart.googlesource.com/args.git/+/9cdc872 Add argument name when throwing a `ArgParserException`. (283)

```

Diff: https://dart.googlesource.com/args.git/+/e623652744c82533829f2e62b1aba1a6cf06e291..09c0fca1785c9df39288a48f767994eed80bed40/
Change-Id: I804c86db060b3c83acd34c00dd76953c6f28f70a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388744
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-10-10 16:06:10 +00:00
asiva 9fec00aeed [SDK] Reland : Switch dart2js to an AOT snapshot.
TESTS=ci

Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-08 17:49:34 +00:00
Martin Kustermann 26eeeaa245 [deps] Roll dart-lang/native to new version
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Change-Id: I08f3d07571f1f9733cb177be326ec99acc5d68ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388540
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-10-07 15:57:33 +00:00
Siva Annamalai 947639d496 Revert "[SDK] Switch dart2js to an AOT snapshot."
This reverts commit ff2d1a277f.

Reason for revert: golem benachmark build needs some tweaking, webdev dart2js build tests

Original change's description:
> [SDK] Switch dart2js to an AOT snapshot.
>
> TESTS=ci
>
> Change-Id: I1e4fa050652786367e6410fedbceca4e32121aa5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386660
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I221a81274725bd562c4cafcf0db413cef1ac9d75
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388261
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2024-10-04 00:39:56 +00:00
asiva ff2d1a277f [SDK] Switch dart2js to an AOT snapshot.
TESTS=ci

Change-Id: I1e4fa050652786367e6410fedbceca4e32121aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386660
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-03 19:55:10 +00:00
Martin Kustermann bc15ff6d53 [deps] Roll dart-lang/native to new version
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Change-Id: I8e9e8e076777e1ac152fddbdab72581c2fc572c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387701
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-10-01 12:45:16 +00:00
Ben Konyi 12d9f40961 Reapply "[ CLI ] Don't disable DDS when --disable-dart-dev is provided"
This reverts commit 9f5246e8c6.

TEST=Existing tests

Change-Id: I658290f248d8b26c05f24b7125c3ba71de318bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385121
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-09-26 15:29:05 +00:00
Devon Carew a4a9c59772 [dartdev] rev to using v5.0.0 of package:lints
Change-Id: Iea78c56fc6587008ec48de014bcdec9ce860b12f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386825
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-09-26 15:27:30 +00:00
Martin Kustermann 5ede6d466c [deps] Roll dart-lang/native to new version
We rename the Dart CI specific environment variables we use for testing
dart-lang/native code on Dart CI to make it clear they are for testing
only.

Change-Id: Idb7c016df5b6fd3aee7a2952be06752a8343f02e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386804
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-09-25 20:45:11 +00:00
Tess Strickland bd8593899a [gardening] Replace exitCode 0 expects in dartdev native_assets tests.
nativeAssetsTest takes a named argument expectExitCodeZero which,
if true, checks to see if the exit code is 0 and if not, prints
both stdout and stderr before using an expect to stop the test.

Fix tests that pass false for expectExitCodeZero and then manually
expect an exit code of 0 without printing stdout/stderr to pass true for
that argument.

TEST=pkg/dartdev/test/native_assets/build_test
     pkg/dartdev/test/native_assets/run_test

Change-Id: Id0a52e1df1b0260cf9014812ac8c1dee9c91a8e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385921
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-09-20 10:29:45 +00:00
Moritz 7222c2963d Add recording of constant instances to record_use
TESTED=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I73ee5b7f1478286252664c53397270906ead549b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384280
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
2024-09-13 09:07:02 +00:00
Moritz 81daf8e563 Use package:record_use
- Rename resource identifiers in the VM to usage recordings.
- Use package:record_use for serialization.
- Rename and use the experimental flag for this feature.
- Recognize tear-offs and top-level methods as well.

Next steps:

- Add constant instance recording.
- Expose API in package:native_assets_cli's link callback.

TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I8af3625165f78925ae943711245af93a239d1012
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383040
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
2024-09-12 08:47:53 +00:00
Ben Konyi 9f5246e8c6 Revert "[ CLI ] Don't disable DDS when --disable-dart-dev is provided"
This reverts commit 81b9957bdd.

Reason for revert: Breaking multiple configurations.

Original change's description:
> [ CLI ] Don't disable DDS when --disable-dart-dev is provided
>
> Fixes https://github.com/dart-lang/sdk/issues/56605
> Fixes https://github.com/dart-lang/sdk/issues/54841
>
> TEST=N/A
>
> Change-Id: I6a13afe5f51fe67d2366c6d87ae74473651e24c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383780
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Phil Quitslund <pquitslund@google.com>

Change-Id: I5c6cb302d8160f19bad437341cdcd80bcc08d921
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384881
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-09-12 01:15:27 +00:00
Ben Konyi 81b9957bdd [ CLI ] Don't disable DDS when --disable-dart-dev is provided
Fixes https://github.com/dart-lang/sdk/issues/56605
Fixes https://github.com/dart-lang/sdk/issues/54841

TEST=N/A

Change-Id: I6a13afe5f51fe67d2366c6d87ae74473651e24c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383780
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-09-11 18:01:25 +00:00
Daco Harkes 086b7d00ee [dartdev] dart build error on conflicting dylib names
Change-Id: I4fcb5ac774719d237f437af66ffe4f9783a6dd0c
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383986
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-09-06 19:30:31 +00:00
Daco Harkes 5f93efd89c [dartdev] Run pub get on dart test with native assets
Closes: https://github.com/dart-lang/sdk/issues/54160
Change-Id: Ic66fc1bc235ebcd869e779624dbf7f0aee4425a4
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-arm64-try,pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383985
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-09-06 19:29:57 +00:00
Daco Harkes a261846de1 [dartdev] Don't delete project with dart build
Closes: https://github.com/dart-lang/sdk/issues/54144
Change-Id: I23f423d273427d4a2d5fd34053dfbe06b5917fda
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384060
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-09-06 19:29:04 +00:00
Martin Kustermann 0e620b27a0 [dart2wasm] Align test outcomes of dart2wasm across configurations
Aligns exit codes of

  * `dart compile wasm` and
  * `pkg/dart2wasm/tool/compile_benchmark`

Also make them use exit codes recognized by the test runner to
distinguish CFE crashes, CFE compile-time-errors and other failures.

Also update status file entries to from D8 specific entries
to JS commandline shell entries

=> Step towards aligning D8 & JSC test results

Change-Id: I1acb8803f5db7c732ad546d5989b1c555583e7c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383660
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-09-05 11:22:18 +00:00
Konstantin Shcheglov 2aa54ab42c Parts. Fix unnecessary_import before landing the reporting CL.
https://dart-review.googlesource.com/c/sdk/+/382901 will start
reporting it in more cases.

Change-Id: I3ae1d407f37a317f33cb98977b0e6eb08de75065
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383221
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-09-03 03:51:29 +00:00
Ben Konyi b8018a88cc [ Service ] Fix race in startup / shutdown code
Fixes https://github.com/dart-lang/sdk/issues/56606

TEST=regress_56606_test.dart

CoreLibraryReviewExempt: VM service only change
Change-Id: Ie3a96d277547ac8ef4bf45ba700ad311d5997817
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383060
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-08-30 17:51:52 +00:00
Martin Kustermann 98cf417f4d [dart2wasm] Align -O4 flag in dart2wasm with dart2js behavior
Change-Id: I3a122639258570d7abbbd4f727760533f658b090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382564
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-30 13:25:39 +00:00
Ben Konyi 230c7ed90c [ VM ] Exit with error if --disable-dart-dev is provided after a Dart CLI command
Fixes https://github.com/dart-lang/sdk/issues/56592

Fixed: 56592
TEST=regress_56592_test.dart
Change-Id: I3363a27c6a4221a3c5388b3472cee978649c1e39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382700
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-08-29 20:40:06 +00:00
Nate Biggs f00e9b1b29 [dart2wasm] Add --minimize-rec-groups to binaryen flags
This new flag uses a new algorithm to generate the module's type section. The new algorithm is able to produce smaller type sections reducing the overall size of the wasm binary.

For flute.complex at -O4 using this flag produced a wasm file 2.5% smaller.

Change-Id: Iaa7905174c496d637dc3d8d4533df6fd6f056597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382462
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 15:14:39 +00:00
Daco Harkes b6e952b50c [test] Add a test testing the test environment
Bug: https://github.com/dart-lang/native/issues/1447
Change-Id: I0dd6d659a0fde1c6b0e3cc0dc81e2f01b7146f32
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381982
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-08-23 15:18:31 +00:00
Simon Binder ca77beac58 [dart2wasm] Fix multi root invocations
`dart2wasm` supports the `--multi-root` argument and respective URIs as
inputs.
`build_runner` uses the multi root argument when compiling with dart2js
as it allows a file system layout like this, placing `lib/` contents of
packages into folders next to non-lib assets of the root package being
compiled:

```
input/
  args/
  async/
  .../
  other_packages/
  web/
    index.html
    main.dart
```

While it looks like `dart2wasm` is supposed to support the same
arguments as well, the way it parses URI flags and a pre-check in
`dartdev` unfortunately prevent this.
This fixes `dartdev` to not check for inputs when a multi-root argument
is given, as the paths are not physical paths from the operating system
in that case.
It also fixes the `UriOption` in `dart2wasm` to be consistent with how
input arguments are resolved, allowing multi-root scheme URIs to be
used as arguments for e.g. `--packages`.

Change-Id: If751a5ee58938d5c7c62e27a69957456d8eea860
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-08-15 17:24:37 +00:00
Martin Kustermann 07da83d321 [dart2wasm] Simplify source map flag code in dart compile wasm
After [0] lands we can remove a workaround in `dart compile wasm` that
checks for `--extra-compiler-option=--no-source-maps`.

[0] https://github.com/flutter/flutter/pull/153417

Change-Id: I19f4da96e198d73e2309652aa2aa08d5e2c72d48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-08-14 10:00:49 +00:00
Martin Kustermann 075c443f2e [dart2wasm] Make dart compile wasm understand not to generate source maps on --no-source-maps as well as --extra-compiler-option=--no-source-maps
When `flutter build web --wasm` run passed
`--extra-compiler-option=--no-source-maps` it caused the compiler not to
generate source maps, but `dart compile wasm` thought it does and tried
and use the file, which causses an issue.

We can remove this workaround once this CL rolls up to flutter and we
change `--extra-compiler-option=--no-source-maps` to `--no-source-maps`.

Bug: https://github.com/flutter/engine/pull/54487
Change-Id: I82c56ab7d1bc09e53919a6b72b0b1771215d8d25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380000
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-12 08:39:47 +00:00
Ömer Sinan Ağacan 1b1740e941 [dart2wasm] Pass source maps to wasm-opt when optimizing
To be able to know when we are generating a source map, make `dart
compile wasm` aware of the `--no-source-maps` flag.

The "name" segments of source mappings are also made `null` with this
patch. Browsers don't use that segment and binaryen doesn't support it.

Change-Id: I7b52c8fb7cef92ed60547e97ad137e0cd3967f26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378421
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-09 14:23:29 +00:00
Keerti Parthasarathy 372099dd63 [dart fix]Check if both the apply and dry-run flags are specified.
Fixes https://github.com/dart-lang/sdk/issues/55524

Change-Id: Ia7c751adb2d52ea2dd9f3fdda21f1ea439a1f120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-08-07 21:27:19 +00:00
Ben Konyi 639cc322f1 [ CLI ] Fix issue where Platform.executable on Windows could return 'dart'
When running the VM from PATH using 'dart', Platform.executable could report
the process name as 'dart' instead of 'dart.exe'. This change updates dartdev
to handle this case so the checkArtifactExists call doesn't fail to find the
'dart' binary.

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

Change-Id: I1d2e87e3f1b9841ca2b23d1e16bb53dc0f2183a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377542
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-08-01 18:59:34 +00:00
Ben Konyi e9be5dc4aa [ CLI ] Fix issue where 'dart build' would fail to find the 'dart' when run from PATH
Fixes https://github.com/dart-lang/sdk/issues/56080

Change-Id: I301b6959e372c2ad8b72ce055645b5affce5516e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/376860
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-07-22 13:57:56 +00:00
Daco Harkes 7d4280022c [native_assets] Stop running link hooks in JIT mode
Note that the `add_asset_link` example project has it's build hook
`exit(nonZero)` because the project only works with link hooks
enabled.
Therefore, the test expectations for `dart run` is that it fails, and
for `dart build` that it succeeds.

Bug: https://github.com/dart-lang/native/issues/1252
Change-Id: I8566d1289a079078586a2e6149f5b77e641618f9
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375100
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2024-07-10 11:28:47 +00:00
Danny Tuppeny 3c66c16122 [dtd] Move DTD implementation classes from lib/ to lib/src/ to avoid src/ files importing from lib/
Fixes https://github.com/dart-lang/sdk/issues/56178

Change-Id: I1f461e0f9c787e69eade7a5e4806c0a85bb23c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374981
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2024-07-09 19:55:17 +00:00
Daco Harkes fb9cdeee2d [native_assets] Pass MacOS version to build and link hook
Also fixes the list of asset types supported.

Change-Id: If18704e8718a96ea07bad1758a84f3b8e625d059
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2024-07-08 16:03:58 +00:00
Danny Tuppeny 499277c690 [dtd] Add support for '--disable-service-auth-codes'
See https://github.com/dart-lang/sdk/issues/54932

Change-Id: Ie85eb76eb5e8c01dda957d038286ae498748ca70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373340
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-07-03 14:51:43 +00:00
asiva 27cbf50a26 [VM/FFI] Add a test case for issue dartbug.com/56064
Adding a test case for issue dartbug.com/56064 which needs to be cherry
picked into the stable release. The fix was done in
https://dart-review.googlesource.com/c/sdk/+/368341

TEST=new test being added

Change-Id: I4e58ef5a33c335ba91b639ce4fcebd052969e07d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374143
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-07-02 22:09:59 +00:00
Ben Konyi 4abd615d32 [ CLI ] Update checkArtifactExists check to allow for Links in addition to Files
Related issue: https://github.com/dart-lang/sdk/issues/56080

Change-Id: I9b630ea3488e3f030cd92c593a4ee3bb4d718dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373380
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-26 17:18:17 +00:00
Parker Lougheed 96eb11f052 Update various flutter.dev links to more stable destinations
Bug: https://github.com/flutter/website/issues/10363
CoreLibraryReviewExempt: Just updating link in API doc.
Change-Id: I6c4dc17206410fa86e88b4630c8056a994e18967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372381
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
2024-06-20 19:30:02 +00:00
Danny Tuppeny c34f79355f [dartdev] Fix analysis test failing on Windows due to drive letter casing mismatches
On the bots, the system temp directory has a lowercase drive letter (`c:\`) but the analyzer normalises the path to uppercase. The output for the error being used in the test contains a complete path so this allows for casing differences.

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

Change-Id: Id85fba7965a64a83783e7eb8e180cac0a5df9a1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
2024-06-20 18:40:15 +00:00