Skip to content

Commit

Permalink
Bump to latest dependencies, require Dart 3.6 (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Dec 17, 2024
1 parent c4d44e5 commit 2622384
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
30 changes: 15 additions & 15 deletions .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: "analyzer_and_format; Dart 3.5.0; PKGS: build_cli, build_cli_annotations; `dart analyze --fatal-infos .`"
name: "analyzer_and_format; Dart 3.6.0; PKGS: build_cli, build_cli_annotations; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:build_cli-build_cli_annotations;commands:analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:build_cli-build_cli_annotations;commands:analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:build_cli-build_cli_annotations
os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:build_cli-build_cli_annotations
os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: "3.5.0"
sdk: "3.6.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand All @@ -81,23 +81,23 @@ jobs:
needs:
- job_001
job_003:
name: "analyzer_and_format; Dart 3.5.0; PKGS: build_cli, build_cli_annotations; `dart format --output=none --set-exit-if-changed .`"
name: "analyzer_and_format; Dart 3.6.0; PKGS: build_cli, build_cli_annotations; `dart format --output=none --set-exit-if-changed .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:build_cli-build_cli_annotations;commands:format"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:build_cli-build_cli_annotations;commands:format"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:build_cli-build_cli_annotations
os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:build_cli-build_cli_annotations
os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: "3.5.0"
sdk: "3.6.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand Down Expand Up @@ -204,23 +204,23 @@ jobs:
needs:
- job_001
job_006:
name: "unit_test; Dart 3.5.0; PKG: build_cli; `dart test --run-skipped --reporter expanded`"
name: "unit_test; Dart 3.6.0; PKG: build_cli; `dart test --run-skipped --reporter expanded`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:build_cli;commands:test"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:build_cli;commands:test"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:build_cli
os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:build_cli
os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: "3.5.0"
sdk: "3.6.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand Down
4 changes: 2 additions & 2 deletions build_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 2.2.4-wip

- Require latest `package:analyzer`.
- Require `sdk: ^3.5.0`
- Support the latest `package:analyzer` and `package:source_gen`.
- Require `sdk: ^3.6.0`

## 2.2.3

Expand Down
15 changes: 7 additions & 8 deletions build_cli/lib/src/to_share.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// 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.

// TODO: remove deprecated_member_use when we bump min SDK to Dart 3.6
// ignore_for_file: implementation_imports, deprecated_member_use
// ignore_for_file: implementation_imports

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
Expand Down Expand Up @@ -41,7 +40,7 @@ Set<FieldElement> createSortedFieldSet(ClassElement element) {

for (var v in manager.getInheritedMap2(element).values) {
assert(v is! FieldElement);
if (_dartCoreObjectChecker.isExactly(v.enclosingElement)) {
if (_dartCoreObjectChecker.isExactly(v.enclosingElement3)) {
continue;
}

Expand All @@ -59,20 +58,20 @@ Set<FieldElement> createSortedFieldSet(ClassElement element) {

int _sortByLocation(FieldElement a, FieldElement b) {
final checkerA =
TypeChecker.fromStatic((a.enclosingElement as ClassElement).thisType);
TypeChecker.fromStatic((a.enclosingElement3 as ClassElement).thisType);

if (!checkerA.isExactly(b.enclosingElement)) {
if (!checkerA.isExactly(b.enclosingElement3)) {
// in this case, you want to prioritize the enclosingElement that is more
// "super".

if (checkerA.isSuperOf(b.enclosingElement)) {
if (checkerA.isSuperOf(b.enclosingElement3)) {
return -1;
}

final checkerB =
TypeChecker.fromStatic((b.enclosingElement as ClassElement).thisType);
TypeChecker.fromStatic((b.enclosingElement3 as ClassElement).thisType);

if (checkerB.isSuperOf(a.enclosingElement)) {
if (checkerB.isSuperOf(a.enclosingElement3)) {
return 1;
}
}
Expand Down
6 changes: 3 additions & 3 deletions build_cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ description: >-
homepage: https://github.com/kevmoo/build_cli

environment:
sdk: ^3.5.0
sdk: ^3.6.0

resolution: workspace

dependencies:
analyzer: ^6.5.0
analyzer: '>=6.9.0 <8.0.0'
build: ^2.4.1
# Limit version range on build_cli_annotations
# new features need to stay in sync
build_cli_annotations: '>=2.1.0 <2.2.0'
build_config: ^1.1.0
pub_semver: ^2.1.4
source_gen: ^1.4.0
source_gen: '>=1.4.0 <3.0.0'
source_helper: ^1.3.4
yaml: ^3.1.0

Expand Down
3 changes: 2 additions & 1 deletion build_cli/test/test_input/test_input.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @dart=3.6

import 'package:build_cli_annotations/build_cli_annotations.dart';
// ignore: import_of_legacy_library_into_null_safe
import 'package:source_gen_test/annotations.dart';

@ShouldThrow(
Expand Down
2 changes: 1 addition & 1 deletion build_cli/tool/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:source_gen/source_gen.dart';
LibraryBuilder _builder(_ReplaceGenerator generator) => LibraryBuilder(
generator,
generatedExtension: '.${generator.gName}.dart',
formatOutput: (a) => a,
formatOutput: (a, v) => a,
);

Builder defaultOverride([_]) => _builder(_NonNullableGenerator());
Expand Down
2 changes: 1 addition & 1 deletion build_cli_annotations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 2.1.1-wip

- Require `args: ^2.6.0`
- Require `sdk: ^3.5.0`
- Require `sdk: ^3.6.0`

## 2.1.0

Expand Down
2 changes: 1 addition & 1 deletion build_cli_annotations/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
homepage: https://github.com/kevmoo/build_cli

environment:
sdk: ^3.5.0
sdk: ^3.6.0

resolution: workspace

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build_cli_workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

publish_to: none

Expand Down

0 comments on commit 2622384

Please sign in to comment.