Skip to content

Commit

Permalink
Require analyzer ^6.9.0, switch to using 'enclosingElement3'. (dart-l…
Browse files Browse the repository at this point in the history
  • Loading branch information
scheglov authored Sep 25, 2024
1 parent efa9c15 commit fd8cf8b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
34 changes: 17 additions & 17 deletions source_gen/source_gen/.github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source_gen/source_gen/example_usage/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion source_gen/source_gen/source_gen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}',
);
}

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions source_gen/source_gen/source_gen/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd8cf8b

Please sign in to comment.