diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 864753df1..98c48d6b0 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.7 +# Created with package:mono_repo v6.4.3 name: Dart CI on: push: @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -30,14 +30,14 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.7 + run: dart pub global activate mono_repo 6.4.3 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:format-analyze_0-test_0" @@ -55,12 +55,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdevSoundSmoke-frontend_server_client-frontend_server_common-test_common;commands:format-analyze_0" @@ -93,12 +93,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: example_pub_upgrade name: example; dart pub upgrade run: dart pub upgrade @@ -169,7 +169,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:format-analyze_0-test_7" @@ -179,12 +179,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -207,7 +207,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:command-test_1" @@ -217,12 +217,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -246,7 +246,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_2" @@ -256,12 +256,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -281,7 +281,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_3" @@ -291,12 +291,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -316,7 +316,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dwds;commands:test_4" @@ -326,12 +326,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -351,7 +351,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:frontend_server_client;commands:test_5" @@ -361,12 +361,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -386,7 +386,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:test_common;commands:command-test_6" @@ -396,12 +396,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -425,7 +425,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:webdev;commands:command-test_5" @@ -435,12 +435,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -464,7 +464,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:command-test_1" @@ -474,12 +474,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -503,7 +503,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_2" @@ -513,12 +513,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -538,7 +538,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_3" @@ -548,12 +548,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -573,7 +573,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:dwds;commands:test_4" @@ -583,12 +583,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -608,7 +608,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:frontend_server_client;commands:test_5" @@ -618,12 +618,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -643,7 +643,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:test_common;commands:command-test_6" @@ -653,12 +653,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -682,7 +682,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:webdev;commands:command-test_5" @@ -692,12 +692,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -721,12 +721,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -746,12 +746,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -771,12 +771,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -796,12 +796,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -821,12 +821,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -846,12 +846,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -871,12 +871,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -896,12 +896,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -921,12 +921,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -946,12 +946,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -971,12 +971,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -996,12 +996,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade @@ -1021,12 +1021,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -1046,12 +1046,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: main - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: test_common_pub_upgrade name: test_common; dart pub upgrade run: dart pub upgrade @@ -1072,7 +1072,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:command-test_5" @@ -1082,12 +1082,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1140,7 +1140,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:command-test_5" @@ -1150,12 +1150,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -1208,7 +1208,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:dwds;commands:analyze_1" @@ -1218,12 +1218,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1272,7 +1272,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:beta;packages:webdev;commands:analyze_1" @@ -1282,12 +1282,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade @@ -1336,12 +1336,12 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: dwds_pub_upgrade name: dwds; dart pub upgrade run: dart pub upgrade @@ -1390,12 +1390,12 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: beta - id: checkout name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - id: webdev_pub_upgrade name: webdev; dart pub upgrade run: dart pub upgrade diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 33c389cc4..338e0a89e 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -3,6 +3,7 @@ - Require clients to specify the `basePath` on `AssetReader`. - [#2160](https://github.com/dart-lang/webdev/pull/2160) - Update SDK constraint to `>=3.1.0-254.0.dev <4.0.0`. - [#2169](https://github.com/dart-lang/webdev/pull/2169) - Require min `build_web_compilers` version `4.0.4` - [#2171](https://github.com/dart-lang/webdev/pull/2171) +- Switch to using new debugging API from DDC to support new type system. - [#2159](https://github.com/dart-lang/webdev/pull/2159) ## 19.0.2 diff --git a/dwds/debug_extension/pubspec.yaml b/dwds/debug_extension/pubspec.yaml index 8dd6ddeda..07cf7ad41 100644 --- a/dwds/debug_extension/pubspec.yaml +++ b/dwds/debug_extension/pubspec.yaml @@ -6,7 +6,7 @@ description: >- A chrome extension for Dart debugging. environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: async: ^2.3.0 diff --git a/dwds/debug_extension_mv3/pubspec.yaml b/dwds/debug_extension_mv3/pubspec.yaml index f0421f511..2cb77c4f1 100644 --- a/dwds/debug_extension_mv3/pubspec.yaml +++ b/dwds/debug_extension_mv3/pubspec.yaml @@ -6,7 +6,7 @@ description: >- A Chrome extension for Dart debugging. environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: built_value: ^8.3.0 diff --git a/dwds/lib/src/debugging/classes.dart b/dwds/lib/src/debugging/classes.dart index ac60ff9d4..8154b7ee5 100644 --- a/dwds/lib/src/debugging/classes.dart +++ b/dwds/lib/src/debugging/classes.dart @@ -77,88 +77,12 @@ class ClassHelper extends Domain { if (libraryUri == null || classId == null || className == null) return null; - final rawName = className.split('<').first; final expression = ''' - (function() { - ${globalLoadStrategy.loadLibrarySnippet(libraryUri)} - var result = {}; - var clazz = library["$rawName"]; - var descriptor = { - 'name': clazz.name, - 'dartName': sdkUtils.typeName(clazz) - }; - - // TODO(grouma) - we display all inherited methods since we don't provide - // the superClass information. This is technically not correct. - var proto = clazz.prototype; - var methodNames = []; - for (; proto != null; proto = Object.getPrototypeOf(proto)) { - var methods = Object.getOwnPropertyNames(proto); - for (var i = 0; i < methods.length; i++) { - if (methodNames.indexOf(methods[i]) == -1 - && methods[i] != 'constructor') { - methodNames.push(methods[i]); - } - } - if (proto.constructor.name == 'Object') break; - } - - descriptor['methods'] = {}; - for (var name of methodNames) { - descriptor['methods'][name] = { - // TODO(jakemac): how can we get actual const info? - "isConst": false, - "isStatic": false, - } - } - - var fields = sdkUtils.getFields(clazz); - var fieldNames = fields ? Object.keys(fields) : []; - descriptor['fields'] = {}; - for (var name of fieldNames) { - var field = fields[name]; - var libraryUri = Object.getOwnPropertySymbols(fields[name]["type"]) - .find(x => x.description == "libraryUri"); - descriptor['fields'][name] = { - // TODO(jakemac): how can we get actual const info? - "isConst": false, - "isFinal": field.isFinal, - "isStatic": false, - "classRefName": fields[name]["type"]["name"], - "classRefDartName": sdkUtils.typeName(fields[name]["type"]), - "classRefLibraryId" : field["type"][libraryUri], - } - } - - // TODO(elliette): The following static member information is minimal and - // should be replaced once DDC provides full symbol information (see - // https://github.com/dart-lang/sdk/issues/40273): - - descriptor['staticFields'] = {}; - var staticFieldNames = sdkUtils.getStaticFields(clazz) ?? []; - for (const name of staticFieldNames) { - descriptor['staticFields'][name] = { - "isStatic": true, - // DDC only provides names of static members, we set isConst/isFinal - // to false even though they could be true. - "isConst": false, - "isFinal": false, - } - } - - descriptor['staticMethods'] = {}; - var staticMethodNames = sdkUtils.getStaticMethods(clazz) ?? []; - for (var name of staticMethodNames) { - descriptor['methods'][name] = { - // DDC only provides names of static members, we set isConst - // to false even though it could be true. - "isConst": false, - "isStatic": true, - } - } - - return descriptor; - })() + (function() { + const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); + const dart = sdk.dart; + return dart.getClassMetadata('$libraryUri', '$className'); + })() '''; RemoteObject result; @@ -176,9 +100,6 @@ class ClassHelper extends Domain { final methodRefs = []; final methodDescriptors = classDescriptor['methods'] as Map; - final staticMethodDescriptors = - classDescriptor['staticMethods'] as Map; - methodDescriptors.addAll(staticMethodDescriptors); methodDescriptors.forEach((name, descriptor) { final methodId = 'methods|$classId|$name'; methodRefs.add( @@ -186,25 +107,27 @@ class ClassHelper extends Domain { id: methodId, name: name, owner: classRef, - isConst: descriptor['isConst'] as bool, - isStatic: descriptor['isStatic'] as bool, - // TODO(annagrin): get information about getters and setters from symbols. - // https://github.com/dart-lang/sdk/issues/46723 - implicit: false, + isConst: descriptor['isConst'] as bool? ?? false, + isStatic: descriptor['isStatic'] as bool? ?? false, + implicit: descriptor['isImplicit'] as bool? ?? false, + isAbstract: descriptor['isAbstract'] as bool? ?? false, + isGetter: descriptor['isGetter'] as bool? ?? false, + isSetter: descriptor['isSetter'] as bool? ?? false, ), ); }); final fieldRefs = []; + final fieldDescriptors = classDescriptor['fields'] as Map; fieldDescriptors.forEach((name, descriptor) { final classMetaData = ClassMetaData( - jsName: descriptor['classRefName'], runtimeKind: RuntimeObjectKind.type, classRef: classRefFor( - descriptor['classRefLibraryId'], - descriptor['classRefDartName'], + descriptor['classLibraryId'], + descriptor['className'], ), ); + fieldRefs.add( FieldRef( name: name, @@ -215,34 +138,19 @@ class ClassHelper extends Domain { kind: classMetaData.kind, classRef: classMetaData.classRef, ), - isConst: descriptor['isConst'] as bool, - isFinal: descriptor['isFinal'] as bool, - isStatic: descriptor['isStatic'] as bool, + isConst: descriptor['isConst'] as bool? ?? false, + isFinal: descriptor['isFinal'] as bool? ?? false, + isStatic: descriptor['isStatic'] as bool? ?? false, id: createId(), ), ); }); - final staticFieldDescriptors = - classDescriptor['staticFields'] as Map; - staticFieldDescriptors.forEach((name, descriptor) { - fieldRefs.add( - FieldRef( - name: name, - owner: classRef, - declaredType: InstanceRef( - identityHashCode: createId().hashCode, - id: createId(), - kind: InstanceKind.kType, - classRef: classRef, - ), - isConst: descriptor['isConst'] as bool, - isFinal: descriptor['isFinal'] as bool, - isStatic: descriptor['isStatic'] as bool, - id: createId(), - ), - ); - }); + final superClassLibraryId = classDescriptor['superClassLibraryId']; + final superClassName = classDescriptor['superClassName']; + final superClassRef = superClassName == null + ? null + : classRefFor(superClassLibraryId, superClassName); // TODO: Implement the rest of these // https://github.com/dart-lang/webdev/issues/176. @@ -257,6 +165,7 @@ class ClassHelper extends Domain { subclasses: [], id: classId, traceAllocations: false, + superClass: superClassRef, ); } } diff --git a/dwds/lib/src/debugging/inspector.dart b/dwds/lib/src/debugging/inspector.dart index 780f62d2f..2e2d56147 100644 --- a/dwds/lib/src/debugging/inspector.dart +++ b/dwds/lib/src/debugging/inspector.dart @@ -349,11 +349,14 @@ class AppInspector implements AppInspectorInterface { throwInvalidParam('invoke', 'library uri is null'); } final findLibrary = ''' -(function() { - ${globalLoadStrategy.loadLibrarySnippet(libraryUri)}; - return library; -})(); -'''; + (function() { + const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); + const dart = sdk.dart; + const library = dart.getLibrary('$libraryUri'); + if (!library) throw 'cannot find library for $libraryUri'; + return library; + })(); + '''; final remoteLibrary = await jsEvaluate(findLibrary); return jsCallFunctionOn(remoteLibrary, jsFunction, arguments); } @@ -601,15 +604,6 @@ class AppInspector implements AppInspectorInterface { .toList(); } - /// Compute the last possible element index in the range of [offset]..end - /// that includes [count] elements, if available. - static int? _calculateRangeEnd({ - int? count, - required int offset, - required int length, - }) => - count == null ? null : math.min(offset + count, length); - /// Calculate the number of available elements in the range. static int _calculateRangeCount({ int? count, @@ -634,30 +628,21 @@ class AppInspector implements AppInspectorInterface { // TODO(#809): Sometimes we already know the type of the object, and // we could take advantage of that to short-circuit. final receiver = remoteObjectFor(id); - final end = - _calculateRangeEnd(count: count, offset: offset, length: length); final rangeCount = _calculateRangeCount(count: count, offset: offset, length: length); final args = - [offset, rangeCount, end].map(dartIdFor).map(remoteObjectFor).toList(); + [offset, rangeCount].map(dartIdFor).map(remoteObjectFor).toList(); // If this is a List, just call sublist. If it's a Map, get the entries, but // avoid doing a toList on a large map using skip/take to get the section we // want. To make those alternatives easier in JS, pass both count and end. final expression = ''' - function (offset, count, end) { - const sdk = ${globalLoadStrategy.loadModuleSnippet}("dart_sdk"); - if (sdk.core.Map.is(this)) { - const entries = sdk.dart.dload(this, "entries"); - const skipped = sdk.dart.dsend(entries, "skip", [offset]) - const taken = sdk.dart.dsend(skipped, "take", [count]); - return sdk.dart.dsend(taken, "toList", []); - } else if (sdk.core.List.is(this)) { - return sdk.dart.dsendRepl(this, "sublist", [offset, end]); - } else { - return this; - } - } - '''; + function (offset, count) { + const sdk = ${globalLoadStrategy.loadModuleSnippet}("dart_sdk"); + const dart = sdk.dart; + return dart.getSubRange(this, offset, count); + } + '''; + return await jsCallFunctionOn(receiver, expression, args); } diff --git a/dwds/lib/src/debugging/instance.dart b/dwds/lib/src/debugging/instance.dart index caf64912c..e3c310cb6 100644 --- a/dwds/lib/src/debugging/instance.dart +++ b/dwds/lib/src/debugging/instance.dart @@ -204,6 +204,8 @@ class InstanceHelper extends Domain { /// Create a bound field for [property] in an instance of [classRef]. Future _fieldFor(Property property, ClassRef classRef) async { final instance = await _instanceRefForRemote(property.value); + // TODO(annagrin): convert JS name to dart and fill missing information. + //https://github.com/dart-lang/sdk/issues/46723 return BoundField( name: property.name, decl: FieldRef( @@ -216,7 +218,6 @@ class InstanceHelper extends Domain { id: createId(), ), owner: classRef, - // TODO(grouma) - Fill these in. isConst: false, isFinal: false, isStatic: false, @@ -285,23 +286,8 @@ class InstanceHelper extends Domain { // We do this in in awkward way because we want the keys and values, but we // can't return things by value or some Dart objects will come back as // values that we need to be RemoteObject, e.g. a List of int. - final expression = ''' - function() { - var sdkUtils = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - var entries = sdkUtils.dloadRepl(this, "entries"); - entries = sdkUtils.dsendRepl(entries, "toList", []); - function asKey(entry) { - return sdkUtils.dloadRepl(entry, "key"); - } - function asValue(entry) { - return sdkUtils.dloadRepl(entry, "value"); - } - return { - keys: entries.map(asKey), - values: entries.map(asValue) - }; - } - '''; + final expression = _jsRuntimeFunctionCall('getMapElements(this)'); + final keysAndValues = await inspector.jsCallFunctionOn(map, expression, []); final keys = await inspector.loadField(keysAndValues, 'keys'); final values = await inspector.loadField(keysAndValues, 'values'); @@ -517,23 +503,8 @@ class InstanceHelper extends Domain { // We do this in in awkward way because we want the keys and values, but we // can't return things by value or some Dart objects will come back as // values that we need to be RemoteObject, e.g. a List of int. - final expression = ''' - function() { - var sdkUtils = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - var shape = sdkUtils.dloadRepl(this, "shape"); - var positionalCount = sdkUtils.dloadRepl(shape, "positionals"); - var named = sdkUtils.dloadRepl(shape, "named"); - named = named == null? null: sdkUtils.dsendRepl(named, "toList", []); - var values = sdkUtils.dloadRepl(this, "values"); - values = sdkUtils.dsendRepl(values, "toList", []); - - return { - positionalCount: positionalCount, - named: named, - values: values - }; - } - '''; + final expression = _jsRuntimeFunctionCall('getRecordFields(this)'); + final result = await inspector.jsCallFunctionOn(record, expression, []); final fieldNameElements = await _recordShapeFields(result, offset: offset, count: count); @@ -660,25 +631,8 @@ class InstanceHelper extends Domain { // We do this in in awkward way because we want the names and types, but we // can't return things by value or some Dart objects will come back as // values that we need to be RemoteObject, e.g. a List of int. - final expression = ''' - function() { - var sdkUtils = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - var type = sdkUtils.dloadRepl(this, "_type"); - var shape = sdkUtils.dloadRepl(type, "shape"); - var positionalCount = sdkUtils.dloadRepl(shape, "positionals"); - var named = sdkUtils.dloadRepl(shape, "named"); - named = named == null? null: sdkUtils.dsendRepl(named, "toList", []); - var types = sdkUtils.dloadRepl(type, "types"); - types = types.map(t => sdkUtils.wrapType(t)); - types = sdkUtils.dsendRepl(types, "toList", []); - - return { - positionalCount: positionalCount, - named: named, - types: types - }; - } - '''; + final expression = _jsRuntimeFunctionCall('getRecordTypeFields(this)'); + final result = await inspector.jsCallFunctionOn(record, expression, []); final fieldNameElements = await _recordShapeFields(result, offset: offset, count: count); @@ -701,16 +655,7 @@ class InstanceHelper extends Domain { final objectId = remoteObject.objectId; if (objectId == null) return null; - final expression = ''' - function() { - const sdkUtils = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - const jsSet = sdkUtils.dloadRepl(this, "_map"); - const entries = [...jsSet.values()]; - return { - entries: entries - }; - } - '''; + final expression = _jsRuntimeFunctionCall('getSetElements(this)'); final result = await inspector.jsCallFunctionOn(remoteObject, expression, []); @@ -782,18 +727,7 @@ class InstanceHelper extends Domain { ) async { // Present the type as an instance of `core.Type` class and // hide the internal implementation. - final expression = ''' - function() { - var sdkUtils = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - var hashCode = sdkUtils.dloadRepl(this, "hashCode"); - var runtimeType = sdkUtils.dloadRepl(this, "runtimeType"); - - return { - hashCode: hashCode, - runtimeType: runtimeType - }; - } - '''; + final expression = _jsRuntimeFunctionCall('getTypeFields(this)'); final result = await inspector.jsCallFunctionOn(type, expression, []); final hashCodeObject = await inspector.loadField(result, 'hashCode'); @@ -842,34 +776,16 @@ class InstanceHelper extends Domain { // // For maps and lists it's more complicated. Treat the actual SDK versions // of these as special. - final fieldNameExpression = '''function() { - const sdk = ${globalLoadStrategy.loadModuleSnippet}("dart_sdk"); - const sdk_utils = sdk.dart; - const fields = sdk_utils.getFields(sdk_utils.getType(this)) || []; - if (!fields && (dart_sdk._interceptors.JSArray.is(this) || - dart_sdk._js_helper.InternalMap.is(this))) { - // Trim off the 'length' property. - const fields = allJsProperties.slice(0, allJsProperties.length -1); - return fields.join(','); - } - const privateFields = sdk_utils.getOwnPropertySymbols(fields); - const nonSymbolNames = privateFields - .map(sym => sym.description - .split('#').slice(-1)[0]); - const publicFieldNames = sdk_utils.getOwnPropertyNames(fields); - const symbolNames = Object.getOwnPropertySymbols(this) - .map(sym => sym.description - .split('#').slice(-1)[0] - .split('.').slice(-1)[0]); - return nonSymbolNames - .concat(publicFieldNames) - .concat(symbolNames).join(','); - } - '''; - final allNames = (await inspector - .jsCallFunctionOn(remoteObject, fieldNameExpression, [])) - .value as String; - final names = allNames.split(','); + final fieldNameExpression = + _jsRuntimeFunctionCall('getObjectFieldNames(this)'); + + final result = await inspector.jsCallFunctionOn( + remoteObject, + fieldNameExpression, + [], + returnByValue: true, + ); + final names = List.from(result.value as List); // TODO(#761): Better support for large collections. return allJsProperties .where((property) => names.contains(property.name)) @@ -948,22 +864,22 @@ class InstanceHelper extends Domain { inspector.remoteDebugger, remoteObject, ); + // TODO(annagrin) - fill missing information. + // https://github.com/dart-lang/sdk/issues/46723 return InstanceRef( kind: InstanceKind.kClosure, id: objectId, identityHashCode: objectId.hashCode, classRef: classRefForClosure, - // TODO(grouma) - fill this in properly. closureFunction: FuncRef( name: functionMetaData.name, id: createId(), - // TODO(alanknight): The right ClassRef owner: classRefForUnknown, isConst: false, isStatic: false, - // TODO(annagrin): get information about getters and setters from symbols. - // https://github.com/dart-lang/sdk/issues/46723 implicit: false, + isGetter: false, + isSetter: false, ), closureContext: ContextRef(length: 0, id: createId()), ); @@ -973,3 +889,11 @@ class InstanceHelper extends Domain { } } } + +String _jsRuntimeFunctionCall(String expression) => ''' + function() { + const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); + const dart = sdk.dart; + return dart.$expression; + } +'''; diff --git a/dwds/lib/src/debugging/libraries.dart b/dwds/lib/src/debugging/libraries.dart index b50eef16d..5f3570a95 100644 --- a/dwds/lib/src/debugging/libraries.dart +++ b/dwds/lib/src/debugging/libraries.dart @@ -81,27 +81,15 @@ class LibraryHelper extends Domain { final libraryId = libraryRef.id; final libraryUri = libraryRef.uri; if (libraryId == null || libraryUri == null) return null; - // Fetch information about all the classes in this library. final expression = ''' - (function() { - ${globalLoadStrategy.loadLibrarySnippet(libraryUri)} - var result = {}; - var classes = Object.values(Object.getOwnPropertyDescriptors(library)) - .filter((p) => 'value' in p) - .map((p) => p.value) - .filter((l) => l && sdkUtils.isType(l)); - var classList = classes.map(function(clazz) { - var descriptor = { - 'name': clazz.name, - 'dartName': sdkUtils.typeName(clazz) - }; - return descriptor; - }); - result['classes'] = classList; - return result; - })() + (function() { + const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); + const dart = sdk.dart; + return dart.getLibraryMetadata('$libraryUri'); + })() '''; + RemoteObject? result; try { result = await inspector.jsEvaluate(expression, returnByValue: true); @@ -115,16 +103,14 @@ class LibraryHelper extends Domain { } final classRefs = []; if (result != null) { - final jsonValues = result.value as Map; - final classDescriptors = - List>.from(jsonValues['classes'] ?? []); - for (final classDescriptor in classDescriptors) { + final classNames = result.value as List; + + for (final className in classNames) { final classMetaData = ClassMetaData( - jsName: classDescriptor['name'], runtimeKind: RuntimeObjectKind.type, classRef: classRefFor( libraryRef.id, - classDescriptor['dartName'], + className, ), ); classRefs.add(classMetaData.classRef); diff --git a/dwds/lib/src/debugging/metadata/class.dart b/dwds/lib/src/debugging/metadata/class.dart index 7cde9989d..ed92e0648 100644 --- a/dwds/lib/src/debugging/metadata/class.dart +++ b/dwds/lib/src/debugging/metadata/class.dart @@ -39,7 +39,8 @@ ClassRef classRefFor(Object? libraryId, Object? dartName) { } String classIdFor(String libraryId, String? name) => 'classes|$libraryId|$name'; -String classMetaDataIdFor(String library, String? jsName) => '$library:$jsName'; +String classMetaDataIdFor(ClassRef classRef) => + '${classRef.library!.id!}:${classRef.name}'; /// DDC runtime object kind. /// @@ -87,12 +88,6 @@ class ClassMetaData { /// Takes the form of 'libraryId:name'. final String id; - /// The name of the JS constructor for the object. - /// - /// This may be a constructor for a Dart, but it's still a JS name. For - /// example, 'Number', 'JSArray', 'Object'. - final String? jsName; - /// Type name for Type instances. /// /// For example, 'int', 'String', 'MyClass', 'List'. @@ -113,17 +108,15 @@ class ClassMetaData { String get kind => runtimeKind.toInstanceKind(); factory ClassMetaData({ - Object? jsName, Object? typeName, Object? length, required RuntimeObjectKind runtimeKind, required ClassRef classRef, }) { - final id = classMetaDataIdFor(classRef.library!.id!, jsName as String?); + final id = classMetaDataIdFor(classRef); return ClassMetaData._( id, classRef, - jsName, typeName as String?, int.tryParse('$length'), runtimeKind, @@ -133,7 +126,6 @@ class ClassMetaData { ClassMetaData._( this.id, this.classRef, - this.jsName, this.typeName, this.length, this.runtimeKind, @@ -160,75 +152,13 @@ class ClassMetaDataHelper { /// Returns null if the [remoteObject] is not a Dart class. Future metaDataFor(RemoteObject remoteObject) async { try { - /// TODO(annagrin): this breaks on changes to internal - /// type representation in DDC. Replace by runtime API. - /// https://github.com/dart-lang/sdk/issues/51583 final evalExpression = ''' - function(arg) { - const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); - const dart = sdk.dart; - const core = sdk.core; - const interceptors = sdk._interceptors; - const reifiedType = dart.getReifiedType(arg); - const name = reifiedType.name; - - const result = {}; - result['name'] = name; - result['libraryId'] = dart.getLibraryUri(reifiedType); - result['dartName'] = dart.typeName(reifiedType); - result['length'] = arg['length']; - result['runtimeKind'] = '${RuntimeObjectKind.object.name}'; - - if (name == '_HashSet') { - result['runtimeKind'] = '${RuntimeObjectKind.set.name}'; - } - else if (name == 'JSArray') { - result['runtimeKind'] = '${RuntimeObjectKind.list.name}'; - } - else if (name == 'LinkedMap' || name == 'IdentityMap') { - result['runtimeKind'] = '${RuntimeObjectKind.map.name}'; - } - else if (reifiedType instanceof dart.AbstractFunctionType) { - result['runtimeKind'] = '${RuntimeObjectKind.function.name}'; - result['name'] = 'Function'; - } - else if (reifiedType instanceof dart.RecordType) { - result['runtimeKind'] = '${RuntimeObjectKind.record.name}'; - result['libraryId'] = 'dart:core'; - result['name'] = 'Record'; - result['dartName'] = 'Record'; - var shape = reifiedType.shape; - var positionalCount = shape.positionals; - var namedCount = shape.named == null ? 0 : shape.named.length; - result['length'] = positionalCount + namedCount; - } - else if (arg instanceof dart._Type) { - var object = dart.dloadRepl(arg, "_type"); - if (object instanceof dart.RecordType) { - result['libraryId'] = 'dart:_runtime'; - result['name'] = 'RecordType'; - result['dartName'] = 'RecordType'; - result['runtimeKind'] = '${RuntimeObjectKind.recordType.name}'; - result['length'] = object.types.length; - } - else if (dart.is(object, core.Type)) { - result['libraryId'] = 'dart:core'; - result['name'] = 'Type'; - result['dartName'] = 'Type'; - result['runtimeKind'] = '${RuntimeObjectKind.type.name}'; - result['typeName'] = dart.dsendRepl(arg, "toString", []); - result['length'] = object['length']; - } + function(arg) { + const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); + const dart = sdk.dart; + return dart.getObjectMetadata(arg); } - else if (dart.is(arg, interceptors.NativeError)) { - result['runtimeKind'] = '${RuntimeObjectKind.nativeError.name}'; - } - else if (dart.is(arg, interceptors.JavaScriptObject)) { - result['runtimeKind'] = '${RuntimeObjectKind.nativeObject.name}'; - } - return result; - } - '''; + '''; final result = await _inspector.jsCallFunctionOn( remoteObject, @@ -237,18 +167,21 @@ class ClassMetaDataHelper { returnByValue: true, ); final metadata = result.value as Map; - final jsName = metadata['name']; + final className = metadata['className']; + + if (className == null) { + return null; + } + final typeName = metadata['typeName']; - final dartName = metadata['dartName']; final library = metadata['libraryId']; final runtimeKind = RuntimeObjectKind.parse(metadata['runtimeKind']); final length = metadata['length']; - final classRef = classRefFor(library, dartName); + final classRef = classRefFor(library, className); _addRuntimeObjectKind(classRef, runtimeKind); return ClassMetaData( - jsName: jsName, typeName: typeName, length: length, runtimeKind: runtimeKind, diff --git a/dwds/lib/src/debugging/metadata/function.dart b/dwds/lib/src/debugging/metadata/function.dart index 1650548b6..b0fb7b6b7 100644 --- a/dwds/lib/src/debugging/metadata/function.dart +++ b/dwds/lib/src/debugging/metadata/function.dart @@ -18,24 +18,17 @@ class FunctionMetaData { RemoteObject remoteObject, ) async { final evalExpression = ''' - function(remoteObject) { - var sdkUtils = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - var name = remoteObject.name; - if(remoteObject._boundObject) { - name = sdkUtils.getType(remoteObject._boundObject).name + - '.' + remoteObject._boundMethod.name; - } - return name; + function() { + const sdk = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk'); + const dart = sdk.dart; + return dart.getFunctionMetadata(this); } '''; - final arguments = [ - {'objectId': remoteObject.objectId}, - ]; + final response = await remoteDebugger.sendCommand( 'Runtime.callFunctionOn', params: { 'functionDeclaration': evalExpression, - 'arguments': arguments, 'objectId': remoteObject.objectId, 'returnByValue': true, }, diff --git a/dwds/lib/src/loaders/legacy.dart b/dwds/lib/src/loaders/legacy.dart index ec14560ab..f2cb18970 100644 --- a/dwds/lib/src/loaders/legacy.dart +++ b/dwds/lib/src/loaders/legacy.dart @@ -91,13 +91,6 @@ class LegacyStrategy extends LoadStrategy { @override String get loadLibrariesModule => 'dart_library.ddk.js'; - @override - String get loadLibrariesSnippet => - 'for(let module of dart_library.libraries()) {\n' - 'dart_library.import(module)[module];\n' - '}\n' - 'let libs = $loadModuleSnippet("dart_sdk").dart.getLibraries();\n'; - @override String get loadModuleSnippet => 'dart_library.import'; diff --git a/dwds/lib/src/loaders/require.dart b/dwds/lib/src/loaders/require.dart index 5d9d8f78b..5298bd0e4 100644 --- a/dwds/lib/src/loaders/require.dart +++ b/dwds/lib/src/loaders/require.dart @@ -161,10 +161,6 @@ class RequireStrategy extends LoadStrategy { @override String get loadLibrariesModule => 'require.js'; - @override - String get loadLibrariesSnippet => - 'let libs = $loadModuleSnippet("dart_sdk").dart.getLibraries();\n'; - @override String get loadModuleSnippet => 'require'; diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index 453e2dd2b..73801a7a0 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -35,10 +35,6 @@ abstract class LoadStrategy { /// Used for preventing stepping into the library loading code. String get loadLibrariesModule; - /// Returns a snippet of JS code that loads all Dart libraries into a `libs` - /// variable. - String get loadLibrariesSnippet; - /// Returns a snippet of JS code that can be used to load a JS module. /// /// The snippet should be a reference to a function that takes a single @@ -52,23 +48,6 @@ abstract class LoadStrategy { /// should be a package URI, e.g. `package:myapp/main.dart`. Uri? get appEntrypoint; - /// Returns a snippet of JS code that initializes a `library` variable that - /// has the actual library object in DDC for [libraryUri]. - /// - /// In DDC we have module libraries indexed by names of the form - /// 'packages/package/mainFile' with no .dart suffix on the file, or - /// 'directory/packageName/mainFile', also with no .dart suffix, and relative - /// to the serving root, normally /web within the package. These modules have - /// a map from the URI with a Dart-specific scheme - /// (package: or org-dartlang-app:) to the library objects. The [libraryUri] - /// parameter should be one of these Dart-specific scheme URIs, and we set - /// `library` the corresponding library. - String loadLibrarySnippet(String libraryUri) => ''' - var sdkUtils = $loadModuleSnippet('dart_sdk').dart; - var library = sdkUtils.getLibrary('$libraryUri'); - if (!library) throw 'cannot find library for $libraryUri'; - '''; - /// Returns the bootstrap required for this [LoadStrategy]. /// /// The bootstrap is appended to the end of the entry point module. diff --git a/dwds/lib/src/utilities/objects.dart b/dwds/lib/src/utilities/objects.dart index 4b3444e91..05aedd52c 100644 --- a/dwds/lib/src/utilities/objects.dart +++ b/dwds/lib/src/utilities/objects.dart @@ -63,5 +63,5 @@ class Property { } @override - String toString() => '$name $value'; + String toString() => '$name: $value'; } diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 009136e6a..11676531b 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -6,7 +6,7 @@ description: >- service protocol. repository: https://github.com/dart-lang/webdev/tree/master/dwds environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: async: ^2.9.0 @@ -33,7 +33,7 @@ dependencies: stack_trace: ^1.10.0 sse: ^4.1.2 uuid: ^3.0.6 - vm_service: ^11.7.1 + vm_service: ^11.8.0 web_socket_channel: ^2.2.0 webkit_inspection_protocol: ^1.0.1 diff --git a/dwds/test/chrome_proxy_service_test.dart b/dwds/test/chrome_proxy_service_test.dart index 988a5977e..8fa93fa1c 100644 --- a/dwds/test/chrome_proxy_service_test.dart +++ b/dwds/test/chrome_proxy_service_test.dart @@ -598,15 +598,8 @@ void main() { testClass.functions, unorderedEquals([ predicate((FuncRef f) => f.name == 'staticHello' && f.isStatic!), - predicate((FuncRef f) => f.name == 'message' && !f.isStatic!), - predicate((FuncRef f) => f.name == 'notFinal' && !f.isStatic!), predicate((FuncRef f) => f.name == 'hello' && !f.isStatic!), - predicate((FuncRef f) => f.name == '_equals' && !f.isStatic!), predicate((FuncRef f) => f.name == 'hashCode' && !f.isStatic!), - predicate((FuncRef f) => f.name == 'toString' && !f.isStatic!), - predicate( - (FuncRef f) => f.name == 'noSuchMethod' && !f.isStatic!, - ), predicate((FuncRef f) => f.name == 'runtimeType' && !f.isStatic!), ]), ); @@ -1085,21 +1078,10 @@ void main() { expect( testClass.functions, unorderedEquals([ - predicate( - (FuncRef f) => f.name == 'staticHello' && f.isStatic!, - ), - predicate((FuncRef f) => f.name == 'message' && !f.isStatic!), - predicate((FuncRef f) => f.name == 'notFinal' && !f.isStatic!), + predicate((FuncRef f) => f.name == 'staticHello' && f.isStatic!), predicate((FuncRef f) => f.name == 'hello' && !f.isStatic!), - predicate((FuncRef f) => f.name == '_equals' && !f.isStatic!), predicate((FuncRef f) => f.name == 'hashCode' && !f.isStatic!), - predicate((FuncRef f) => f.name == 'toString' && !f.isStatic!), - predicate( - (FuncRef f) => f.name == 'noSuchMethod' && !f.isStatic!, - ), - predicate( - (FuncRef f) => f.name == 'runtimeType' && !f.isStatic!, - ), + predicate((FuncRef f) => f.name == 'runtimeType' && !f.isStatic!), ]), ); expect( @@ -1144,21 +1126,10 @@ void main() { expect( testClass.functions, unorderedEquals([ - predicate( - (FuncRef f) => f.name == 'staticHello' && f.isStatic!, - ), - predicate((FuncRef f) => f.name == 'message' && !f.isStatic!), - predicate((FuncRef f) => f.name == 'notFinal' && !f.isStatic!), + predicate((FuncRef f) => f.name == 'staticHello' && f.isStatic!), predicate((FuncRef f) => f.name == 'hello' && !f.isStatic!), - predicate((FuncRef f) => f.name == '_equals' && !f.isStatic!), predicate((FuncRef f) => f.name == 'hashCode' && !f.isStatic!), - predicate((FuncRef f) => f.name == 'toString' && !f.isStatic!), - predicate( - (FuncRef f) => f.name == 'noSuchMethod' && !f.isStatic!, - ), - predicate( - (FuncRef f) => f.name == 'runtimeType' && !f.isStatic!, - ), + predicate((FuncRef f) => f.name == 'runtimeType' && !f.isStatic!), ]), ); expect( diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 93c6c550d..f2f27a6dc 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -156,8 +156,10 @@ class TestContext { // Make sure configuration was created correctly. final configuration = await sdkConfigurationProvider.configuration; configuration.validate(); + await project.cleanUp(); DartUri.currentDirectory = project.absolutePackageDirectory; + configureLogWriter(); _client = IOClient( diff --git a/dwds/test/fixtures/fakes.dart b/dwds/test/fixtures/fakes.dart index 5274a06af..7982416d6 100644 --- a/dwds/test/fixtures/fakes.dart +++ b/dwds/test/fixtures/fakes.dart @@ -330,12 +330,6 @@ class FakeStrategy implements LoadStrategy { @override String get loadLibrariesModule => ''; - @override - String get loadLibrariesSnippet => ''; - - @override - String loadLibrarySnippet(String libraryUri) => ''; - @override String get loadModuleSnippet => ''; diff --git a/dwds/test/instances/common/instance_common.dart b/dwds/test/instances/common/instance_common.dart index fc8013dd0..ebd2395fc 100644 --- a/dwds/test/instances/common/instance_common.dart +++ b/dwds/test/instances/common/instance_common.dart @@ -12,21 +12,92 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; import '../../fixtures/context.dart'; import '../../fixtures/project.dart'; +import 'test_inspector.dart'; + +void runTypeSystemVerificationTests({ + required TestSdkConfigurationProvider provider, + required CompilationMode compilationMode, + required bool canaryFeatures, + required bool debug, +}) { + final project = TestProject.testScopesWithSoundNullSafety; + + group('$compilationMode |', () { + final context = TestContext(project, provider); + late AppInspector inspector; + + setUpAll(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + canaryFeatures: canaryFeatures, + compilationMode: compilationMode, + ); + final chromeProxyService = context.service; + inspector = chromeProxyService.inspector; + }); + + tearDownAll(() async { + await context.tearDown(); + }); + + final url = 'org-dartlang-app:///example/scopes/main.dart'; + + String libraryName(CompilationMode compilationMode) => + compilationMode == CompilationMode.frontendServer + ? "example/scopes/main.dart" + : "example/scopes/main"; + + String libraryVariableTypeExpression( + String variable, + CompilationMode compilationMode, + ) => + ''' + (function() { + var dart = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; + var libraryName = '${libraryName(compilationMode)}'; + var library = dart.getModuleLibraries(libraryName)['$url']; + var x = library['$variable']; + return dart.getReifiedType(x); + })(); + '''; + + group('compiler', () { + setUp(() => setCurrentLogWriter(debug: debug)); + + test('uses correct type system', () async { + final remoteObject = await inspector.jsEvaluate( + libraryVariableTypeExpression( + 'libraryPublicFinal', + compilationMode, + ), + ); + expect( + remoteObject.json['className'], + canaryFeatures ? 'dart_rti.Rti.new' : 'Function', + ); + }); + }); + }); +} void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, + required bool canaryFeatures, required bool debug, }) { - final context = - TestContext(TestProject.testScopesWithSoundNullSafety, provider); + final project = TestProject.testScopesWithSoundNullSafety; + final context = TestContext(project, provider); late AppInspector inspector; group('$compilationMode |', () { setUpAll(() async { setCurrentLogWriter(debug: debug); - await context.setUp(compilationMode: compilationMode); + await context.setUp( + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + ); final chromeProxyService = context.service; inspector = chromeProxyService.inspector; }); @@ -50,8 +121,10 @@ void runTests({ 'getModuleLibraries("${libraryName(compilationMode)}")' '["$url"]["$variable"];'; - String interceptorsNewExpression(String type) => - "require('dart_sdk')._interceptors.$type['_#new#tearOff']()"; + String newInterceptorsExpression(String type) => + 'new (require("dart_sdk")._interceptors.$type).new()'; + + final String newDartError = 'new (require("dart_sdk").dart).DartError'; /// A reference to the the variable `libraryPublicFinal`, an instance of /// `MyTestClass`. @@ -94,7 +167,7 @@ void runTests({ expect(inspector.isDisplayableObject(ref), isTrue); }); - test('for a class', () async { + test('for an object', () async { final remoteObject = await libraryPublicFinal(compilationMode); final count = await inspector.loadField(remoteObject, 'myselfField'); final ref = await inspector.instanceRefFor(count); @@ -108,7 +181,7 @@ void runTests({ expect(inspector.isDisplayableObject(ref), isTrue); }); - test('for closure', () async { + test('for a closure', () async { final remoteObject = await libraryPublicFinal(compilationMode); final properties = await inspector.getProperties(remoteObject.objectId!); @@ -129,7 +202,7 @@ void runTests({ final ref = await inspector.instanceRefFor(remoteObject); expect(ref!.length, greaterThan(0)); expect(ref.kind, InstanceKind.kList); - expect(ref.classRef!.name, 'List'); + expect(ref.classRef!.name, matchListClassName('String')); expect(inspector.isDisplayableObject(ref), isTrue); }); @@ -154,9 +227,19 @@ void runTests({ expect(inspector.isDisplayableObject(ref), isTrue); }); + test('for a Dart error', () async { + final remoteObject = await inspector.jsEvaluate(newDartError); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.kind, InstanceKind.kPlainInstance); + expect(ref.classRef!.name, 'NativeError'); + expect(inspector.isDisplayableObject(ref), isFalse); + expect(inspector.isNativeJsError(ref), isTrue); + expect(inspector.isNativeJsObject(ref), isFalse); + }); + test('for a native JavaScript error', () async { final remoteObject = await inspector - .jsEvaluate(interceptorsNewExpression('NativeError')); + .jsEvaluate(newInterceptorsExpression('NativeError')); final ref = await inspector.instanceRefFor(remoteObject); expect(ref!.kind, InstanceKind.kPlainInstance); expect(ref.classRef!.name, 'NativeError'); @@ -167,7 +250,7 @@ void runTests({ test('for a native JavaScript type error', () async { final remoteObject = await inspector - .jsEvaluate(interceptorsNewExpression('JSNoSuchMethodError')); + .jsEvaluate(newInterceptorsExpression('JSNoSuchMethodError')); final ref = await inspector.instanceRefFor(remoteObject); expect(ref!.kind, InstanceKind.kPlainInstance); expect(ref.classRef!.name, 'JSNoSuchMethodError'); @@ -178,7 +261,7 @@ void runTests({ test('for a native JavaScript object', () async { final remoteObject = await inspector - .jsEvaluate(interceptorsNewExpression('LegacyJavaScriptObject')); + .jsEvaluate(newInterceptorsExpression('LegacyJavaScriptObject')); final ref = await inspector.instanceRefFor(remoteObject); expect(ref!.kind, InstanceKind.kPlainInstance); expect(ref.classRef!.name, 'LegacyJavaScriptObject'); @@ -190,7 +273,7 @@ void runTests({ group('instance', () { setUp(() => setCurrentLogWriter(debug: debug)); - test('for class object', () async { + test('for an object', () async { final remoteObject = await libraryPublicFinal(compilationMode); final instance = await inspector.instanceFor(remoteObject); expect(instance!.kind, InstanceKind.kPlainInstance); @@ -232,7 +315,7 @@ void runTests({ expect(inspector.isDisplayableObject(instance), isTrue); }); - test('for a nested class', () async { + test('for a nested object', () async { final libraryRemoteObject = await libraryPublicFinal(compilationMode); final fieldRemoteObject = await inspector.loadField(libraryRemoteObject, 'myselfField'); @@ -250,7 +333,7 @@ void runTests({ expect(instance!.kind, InstanceKind.kList); final classRef = instance.classRef!; expect(classRef, isNotNull); - expect(classRef.name, 'List'); + expect(classRef.name, matchListClassName('String')); final first = instance.elements![0]; expect(first.valueAsString, 'library'); expect(inspector.isDisplayableObject(instance), isTrue); @@ -285,23 +368,19 @@ void runTests({ expect(inspector.isDisplayableObject(instance), isTrue); }); - test('for a class that implements List', () async { - // The VM only uses kind List for SDK lists, and we follow that. - final remote = await inspector - .jsEvaluate(libraryVariableExpression('notAList', compilationMode)); - final instance = await inspector.instanceFor(remote); + test('for a Dart error', () async { + final remoteObject = await inspector.jsEvaluate(newDartError); + final instance = await inspector.instanceFor(remoteObject); expect(instance!.kind, InstanceKind.kPlainInstance); - final classRef = instance.classRef!; - expect(classRef.name, 'NotReallyAList'); - expect(instance.elements, isNull); - final field = instance.fields!.first; - expect(field.decl!.name, '_internal'); - expect(inspector.isDisplayableObject(instance), isTrue); + expect(instance.classRef!.name, 'NativeError'); + expect(inspector.isDisplayableObject(instance), isFalse); + expect(inspector.isNativeJsError(instance), isTrue); + expect(inspector.isNativeJsObject(instance), isFalse); }); test('for a native JavaScript error', () async { final remoteObject = await inspector - .jsEvaluate(interceptorsNewExpression('NativeError')); + .jsEvaluate(newInterceptorsExpression('NativeError')); final instance = await inspector.instanceFor(remoteObject); expect(instance!.kind, InstanceKind.kPlainInstance); expect(instance.classRef!.name, 'NativeError'); @@ -312,7 +391,7 @@ void runTests({ test('for a native JavaScript type error', () async { final remoteObject = await inspector - .jsEvaluate(interceptorsNewExpression('JSNoSuchMethodError')); + .jsEvaluate(newInterceptorsExpression('JSNoSuchMethodError')); final instance = await inspector.instanceFor(remoteObject); expect(instance!.kind, InstanceKind.kPlainInstance); expect(instance.classRef!.name, 'JSNoSuchMethodError'); @@ -323,7 +402,7 @@ void runTests({ test('for a native JavaScript object', () async { final remoteObject = await inspector - .jsEvaluate(interceptorsNewExpression('LegacyJavaScriptObject')); + .jsEvaluate(newInterceptorsExpression('LegacyJavaScriptObject')); final instance = await inspector.instanceFor(remoteObject); expect(instance!.kind, InstanceKind.kPlainInstance); expect(instance.classRef!.name, 'LegacyJavaScriptObject'); diff --git a/dwds/test/instances/common/instance_inspection_common.dart b/dwds/test/instances/common/instance_inspection_common.dart index 94e2d1b0e..2f60ab39c 100644 --- a/dwds/test/instances/common/instance_inspection_common.dart +++ b/dwds/test/instances/common/instance_inspection_common.dart @@ -11,16 +11,18 @@ import '../../fixtures/context.dart'; import '../../fixtures/project.dart'; import 'test_inspector.dart'; -Future runTests({ +void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, + required bool canaryFeatures, required NullSafety nullSafetyMode, required bool debug, -}) async { - final testPackage = nullSafetyMode == NullSafety.sound +}) { + final project = nullSafetyMode == NullSafety.sound ? TestProject.testPackageWithSoundNullSafety() : TestProject.testPackageWithWeakNullSafety(); - final context = TestContext(testPackage, provider); + final context = TestContext(project, provider); + late VmServiceInterface service; late Stream stream; late String isolateId; @@ -56,6 +58,7 @@ Future runTests({ enableExpressionEvaluation: true, verboseCompiler: debug, experiments: ['records'], + canaryFeatures: canaryFeatures, ); service = context.debugConnection.vmService; @@ -73,7 +76,42 @@ Future runTests({ tearDownAll(context.tearDown); setUp(() => setCurrentLogWriter(debug: debug)); - tearDown(() => service.resume(isolateId)); + tearDown(() async { + try { + await service.resume(isolateId); + } catch (_) {} + }); + + group('Library |', () { + test('classes', () async { + const libraryId = 'org-dartlang-app:///web/main.dart'; + final library = await getObject(libraryId); + + expect( + library, + isA().having( + (l) => l.classes, + 'classes', + [ + matchClassRef(name: 'MainClass', libraryId: libraryId), + matchClassRef(name: 'EnclosedClass', libraryId: libraryId), + matchClassRef(name: 'ClassWithMethod', libraryId: libraryId), + matchClassRef(name: 'EnclosingClass', libraryId: libraryId), + ], + ), + ); + }); + }); + + group('Class |', () { + test('name and library', () async { + const libraryId = 'org-dartlang-app:///web/main.dart'; + const className = 'MainClass'; + final cls = await getObject('classes|$libraryId|$className'); + + expect(cls, matchClass(name: className, libraryId: libraryId)); + }); + }); group('Object |', () { test('type and fields', () async { @@ -146,10 +184,7 @@ Future runTests({ final instanceRef = await getInstanceRef(frame, 'list'); final instanceId = instanceRef.id!; - expect( - await getObject(instanceId), - matchListInstance(type: 'List'), - ); + expect(await getObject(instanceId), matchListInstance(type: 'int')); expect(await getFields(instanceRef), [0, 1, 2]); expect(await getFields(instanceRef, offset: 1, count: 0), []); diff --git a/dwds/test/instances/common/patterns_inspection_common.dart b/dwds/test/instances/common/patterns_inspection_common.dart index 94ed57917..7d98003e0 100644 --- a/dwds/test/instances/common/patterns_inspection_common.dart +++ b/dwds/test/instances/common/patterns_inspection_common.dart @@ -2,9 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:io'; - -import 'package:pub_semver/pub_semver.dart' as semver; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; import 'package:test_common/test_sdk_configuration.dart'; @@ -14,11 +11,12 @@ import '../../fixtures/context.dart'; import '../../fixtures/project.dart'; import 'test_inspector.dart'; -Future runTests({ +void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, + required bool canaryFeatures, required bool debug, -}) async { +}) { final context = TestContext(TestProject.testExperimentWithSoundNullSafety, provider); final testInspector = TestInspector(context); @@ -45,126 +43,121 @@ Future runTests({ getFrameVariables(Frame frame) => testInspector.getFrameVariables(isolateId, frame); - group( - '$compilationMode |', - () { - setUpAll(() async { - setCurrentLogWriter(debug: debug); - await context.setUp( - compilationMode: compilationMode, - enableExpressionEvaluation: true, - verboseCompiler: debug, - experiments: ['records', 'patterns'], - ); - service = context.debugConnection.vmService; + group('$compilationMode |', () { + setUpAll(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + compilationMode: compilationMode, + enableExpressionEvaluation: true, + verboseCompiler: debug, + experiments: ['records', 'patterns'], + canaryFeatures: canaryFeatures, + ); + service = context.debugConnection.vmService; - final vm = await service.getVM(); - isolateId = vm.isolates!.first.id!; - final scripts = await service.getScripts(isolateId); + final vm = await service.getVM(); + isolateId = vm.isolates!.first.id!; + final scripts = await service.getScripts(isolateId); - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); + await service.streamListen('Debug'); + stream = service.onEvent('Debug'); - mainScript = scripts.scripts! - .firstWhere((each) => each.uri!.contains('main.dart')); - }); + mainScript = scripts.scripts! + .firstWhere((each) => each.uri!.contains('main.dart')); + }); - tearDownAll(() async { - await context.tearDown(); - }); + tearDownAll(() async { + await context.tearDown(); + }); - setUp(() => setCurrentLogWriter(debug: debug)); - tearDown(() => service.resume(isolateId)); + setUp(() => setCurrentLogWriter(debug: debug)); + tearDown(() => service.resume(isolateId)); - test('pattern match case 1', () async { - await onBreakPoint('testPatternCase1', (event) async { - final frame = event.topFrame!; + test('pattern match case 1', () async { + await onBreakPoint('testPatternCase1', (event) async { + final frame = event.topFrame!; - expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: 'List'), - 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'a'), - 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), - }); + expect(await getFrameVariables(frame), { + 'obj': matchListInstance(type: 'Object'), + 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'a'), + 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), }); }); + }); - test('pattern match case 2', () async { - await onBreakPoint('testPatternCase2', (event) async { - final frame = event.topFrame!; + test('pattern match case 2', () async { + await onBreakPoint('testPatternCase2', (event) async { + final frame = event.topFrame!; - expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: 'List'), - 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), - 'n': - matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14), - }); + expect(await getFrameVariables(frame), { + 'obj': matchListInstance(type: 'Object'), + 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), + 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14), }); }); + }); - test('pattern match default case', () async { - await onBreakPoint('testPatternDefault', (event) async { - final frame = event.topFrame!; - final frameIndex = frame.index!; - final instanceRef = await getInstanceRef(frameIndex, 'obj'); - expect(await getFields(instanceRef), [0, 1]); + test('pattern match default case', () async { + await onBreakPoint('testPatternDefault', (event) async { + final frame = event.topFrame!; + final frameIndex = frame.index!; + final instanceRef = await getInstanceRef(frameIndex, 'obj'); + expect(await getFields(instanceRef), [0, 1]); - expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: 'List'), - }); + expect(await getFrameVariables(frame), { + 'obj': matchListInstance(type: 'int'), }); }); - - test('stepping through pattern match', () async { - await onBreakPoint('callTestPattern1', (Event event) async { - var previousLocation = event.topFrame!.location; - for (var step in [ - // Make sure we step into the callee. - for (var i = 0; i < 4; i++) 'Into', - // Make a few steps inside the callee. - for (var i = 0; i < 4; i++) 'Over', - ]) { - await service.resume(isolateId, step: step); - - event = await stream - .firstWhere((e) => e.kind == EventKind.kPauseInterrupted); - - if (step == 'Over') { - expect(event.topFrame!.code!.name, 'testPattern'); - } - - final location = event.topFrame!.location; - expect(location, isNot(equals(previousLocation))); - previousLocation = location; + }); + + test('stepping through pattern match', () async { + await onBreakPoint('callTestPattern1', (Event event) async { + var previousLocation = event.topFrame!.location; + for (var step in [ + // Make sure we step into the callee. + for (var i = 0; i < 4; i++) 'Into', + // Make a few steps inside the callee. + for (var i = 0; i < 4; i++) 'Over', + ]) { + await service.resume(isolateId, step: step); + + event = await stream + .firstWhere((e) => e.kind == EventKind.kPauseInterrupted); + + if (step == 'Over') { + expect(event.topFrame!.code!.name, 'testPattern'); } - }); + + final location = event.topFrame!.location; + expect(location, isNot(equals(previousLocation))); + previousLocation = location; + } }); + }); - test('before instantiation of pattern-matching variables', () async { - await onBreakPoint('testPattern2Case1', (event) async { - final frame = event.topFrame!; + test('before instantiation of pattern-matching variables', () async { + await onBreakPoint('testPattern2Case1', (event) async { + final frame = event.topFrame!; - expect( - await getFrameVariables(frame), - {'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo')}, - ); - }); + expect( + await getFrameVariables(frame), + {'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo')}, + ); }); - - test('after instantiation of pattern-matching variables', () async { - await onBreakPoint('testPattern2Case2', (event) async { - final frame = event.topFrame!; - - expect(await getFrameVariables(frame), { - 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), - 'cats': matchListInstance(type: 'List'), - 'firstCat': - matchPrimitiveInstance(kind: 'String', value: 'Garfield'), - 'secondCat': matchPrimitiveInstance(kind: 'String', value: 'Tom'), - }); + }); + + test('after instantiation of pattern-matching variables', () async { + await onBreakPoint('testPattern2Case2', (event) async { + final frame = event.topFrame!; + + final vars = await getFrameVariables(frame); + expect(vars, { + 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), + 'cats': matchListInstance(type: 'String'), + 'firstCat': matchPrimitiveInstance(kind: 'String', value: 'Garfield'), + 'secondCat': matchPrimitiveInstance(kind: 'String', value: 'Tom'), }); }); - }, // TODO(annagrin): Remove when dart 3.0 is stable. - skip: semver.Version.parse(Platform.version.split(' ')[0]) < - semver.Version.parse('3.0.0-351.0.dev'), - ); + }); + }); } diff --git a/dwds/test/instances/common/record_inspection_common.dart b/dwds/test/instances/common/record_inspection_common.dart index 833e56201..c243291ed 100644 --- a/dwds/test/instances/common/record_inspection_common.dart +++ b/dwds/test/instances/common/record_inspection_common.dart @@ -11,11 +11,12 @@ import '../../fixtures/context.dart'; import '../../fixtures/project.dart'; import 'test_inspector.dart'; -Future runTests({ +void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, + required bool canaryFeatures, required bool debug, -}) async { +}) { final context = TestContext(TestProject.testExperimentWithSoundNullSafety, provider); final testInspector = TestInspector(context); @@ -58,6 +59,7 @@ Future runTests({ enableExpressionEvaluation: true, verboseCompiler: debug, experiments: ['records', 'patterns'], + canaryFeatures: canaryFeatures, ); service = context.debugConnection.vmService; diff --git a/dwds/test/instances/common/record_type_inspection_common.dart b/dwds/test/instances/common/record_type_inspection_common.dart index f39f7ddef..fdcb6ecef 100644 --- a/dwds/test/instances/common/record_type_inspection_common.dart +++ b/dwds/test/instances/common/record_type_inspection_common.dart @@ -11,11 +11,12 @@ import '../../fixtures/context.dart'; import '../../fixtures/project.dart'; import 'test_inspector.dart'; -Future runTests({ +void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, + required bool canaryFeatures, required bool debug, -}) async { +}) { final context = TestContext(TestProject.testExperimentWithSoundNullSafety, provider); final testInspector = TestInspector(context); @@ -52,6 +53,7 @@ Future runTests({ enableExpressionEvaluation: true, verboseCompiler: debug, experiments: ['records', 'patterns'], + canaryFeatures: canaryFeatures, ); service = context.debugConnection.vmService; diff --git a/dwds/test/instances/common/test_inspector.dart b/dwds/test/instances/common/test_inspector.dart index 3ce8e3694..e9ee70e40 100644 --- a/dwds/test/instances/common/test_inspector.dart +++ b/dwds/test/instances/common/test_inspector.dart @@ -220,9 +220,9 @@ Matcher matchRecordTypeInstanceRef({required int length}) => isA() .having((e) => e.length, 'length', length) .having((e) => e.classRef!, 'classRef', matchRecordTypeClassRef); -Matcher matchTypeInstanceRef(String name) => isA() +Matcher matchTypeInstanceRef(dynamic name) => isA() .having((e) => e.kind, 'kind', InstanceKind.kType) - .having((e) => e.name, 'name', name) + .having((e) => e.name, 'type ref name', name) .having((e) => e.classRef, 'classRef', matchTypeClassRef); Matcher matchPrimitiveInstanceRef({ @@ -247,7 +247,7 @@ Matcher matchPlainInstance({required libraryId, required String type}) => matchClassRef(name: type, libraryId: libraryId), ); -Matcher matchListInstance({required String type}) => isA() +Matcher matchListInstance({required dynamic type}) => isA() .having((e) => e.kind, 'kind', InstanceKind.kList) .having((e) => e.classRef, 'classRef', matchListClassRef(type)); @@ -269,44 +269,48 @@ Matcher matchRecordTypeInstance({required int length}) => isA() .having((e) => e.length, 'length', length) .having((e) => e.classRef, 'classRef', matchRecordTypeClassRef); -Matcher matchTypeStringInstance(String name) => +Matcher matchTypeStringInstance(dynamic name) => matchPrimitiveInstance(kind: InstanceKind.kString, value: name); -Matcher matchTypeInstance(String name) => isA() +Matcher matchTypeInstance(dynamic name) => isA() .having((e) => e.kind, 'kind', InstanceKind.kType) - .having((e) => e.name, 'name', name) + .having((e) => e.name, 'type name', name) .having((e) => e.classRef, 'classRef', matchTypeClassRef); Matcher matchRecordClass = - matchClass(name: _recordClass, libraryId: _dartCoreLibrary); + matchClass(name: matchRecordClassName, libraryId: _dartCoreLibrary); Matcher matchRecordTypeClass = - matchClass(name: _recordTypeClass, libraryId: _dartRuntimeLibrary); + matchClass(name: matchRecordTypeClassName, libraryId: _dartRuntimeLibrary); Matcher matchTypeClass = - matchClass(name: _typeClass, libraryId: _dartCoreLibrary); + matchClass(name: matchTypeClassName, libraryId: _dartCoreLibrary); -Matcher matchClass({String? name, String? libraryId}) => isA() - .having((e) => e.name, 'name', name) +Matcher matchClass({dynamic name, String? libraryId}) => isA() + .having((e) => e.name, 'class name', name) .having((e) => e.library, 'library', matchLibraryRef(libraryId)); Matcher matchRecordClassRef = - matchClassRef(name: _recordClass, libraryId: _dartCoreLibrary); -Matcher matchRecordTypeClassRef = - matchClassRef(name: _recordTypeClass, libraryId: _dartRuntimeLibrary); + matchClassRef(name: matchRecordClassName, libraryId: _dartCoreLibrary); +Matcher matchRecordTypeClassRef = matchClassRef( + name: matchRecordTypeClassName, + libraryId: _dartRuntimeLibrary, +); Matcher matchTypeClassRef = - matchClassRef(name: _typeClass, libraryId: _dartCoreLibrary); -Matcher matchListClassRef(String type) => - matchClassRef(name: type, libraryId: _dartInterceptorsLibrary); + matchClassRef(name: matchTypeClassName, libraryId: _dartCoreLibrary); +Matcher matchListClassRef(String type) => matchClassRef( + name: matchListClassName(type), + libraryId: _matchListLibraryName, + ); Matcher matchMapClassRef(String type) => matchClassRef(name: type, libraryId: _dartJsHelperLibrary); Matcher matchSetClassRef(String type) => matchClassRef(name: type, libraryId: _dartCollectionLibrary); -Matcher matchClassRef({String? name, String? libraryId}) => isA() - .having((e) => e.name, 'class name', name) +Matcher matchClassRef({dynamic name, dynamic libraryId}) => isA() + .having((e) => e.name, 'class ref name', name) .having((e) => e.library, 'library', matchLibraryRef(libraryId)); -Matcher matchLibraryRef(String? libraryId) => isA() - .having((e) => e.name, 'name', libraryId) +Matcher matchLibraryRef(dynamic libraryId) => isA() + .having((e) => e.name, 'library name', libraryId) .having((e) => e.id, 'id', libraryId) .having((e) => e.uri, 'uri', libraryId); @@ -330,6 +334,17 @@ final _dartInterceptorsLibrary = 'dart:_interceptors'; final _dartJsHelperLibrary = 'dart:_js_helper'; final _dartCollectionLibrary = 'dart:collection'; -final _recordClass = 'Record'; -final _recordTypeClass = 'RecordType'; -final _typeClass = 'Type'; +final matchRecordClassName = 'Record'; +final matchRecordTypeClassName = 'RecordType'; + +/// Match types for old and new type systems. +/// - Old type system has `dart:_interceptors|List` and `dart:_runtime|_Type`. +/// - New type system has `dart:_interceptors|JSArray` and `dart:core|Type`. +/// TODO(annagrin): update when DDC enables new type system. +final matchTypeClassName = anyOf(['Type', '_Type']); + +Matcher matchListClassName(String elementType) => + anyOf(['JSArray<$elementType>', 'List<$elementType>']); + +final _matchListLibraryName = + anyOf([_dartInterceptorsLibrary, _dartCoreLibrary]); diff --git a/dwds/test/instances/common/type_inspection_common.dart b/dwds/test/instances/common/type_inspection_common.dart index 864cb9a56..cc182ae93 100644 --- a/dwds/test/instances/common/type_inspection_common.dart +++ b/dwds/test/instances/common/type_inspection_common.dart @@ -11,13 +11,14 @@ import '../../fixtures/context.dart'; import '../../fixtures/project.dart'; import 'test_inspector.dart'; -Future runTests({ +void runTests({ required TestSdkConfigurationProvider provider, required CompilationMode compilationMode, + required bool canaryFeatures, required bool debug, -}) async { - final context = - TestContext(TestProject.testExperimentWithSoundNullSafety, provider); +}) { + final project = TestProject.testExperimentWithSoundNullSafety; + final context = TestContext(project, provider); final testInspector = TestInspector(context); late VmServiceInterface service; @@ -55,14 +56,13 @@ Future runTests({ final matchTypeObject = { 'hashCode': matchPrimitiveInstanceRef(kind: InstanceKind.kDouble), - 'runtimeType': matchTypeInstanceRef('Type'), + 'runtimeType': matchTypeInstanceRef(matchTypeClassName), }; final matchDisplayedTypeObject = [ matches('[0-9]*'), - 'Type', + matchTypeClassName, ]; - group('$compilationMode |', () { setUpAll(() async { setCurrentLogWriter(debug: debug); @@ -71,6 +71,7 @@ Future runTests({ enableExpressionEvaluation: true, verboseCompiler: debug, experiments: ['records', 'patterns'], + canaryFeatures: canaryFeatures, ); service = context.debugConnection.vmService; diff --git a/dwds/test/instances/instance_canary_test.dart b/dwds/test/instances/instance_canary_test.dart index a1e580eb5..22944e911 100644 --- a/dwds/test/instances/instance_canary_test.dart +++ b/dwds/test/instances/instance_canary_test.dart @@ -5,100 +5,38 @@ @Tags(['daily']) @Timeout(Duration(minutes: 2)) -import 'package:dwds/src/debugging/inspector.dart'; -import 'package:dwds/src/loaders/strategy.dart'; import 'package:test/test.dart'; -import 'package:test_common/logging.dart'; import 'package:test_common/test_sdk_configuration.dart'; import '../fixtures/context.dart'; -import '../fixtures/project.dart'; +import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = true; - for (var compilationMode in CompilationMode.values) { - _runAllTests( - canaryFeatures: true, - compilationMode: compilationMode, - debug: debug, - ); - } -} - -void _runAllTests({ - required bool canaryFeatures, - required CompilationMode compilationMode, - required bool debug, -}) { - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, ); - - final project = TestProject.testScopesWithSoundNullSafety; - - setUpAll(() async { - setCurrentLogWriter(debug: debug); - // Cleanup project including compiled dart sdk. - await project.cleanUp(); - }); tearDownAll(provider.dispose); - group('$compilationMode |', () { - final context = TestContext(project, provider); - late AppInspector inspector; - - setUpAll(() async { - setCurrentLogWriter(debug: debug); - await context.setUp( - canaryFeatures: canaryFeatures, - compilationMode: compilationMode, - ); - final chromeProxyService = context.service; - inspector = chromeProxyService.inspector; - }); - - tearDownAll(() async { - await context.tearDown(); - }); - - final url = 'org-dartlang-app:///example/scopes/main.dart'; - - String libraryName(CompilationMode compilationMode) => - compilationMode == CompilationMode.frontendServer - ? "example/scopes/main.dart" - : "example/scopes/main"; - - String libraryVariableTypeExpression( - String variable, - CompilationMode compilationMode, - ) => - ''' - (function() { - var dart = ${globalLoadStrategy.loadModuleSnippet}('dart_sdk').dart; - var libraryName = '${libraryName(compilationMode)}'; - var library = dart.getModuleLibraries(libraryName)['$url']; - var x = library['$variable']; - return dart.getReifiedType(x); - })(); - '''; - - group('compiler', () { - setUp(() => setCurrentLogWriter(debug: debug)); - - test('uses new type system', () async { - final remoteObject = await inspector.jsEvaluate( - libraryVariableTypeExpression( - 'libraryPublicFinal', - compilationMode, - ), - ); - expect(remoteObject.json['className'], 'dart_rti.Rti.new'); - }); - }); - }); + for (var compilationMode in CompilationMode.values) { + runTypeSystemVerificationTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } }); } diff --git a/dwds/test/instances/instance_inspection_canary_test.dart b/dwds/test/instances/instance_inspection_canary_test.dart new file mode 100644 index 000000000..704e19b28 --- /dev/null +++ b/dwds/test/instances/instance_inspection_canary_test.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.dart'; + +import '../fixtures/context.dart'; +import '../fixtures/project.dart'; +import 'common/instance_inspection_common.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final canaryFeatures = true; + + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ); + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + // Note: not running with weak null safety because it + // requires a special branch of build_web_compilers + // that does not support --canary flag. + nullSafetyMode: NullSafety.sound, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); +} diff --git a/dwds/test/instances/instance_inspection_test.dart b/dwds/test/instances/instance_inspection_test.dart index ff8ddc422..53c5b4022 100644 --- a/dwds/test/instances/instance_inspection_test.dart +++ b/dwds/test/instances/instance_inspection_test.dart @@ -13,21 +13,28 @@ import '../fixtures/context.dart'; import '../fixtures/project.dart'; import 'common/instance_inspection_common.dart'; -void main() async { +void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = false; - final provider = TestSdkConfigurationProvider(verbose: debug); - tearDownAll(provider.dispose); + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ); + tearDownAll(provider.dispose); - for (var compilationMode in CompilationMode.values) { - for (var nullSafetyMode in NullSafety.values) { - await runTests( - provider: provider, - compilationMode: compilationMode, - nullSafetyMode: nullSafetyMode, - debug: debug, - ); + for (var compilationMode in CompilationMode.values) { + for (var nullSafetyMode in NullSafety.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + nullSafetyMode: nullSafetyMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } } - } + }); } diff --git a/dwds/test/instances/instance_test.dart b/dwds/test/instances/instance_test.dart index cbac97309..be95dd443 100644 --- a/dwds/test/instances/instance_test.dart +++ b/dwds/test/instances/instance_test.dart @@ -14,15 +14,29 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = false; - final provider = TestSdkConfigurationProvider(verbose: debug); - tearDownAll(provider.dispose); - - for (var compilationMode in CompilationMode.values) { - runTests( - provider: provider, - compilationMode: compilationMode, - debug: debug, + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + canaryFeatures: canaryFeatures, + verbose: debug, ); - } + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTypeSystemVerificationTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); } diff --git a/dwds/test/instances/patterns_inspection_canary_test.dart b/dwds/test/instances/patterns_inspection_canary_test.dart new file mode 100644 index 000000000..30559bec8 --- /dev/null +++ b/dwds/test/instances/patterns_inspection_canary_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.dart'; + +import '../fixtures/context.dart'; +import 'common/patterns_inspection_common.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final canaryFeatures = true; + + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ); + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); +} diff --git a/dwds/test/instances/patterns_inspection_test.dart b/dwds/test/instances/patterns_inspection_test.dart index a47d51bb7..1b6b7f2a7 100644 --- a/dwds/test/instances/patterns_inspection_test.dart +++ b/dwds/test/instances/patterns_inspection_test.dart @@ -12,18 +12,25 @@ import 'package:test_common/test_sdk_configuration.dart'; import '../fixtures/context.dart'; import 'common/patterns_inspection_common.dart'; -void main() async { +void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = false; - final provider = TestSdkConfigurationProvider(verbose: debug); - tearDownAll(provider.dispose); - - for (var compilationMode in CompilationMode.values) { - await runTests( - provider: provider, - compilationMode: compilationMode, - debug: debug, + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, ); - } + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); } diff --git a/dwds/test/instances/record_inspection_canary_test.dart b/dwds/test/instances/record_inspection_canary_test.dart new file mode 100644 index 000000000..dc65290f7 --- /dev/null +++ b/dwds/test/instances/record_inspection_canary_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.dart'; + +import '../fixtures/context.dart'; +import 'common/record_inspection_common.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final canaryFeatures = true; + + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ); + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); +} diff --git a/dwds/test/instances/record_inspection_test.dart b/dwds/test/instances/record_inspection_test.dart index f80541e90..0cc8ed83c 100644 --- a/dwds/test/instances/record_inspection_test.dart +++ b/dwds/test/instances/record_inspection_test.dart @@ -12,18 +12,25 @@ import 'package:test_common/test_sdk_configuration.dart'; import '../fixtures/context.dart'; import 'common/record_inspection_common.dart'; -void main() async { +void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = false; - final provider = TestSdkConfigurationProvider(verbose: debug); - tearDownAll(provider.dispose); - - for (var compilationMode in CompilationMode.values) { - await runTests( - provider: provider, - compilationMode: compilationMode, - debug: debug, + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, ); - } + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); } diff --git a/dwds/test/instances/record_type_inspection_canary_test.dart b/dwds/test/instances/record_type_inspection_canary_test.dart new file mode 100644 index 000000000..50b8e7420 --- /dev/null +++ b/dwds/test/instances/record_type_inspection_canary_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.dart'; + +import '../fixtures/context.dart'; +import 'common/record_type_inspection_common.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final canaryFeatures = true; + + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ); + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); +} diff --git a/dwds/test/instances/record_type_inspection_test.dart b/dwds/test/instances/record_type_inspection_test.dart index 74c8dede4..abf57d6dc 100644 --- a/dwds/test/instances/record_type_inspection_test.dart +++ b/dwds/test/instances/record_type_inspection_test.dart @@ -12,18 +12,25 @@ import 'package:test_common/test_sdk_configuration.dart'; import '../fixtures/context.dart'; import 'common/record_type_inspection_common.dart'; -void main() async { +void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = false; - final provider = TestSdkConfigurationProvider(verbose: debug); - tearDownAll(provider.dispose); - - for (var compilationMode in CompilationMode.values) { - await runTests( - provider: provider, - compilationMode: compilationMode, - debug: debug, + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, ); - } + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); } diff --git a/dwds/test/instances/type_inspection_canary_test.dart b/dwds/test/instances/type_inspection_canary_test.dart new file mode 100644 index 000000000..65eaf0c29 --- /dev/null +++ b/dwds/test/instances/type_inspection_canary_test.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 2)) + +import 'package:test/test.dart'; +import 'package:test_common/test_sdk_configuration.dart'; + +import '../fixtures/context.dart'; +import 'common/type_inspection_common.dart'; + +void main() { + // Enable verbose logging for debugging. + final debug = false; + final canaryFeatures = true; + + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, + ); + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); +} diff --git a/dwds/test/instances/type_inspection_test.dart b/dwds/test/instances/type_inspection_test.dart index 8ddf26124..4045528fa 100644 --- a/dwds/test/instances/type_inspection_test.dart +++ b/dwds/test/instances/type_inspection_test.dart @@ -12,18 +12,25 @@ import 'package:test_common/test_sdk_configuration.dart'; import '../fixtures/context.dart'; import 'common/type_inspection_common.dart'; -void main() async { +void main() { // Enable verbose logging for debugging. final debug = false; + final canaryFeatures = false; - final provider = TestSdkConfigurationProvider(verbose: debug); - tearDownAll(provider.dispose); - - for (var compilationMode in CompilationMode.values) { - await runTests( - provider: provider, - compilationMode: compilationMode, - debug: debug, + group('canary: $canaryFeatures |', () { + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: canaryFeatures, ); - } + tearDownAll(provider.dispose); + + for (var compilationMode in CompilationMode.values) { + runTests( + provider: provider, + compilationMode: compilationMode, + canaryFeatures: canaryFeatures, + debug: debug, + ); + } + }); } diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9f1797838..747180c44 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ description: A web app example for webdev CLI. publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dev_dependencies: build_runner: ^2.4.0 diff --git a/fixtures/_test/pubspec.yaml b/fixtures/_test/pubspec.yaml index 5969c1891..ca7044b90 100644 --- a/fixtures/_test/pubspec.yaml +++ b/fixtures/_test/pubspec.yaml @@ -9,7 +9,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: intl: ^0.17.0 diff --git a/fixtures/_testCircular1/pubspec.yaml b/fixtures/_testCircular1/pubspec.yaml index 8fc4b93ee..ce209823c 100644 --- a/fixtures/_testCircular1/pubspec.yaml +++ b/fixtures/_testCircular1/pubspec.yaml @@ -9,7 +9,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: intl: ^0.17.0 diff --git a/fixtures/_testCircular1Sound/pubspec.yaml b/fixtures/_testCircular1Sound/pubspec.yaml index a09869900..b1e07e8ac 100644 --- a/fixtures/_testCircular1Sound/pubspec.yaml +++ b/fixtures/_testCircular1Sound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: intl: ^0.17.0 diff --git a/fixtures/_testCircular2/pubspec.yaml b/fixtures/_testCircular2/pubspec.yaml index 8c67a6ec2..153ccb245 100644 --- a/fixtures/_testCircular2/pubspec.yaml +++ b/fixtures/_testCircular2/pubspec.yaml @@ -9,7 +9,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: _test_circular1: diff --git a/fixtures/_testCircular2Sound/pubspec.yaml b/fixtures/_testCircular2Sound/pubspec.yaml index 26200812a..51f768ab8 100644 --- a/fixtures/_testCircular2Sound/pubspec.yaml +++ b/fixtures/_testCircular2Sound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: _test_circular1_sound: diff --git a/fixtures/_testPackageSound/pubspec.yaml b/fixtures/_testPackageSound/pubspec.yaml index 882e291f1..6a41aa485 100644 --- a/fixtures/_testPackageSound/pubspec.yaml +++ b/fixtures/_testPackageSound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: _test_sound: diff --git a/fixtures/_testSound/pubspec.yaml b/fixtures/_testSound/pubspec.yaml index 677a9e4f3..bb4ae18de 100644 --- a/fixtures/_testSound/pubspec.yaml +++ b/fixtures/_testSound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: intl: ^0.17.0 diff --git a/fixtures/_webdevSmoke/pubspec.yaml b/fixtures/_webdevSmoke/pubspec.yaml index 493debe0e..fefa22f7b 100644 --- a/fixtures/_webdevSmoke/pubspec.yaml +++ b/fixtures/_webdevSmoke/pubspec.yaml @@ -14,7 +14,7 @@ publish_to: none # and build_web_compilers constraint should match those defined # in pubspec.dart. environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dev_dependencies: build_runner: '>=1.6.2 <3.0.0' diff --git a/fixtures/_webdevSoundSmoke/build.yaml b/fixtures/_webdevSoundSmoke/build.yaml new file mode 100644 index 000000000..5b9378c37 --- /dev/null +++ b/fixtures/_webdevSoundSmoke/build.yaml @@ -0,0 +1,7 @@ +global_options: + build_web_compilers:ddc: + options: + canary: false + build_web_compilers:sdk_js: + options: + canary: false diff --git a/fixtures/_webdevSoundSmoke/canary_build.yaml b/fixtures/_webdevSoundSmoke/canary_build.yaml new file mode 100644 index 000000000..5b9378c37 --- /dev/null +++ b/fixtures/_webdevSoundSmoke/canary_build.yaml @@ -0,0 +1,7 @@ +global_options: + build_web_compilers:ddc: + options: + canary: false + build_web_compilers:sdk_js: + options: + canary: false diff --git a/fixtures/_webdevSoundSmoke/pubspec.yaml b/fixtures/_webdevSoundSmoke/pubspec.yaml index 3192915df..5657b84ec 100644 --- a/fixtures/_webdevSoundSmoke/pubspec.yaml +++ b/fixtures/_webdevSoundSmoke/pubspec.yaml @@ -4,7 +4,7 @@ description: A test fixture for webdev testing with sound support. publish_to: none environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dev_dependencies: build_runner: ^2.4.0 diff --git a/tool/ci.sh b/tool/ci.sh index b834a526b..b7b7e66f1 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.5.7 +# Created with package:mono_repo v6.4.3 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index 00ce7cd03..c57d81209 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,6 +1,7 @@ ## 3.0.7-wip - Update `build_web_compilers` constraint to `^4.0.4`. +- Update SDK constraint to `>=3.1.0-340.0.dev <4.0.0`. ## 3.0.6 diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 1a4af99fc..02e8d502e 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -8,7 +8,7 @@ description: >- features for users and tools to build and deploy web applications with Dart. repository: https://github.com/dart-lang/webdev/tree/master/webdev environment: - sdk: ">=3.1.0-254.0.dev <4.0.0" + sdk: ">=3.1.0-340.0.dev <4.0.0" dependencies: args: ^2.3.1