Skip to content

[corpus] update to latest analyzer, bump min SDK #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/corpus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [stable, dev]
sdk: [3.6, dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
Expand All @@ -38,6 +38,6 @@ jobs:
- run: dart analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .
if: ${{ matrix.sdk == 'stable' }}
if: ${{ matrix.sdk == 'dev' }}

- run: dart test
4 changes: 1 addition & 3 deletions pkgs/corpus/lib/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ class ApiUseCollector extends RecursiveAstVisitor implements SurveyorVisitor {
return;
}

//TODO: fix as soon as enclosingElement3 is on Dart stable
// ignore: deprecated_member_use
var enclosingElement = element.enclosingElement!;
var enclosingElement = element.enclosingElement3!;

if (enclosingElement.kind == ElementKind.CLASS) {
final name = enclosingElement.name!;
Expand Down
14 changes: 7 additions & 7 deletions pkgs/corpus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ description: A tool to calculate the API usage for a package.
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.6.0

dependencies:
analyzer: ^6.0.0
args: ^2.0.0
analyzer: ^7.0.0
args: ^2.1.0
cli_util: ^0.4.0
collection: ^1.16.0
collection: ^1.19.0
http: ^1.0.0
path: ^1.8.0
pub_semver: ^2.0.0
path: ^1.9.0
pub_semver: ^2.1.4
yaml: ^3.0.0

dev_dependencies:
checks: ^0.3.0
dart_flutter_team_lints: ^3.0.0
test: ^1.22.0
test: ^1.25.9
test_descriptor: ^2.0.0
Loading