Commit Graph

764 Commits

Author SHA1 Message Date
Daco Harkes da5ae4786c [deps] Roll dart-lang/native
Adds support for dev dependencies with build hooks in `dart test`.

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

Change-Id: Ia05497ef5e1ec2bf11454fde8660b6626dcc524e
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/+/432621
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2025-06-03 02:47:25 -07:00
Konstantin Shcheglov 4580a03480 Roll dartdoc to 4ceea6b8240bf1dd9694a170368264e40c67d66b
Related to https://dart-review.googlesource.com/c/sdk/+/432125

Change-Id: I52f74bb83508469fc73373c3b849707b8aa914d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-06-02 13:30:51 -07:00
Jake Macdonald d828c36cec Add a dart mcp-server command per go/dart-mcp-server-release-plan.
- Adds `dart_mcp` and `dart_mcp_server` as DEPS
- Build an AOT snapshot for the dart_mcp_server executable
- Add top level `mcp-server` command to dartdev (hidden).
- I also did add an `--experimental-mcp-server` flag which is required for this command to actually work. We had initially discussed not doing this due to complexity but I was able to keep it completely scoped to just this command. I can remove it if there are strong opinions though.

Change-Id: I737a5625507f69a904ccd1012682764eb360a2c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430900
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2025-05-27 10:14:26 -07:00
Daco Harkes 8ac2279b07 [native assets] Graduate to preview
This PR enables native assets on the main and dev channel by default,
and make native assets available on the beta channel.

This PR removes the flag from invocations.

The helper packages (`package:hooks` and `package:code_assets`) will
stay 0.x for now, until the SDK constraint can be bumped to a beta
release and we're happy with the Dart API.

`dart build` is also made available as preview (without a flag on
the main, dev, and beta channels). We're still finalizing the spec for
this command. (https://github.com/dart-lang/sdk/issues/60730)

`dart test` will need https://github.com/dart-lang/test/pull/2501.
This means users will need to update their `package:test` dependency.

This PR refactors the way that invalid `package_config.json`s are
handled: they are now loaded in the dartdev commands and handled there.

Bug: https://github.com/dart-lang/sdk/issues/50565
Project: https://github.com/orgs/dart-lang/projects/99/

Change-Id: I7db9ff6d7196750cab9379a4605c6bbf89a974d7
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/+/429920
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-05-21 06:10:19 -07:00
Brian Wilkerson 0dd4a95b3c Display correct line and column offsets for context messages
The line and column offsets for the context messages were being computed
based on line information for the file in which the diagnostic was being
reported, which can be different than the file pointed to by the context
message. This ensures that we use the right line info.

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

Change-Id: I6dbc95bde5aeb1abc70d90767dc59082982a5a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-19 09:23:59 -07:00
Daco Harkes 70a56b3947 [deps] Roll dart-lang/native
`dart pub get` will create a `package_graph.json` now. Ensure this
file exists (besides the `package_config.json`).

Change-Id: I6ed5e395f101c298a999f51d61b096659db70930
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/+/428600
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-05-15 03:08:52 -07:00
Derek Xu 0ead16d05b [VM] Make it so that --profile-microtasks is processed by the code in both runtime/bin/main_options.h and runtime/vm/flags.h
TEST=pkg/vm_service/test/timeline_events_for_completed_microtasks_test

Change-Id: Ia544cabc7bfe6e322955d16d3078cab461b803ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425100
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-05-13 14:29:37 -07:00
Sam Rawlins ac18236b6a dartdev: avoid mutating an immutable list
Not sure how I missed this error before. I may have not been
manually testing the right thing earlier.

Change-Id: I4516e646cd0b0ada9590c53ad39c0dc2cc60c6c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426700
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-05-08 11:14:42 -07:00
Sam Rawlins 80ad4befd6 dartdev: Add an AOT option to 'dart fix'
Work towards https://github.com/dart-lang/sdk/issues/50498

Change-Id: Ie09063325062e1b2c3b70d3a2a65df4c33c74095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425981
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-05-05 10:10:49 -07:00
Sam Rawlins 060e4e208c dartdev: Support running the AOT analyis_server snapshot for analyze command
The `dart analyze` command is quite separate from the `dart language-server` command. This CL adds support for `dart analyze`.

Work towards https://github.com/dart-lang/sdk/issues/50498

Change-Id: I60a846ae5d3452c2bb050bd07502084ff44b82c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425188
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-05-02 11:49:21 -07:00
Daco Harkes 245498232c [deps] Roll dart-lang/native
`package:native_assets_cli` has been split up and
`package:native_assets_builder` has been renamed.

Change-Id: Ic9d5c21bb3c7ecf7924fdee6b4281153ad37fac5
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/+/425504
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-05-01 02:18:11 -07:00
Sam Rawlins 06f5db3480 dartdev: Enforce strict-raw-types
Change-Id: I593497edfbb05f0b524de4d18dc87ef7d1efdd2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425583
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-30 14:06:44 -07:00
Daco Harkes 108e40f31b [deps] Roll dart-lang/native
Change-Id: I418ca4177b64ec566d6e5afa876f6ab23c77a4f9
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/+/425040
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-04-29 05:54:11 -07:00
Sam Rawlins a67b8c503e DAS AOT: check artifact exists; remove negated flag
Change-Id: Ic222050fd5a2e091ab8e2063c018fa8707614168
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424705
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-04-28 19:28:28 -07:00
Sam Rawlins 7e8f84b571 Add DAS AOT snapshot to SDK; can toggle with runtime dartdev flag
Change-Id: Idbef46ca62045022458d6d951f301ff4d6895cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-04-24 18:06:38 -07:00
Ivan Inozemtsev c5dc292196 Remove --experimental-cross-compilation flag
The cross compilation will be supported in 3.8.

Change-Id: Icedd1fe51198558b5a62fc431d4699e63557a2ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424442
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-04-24 08:40:58 -07:00
Derek Xu 75311aefa8 [VM/Timeline] Add Microtask stream
TEST=runtime/vm/dart_api_impl_test.cc

Change-Id: Icb078489f3600ac0fb8b314ca3bf748f482a687e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422860
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-22 07:42:27 -07:00
Daco Harkes 6a74c59033 [deps] Roll dart-lang/native
Roll for https://github.com/dart-lang/native/issues/2187.

The `NativeAssetsBuildRunner` now checks the pubspec for valid
user-defines, errors if they are not valid, and loads them.
So, delete all code in dartdev which did this.

Change-Id: I34f5bba3f4a7c4847c9cd33901c2f0a2f915ea22
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/+/422720
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-04-16 09:53:33 -07:00
Danny Tuppeny f24d4d1653 [dartdev] Fix some tests to work under 'dart test'
Now that the SDK uses Pub Workspaces, using the test runner is enabled in Dart-Code. However there are some differences when using 'dart test' that caused some of these tests to fail - this change addresses them:

- Don't use Platform.script because it won't be the source Dart filename
- Make any `args` to `main()` optional
- Add calls to `test()` around some regression tests

I still have a few remaining failures locally, but I'm not yet sure if they're related to the test runner and will troubleshoot them separately.

Change-Id: I01efc5517174ae7e8146892bba1d84cc69029fd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421162
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-04-15 07:45:39 -07:00
Daco Harkes e5d926da8c [native assets] Use workspace pubspec for user-defines
Native assets are cached for the whole pub workspace. So to avoid
invalidating caches for running hooks from different root packages,
only read user-defines from the workspace `pubspec.yaml`.

Bug: https://github.com/dart-lang/native/issues/39
Bug: https://github.com/dart-lang/native/issues/2187

Change-Id: I3aeb91455a418004d3e28c231dc1f5d002c15739
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/+/422101
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-04-11 12:04:21 -07:00
Daco Harkes 423479c4c9 [native assets] Fix pub workspaces in dart test
Bug: https://github.com/dart-lang/sdk/issues/60489

We can land a fix in `package:test` as well. However, projects
referring to an older version of test will not see such fixes.
So, land a workaround here that is picked up by older versions of test.

Change-Id: Ib26be2c0edc1bccf58b7231e05896cd55ac0cf19
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/+/421741
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2025-04-11 12:04:21 -07:00
Parker Lougheed f0eeb22579 [dartdev] Update dependencies of 'web' template
Primarily updates package:web past v1 to avoid usages of the major deprecation removals.

Change-Id: Iadf614c533a043ba3821d241548cc47a68a30558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421500
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2025-04-11 11:05:50 -07:00
Robert Nystrom 1345cdf399 Roll dart_style 3.1.0 into the SDK.
Change-Id: I6392327cadce5194dabaa719bff945868a690225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419990
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-04-10 23:55:02 -07:00
Daco Harkes edde8133b7 [deps] Roll dart-lang/native
The dart-lang/native packages do no longer have path dependencies in
them. So instead of rewriting those paths in the tests, write
dependency overrides into the test projects.

To simplify path handling, use absolute paths in the dependency
overrides.

Change-Id: I0db8529543a280fe937465e9a9c9aa4bb8fd0ee1
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/+/420900
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
2025-04-08 23:37:10 -07:00
Derek Xu 9d2f622f38 [dartdev] Introduce dart run --resident --quiet
Fixes: https://github.com/dart-lang/sdk/issues/56865
Change-Id: I1a88ba40351ed1b42bb1a800b384a00eb7548225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418740
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-07 11:49:24 -07:00
Daco Harkes 17558d5f9d [native assets] Support user-defines from pubspec
Change-Id: I9978bbb3bae0170b76f9419e18f4b18f75dab577
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/+/420700
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2025-04-07 09:58:40 -07:00
Daco Harkes 8e71bac222 [deps] Roll dart-lang/native
Change-Id: Iafb418d4769de9d4fdf000e29de51bfcdef5b67b
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/+/420661
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2025-04-07 09:58:40 -07:00
Ivan Inozemtsev 2d80285a45 SDK Cache fixes for dartdev cross compilation
- Use `signed` stage only for executables (dartaotruntime is not signed)
- Ensure user-executable bit only for executables
- Fix Windows path issue (https://github.com/dart-lang/sdk/issues/60462)

Change-Id: I012c6df34174e292979610dabf1e9a5f486ef39e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420101
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-03 06:50:10 -07:00
Ivan Inozemtsev 9c88769967 Dartdev cross compilation support
- Add `target-arch` option to `dart compile exe|aot-snapshot`
- Add artifacts cache in `~/.dart`, and download gen_snapshot and
  dartaotruntime from cloud storage if necessary

I've manually built an aot snapshot and exe on macOS ARM64 for Linux
X64, copied them over to a linux machine, and made sure they work.

Change-Id: I74dd581ecb573ff4069a2fe19f9d04aaa352538e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417801
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-02 08:14:28 -07:00
Daco Harkes 90aecc4fe8 [deps] Roll dart-lang/native
Change-Id: Ic8a01cf2cd93d0f4ad89478efc0d412b2ab39039
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/+/418580
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2025-03-31 02:34:09 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -07:00
Ömer Ağacan 55d57541cb [dart2wasm] Fix --extra-compiler-option parsing
Don't split the `--extra-compiler-option` values by commas, to allow
passing `-D`/`--define` flags like `-DFOO=a, b` as one argument.

Fixes the dart2wasm failure in #60346.

Change-Id: I9c621f93d4bcd4e35926e495735c8d15a3bac212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 05:36:17 -07:00
Ömer Ağacan f4b41f0902 [dart2wasm] Fix handling of --define/-D
When parsing `--define` or `-D` arguments don't split the the value by
commas.

This is consistent with how dart2js handles `-D`, but inconsistent with
how VM handles it.

Example:

    void main() {
      print(const String.fromEnvironment("FOO"));
    }

When compiled with `dart compile js -DFOO="a, b"` and run, dart2js
prints

    a, b

VM prints (when compiled to exe)

    a

Between these two, I think dart2js' behavior is more common, so we
follow dart2js.

Also update compile_benchmark to avoid splitting a single argument "a b"
into "a" and "b" when parsing the arguments and then splicing them back
before calling `dart2wasm`.

Also update the test runner and ddc batch mode argument parser to handle
splitting quoted arguments in `// dart2jsOption = ...` and the same
options for ddc and dart2wasm, by moving dart2js's `splitLine` to a new
library and reusing it in the test runner and ddc.

Fixes https://github.com/flutter/flutter/issues/164873.

See also https://github.com/dart-lang/sdk/issues/60341 for relevant
future work.

Change-Id: Idbdf69072fa212c8e4a390990577eb5a57b49e8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415280
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-18 04:11:41 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard b9b77058a9 Migrate to use pub workspace
Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.

All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.

All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 05:21:40 -07:00
Daco Harkes ecb620191c [deps] Roll dart-lang/native
Change-Id: I9ca6b437c06320ad9436d19050571fa6844f1b2f
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/+/414980
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2025-03-12 10:41:42 -07:00
Nate Biggs 237742feab [dart2js] Remove '--no-sound-null-safety' flag and make '--sound-null-safety' flag a no-op with warning.
Change-Id: I0225f9306aa2a84494f3fc17c9f7191214404249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406081
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2025-03-03 15:46:16 -08:00
Sam Rawlins 539840f91c dartdev: Simplify some JSON-parsing code; remove dead code
* In `_handleServerResponse`, use if-case with map patterns to avoid
  casts and null checks and repeatedly fetching map values.
* Remove the castStringKeyedMap utility. After some other changes,
  most call-sites passed in a Map, so then half of the utility is not
  used. In the others, it seemed simplest to use `as Map` and `.cast()`
  inline.
* Change some `dynamic` local variables to be `Object?` instead.
* Replace `DartdevCommand.project` getter and `_project` field with a
  single final field.
* Remove unused properties from `Project` and unused `PackageConfig`
  class.
* Remove associated tests.

Change-Id: I1f626ecc0e6e4d27ef24f65959fd4cb54fb5fc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412980
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-28 14:54:14 -08:00
Sam Rawlins b42700fb21 DAS plugins: Print plugin pub-related crash information to terminal; stop analyzing
Change-Id: Id7f3d9957c52239210029b3b5c3e6f58d96a4d21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413000
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-28 14:38:48 -08:00
asiva 1e148e651b Fix issue that was found with the flutter rolls (unable to locate
the dds snapshot)


Reland "[SDK] Switch dds and dtd to use an AOT snapshot"

This reverts commit 11ab2dfe2f.

Reason for revert: Fixes the problem that is causing Flutter G3 roll to fail.

TEST=ci

Original change's description:
> Revert "[SDK] Switch dds and dtd to use an AOT snapshot"
>
> This reverts commit 6450d76f1f.
>
> Reason for revert: Breaking Flutter G3 roll
>
> Original change's description:
> > [SDK] Switch dds and dtd to use an AOT snapshot
> >
> > TEST=ci
> >
> > Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> Change-Id: I9985919063cacfc8673b3e2946eaa163e90c9cc3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411200
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I5ec8e58f905b4ad1d22d507acd8e22e676dc5532
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410921
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-02-25 14:32:41 -08:00
Moritz c4c805da60 [native assets] Single SoT for package name on Dart build
Do not use the folder name as a proxy for the package name.

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: I17664ea88a4e317d994d93ae84a5584078e5f94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410360
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Moritz Sümmermann <mosum@google.com>
2025-02-21 08:30:28 -08:00
Ben Konyi 11ab2dfe2f Revert "[SDK] Switch dds and dtd to use an AOT snapshot"
This reverts commit 6450d76f1f.

Reason for revert: Breaking Flutter G3 roll

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

Change-Id: I9985919063cacfc8673b3e2946eaa163e90c9cc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411200
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-02-20 15:17:16 -08:00
asiva 6450d76f1f [SDK] Switch dds and dtd to use an AOT snapshot
TEST=ci

Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-02-13 09:11:38 -08:00
Daco Harkes 98e29db45c [native_assets] Disable experiment on stable and beta channel
We want to avoid users passing `--enable-experiment=native-assets` on
stable and beta, as we'd like to move fast and break things on the
experiment. This aligns the experiment with how the experiment is
working in Flutter: main and dev branch only.

Before this CL, dartdev did not check experiment flags. Unknown
experiments would fail in the VM. After this CL, dartdev checks the
experiment flags and errors out early.

Change-Id: I875ea3272f4b67342da19ea2e4be329a4b380573
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/+/406660
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-02-04 03:36:43 -08:00
Daco Harkes b693194f41 [native assets] Don't fail early on invalid package config
Bug: https://github.com/dart-lang/sdk/issues/59992
Change-Id: If7aff2aeecbab347f5bcb997e6fd6043e8818e1b
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/+/406280
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-01-28 08:19:39 -08:00
Sam Rawlins 8ed5503eeb dartdev: Add comment about analysisFinished.
Change-Id: Iefd2daa478e0b8426e9d8786c169fd8cbdd5e5c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-24 07:47:28 -08:00
asiva 98aa84290b [dartdev] Switch 'compile js-dev' to use VmInteropHandler.run
TEST=ci

Change-Id: I9a19b6d746ab8d87a2d7993b89fdf62ed06edaab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405540
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-01-23 08:56:59 -08:00
Daco Harkes e78459bf90 [deps] Roll dart-lang/native
Change-Id: I77c3928e03a688443a2bb9c67c350b72a7ddd192
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/+/405360
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-01-22 10:38:58 -08:00
asiva 1a486499bf [dartdev] Fix ia32 invocation of dart2js from 'compile js' command.
TEST=ci

Change-Id: I5b7a180cdadeb9a78038af8dc0631fad7b757a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405260
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-01-21 14:18:08 -08:00
Mohamed Abdelaal 9b7bb9df90 Fix "the the" typo
Closes https://github.com/dart-lang/sdk/pull/59926

GitOrigin-RevId: cb37bca473b0c177b876a0f4e75858cd1862e699
Change-Id: I6827241b22e99db455945afcdfbaee0450999ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404923
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-01-21 14:08:20 -08:00