diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 5360da88..712e0401 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,23 +40,23 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_format; linux; Dart 3.5.0; PKG: source_gen; `dart analyze`" + name: "analyze_format; linux; Dart 3.6.0-270.0.dev; PKG: source_gen; `dart analyze`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:source_gen;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev;packages:source_gen;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:source_gen - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev;packages:source_gen + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0-270.0.dev" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -143,23 +143,23 @@ jobs: if: "always() && steps.source_gen_pub_upgrade.conclusion == 'success'" working-directory: source_gen job_004: - name: "unit_test; linux; Dart 3.5.0; PKG: example_usage; `dart test --run-skipped`" + name: "unit_test; linux; Dart 3.6.0-270.0.dev; PKG: example_usage; `dart test --run-skipped`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:example_usage;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev;packages:example_usage;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:example_usage - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev;packages:example_usage + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0-270.0.dev" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -177,23 +177,23 @@ jobs: - job_002 - job_003 job_005: - name: "unit_test; linux; Dart 3.5.0; PKG: source_gen; `dart test`" + name: "unit_test; linux; Dart 3.6.0-270.0.dev; PKG: source_gen; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:source_gen;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev;packages:source_gen;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:source_gen - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev;packages:source_gen + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0-270.0.dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0-270.0.dev" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -279,13 +279,13 @@ jobs: - job_002 - job_003 job_008: - name: "unit_test; windows; Dart 3.5.0; PKG: source_gen; `dart test`" + name: "unit_test; windows; Dart 3.6.0-270.0.dev; PKG: source_gen; `dart test`" runs-on: windows-latest steps: - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0-270.0.dev" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 diff --git a/example_usage/pubspec.yaml b/example_usage/pubspec.yaml index 612ef197..96babda5 100644 --- a/example_usage/pubspec.yaml +++ b/example_usage/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0-270.0.dev dependencies: source_gen_example: diff --git a/source_gen/CHANGELOG.md b/source_gen/CHANGELOG.md index a69d855d..8a903398 100644 --- a/source_gen/CHANGELOG.md +++ b/source_gen/CHANGELOG.md @@ -9,7 +9,7 @@ `GeneratorForAnnotation.generateForAnnotatedElement`. - Support all the glob quotes. - Require `analyzer: ^6.9.0` -- Require Dart 3.5.0 +- Require Dart 3.6.0-270.0.dev - `LibraryBuilder`, `PartBuilder`, and `SharedPartBuilder` now take an optional `writeDescriptions` boolean. When set to `false`, headers and generator descriptions for the files will not be included in the builder output. ## 1.5.0 diff --git a/source_gen/lib/src/constants/revive.dart b/source_gen/lib/src/constants/revive.dart index ddfaded2..4bd038ac 100644 --- a/source_gen/lib/src/constants/revive.dart +++ b/source_gen/lib/src/constants/revive.dart @@ -43,7 +43,7 @@ Revivable reviveInstance(DartObject object, [LibraryElement? origin]) { if (element is MethodElement && element.isStatic) { return Revivable._( source: url.removeFragment(), - accessor: '${element.enclosingElement.name}.${element.name}', + accessor: '${element.enclosingElement3.name}.${element.name}', ); } @@ -81,7 +81,7 @@ Revivable reviveInstance(DartObject object, [LibraryElement? origin]) { } final i = (object as DartObjectImpl).getInvocation(); if (i != null) { - url = Uri.parse(urlOfElement(i.constructor.enclosingElement)); + url = Uri.parse(urlOfElement(i.constructor.enclosingElement3)); final result = Revivable._( source: url, accessor: i.constructor.name, diff --git a/source_gen/pubspec.yaml b/source_gen/pubspec.yaml index 66b5c831..12889bc9 100644 --- a/source_gen/pubspec.yaml +++ b/source_gen/pubspec.yaml @@ -6,10 +6,10 @@ repository: https://github.com/dart-lang/source_gen/tree/master/source_gen resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0-270.0.dev dependencies: - analyzer: ^6.4.0 + analyzer: ^6.9.0 async: ^2.5.0 build: ^2.1.0 dart_style: ^2.3.7