Skip to content

Commit

Permalink
Require Dart 3.5, move to workspaces (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Sep 10, 2024
1 parent ffa373b commit e2ba988
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 34 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v6.6.1
# Created with package:mono_repo v6.6.2
name: Dart CI
on:
push:
Expand Down Expand Up @@ -36,27 +36,27 @@ jobs:
name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: mono_repo self validate
run: dart pub global activate mono_repo 6.6.1
run: dart pub global activate mono_repo 6.6.2
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyze_format; linux; Dart 3.4.0; PKG: source_gen; `dart analyze`"
name: "analyze_format; linux; Dart 3.5.0; 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.4.0;packages:source_gen;commands:analyze_1"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:source_gen;commands:analyze_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:source_gen
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
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
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: "3.4.0"
sdk: "3.5.0"
- 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.4.0; PKG: example_usage; `dart test --run-skipped`"
name: "unit_test; linux; Dart 3.5.0; 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.4.0;packages:example_usage;commands:test_0"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:example_usage;commands:test_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:example_usage
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
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
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: "3.4.0"
sdk: "3.5.0"
- 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.4.0; PKG: source_gen; `dart test`"
name: "unit_test; linux; Dart 3.5.0; 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.4.0;packages:source_gen;commands:test_1"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:source_gen;commands:test_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:source_gen
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
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
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: "3.4.0"
sdk: "3.5.0"
- 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.4.0; PKG: source_gen; `dart test`"
name: "unit_test; windows; Dart 3.5.0; PKG: source_gen; `dart test`"
runs-on: windows-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: "3.4.0"
sdk: "3.5.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand Down
3 changes: 2 additions & 1 deletion _test_annotations/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: _test_annotations
publish_to: none
resolution: workspace

environment:
sdk: ^3.4.0
sdk: ^3.5.0

dev_dependencies:
dart_flutter_team_lints: ^3.1.0
7 changes: 2 additions & 5 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: source_gen_example
publish_to: none
resolution: workspace

environment:
sdk: ^3.4.0
sdk: ^3.5.0

dependencies:
analyzer: '>=5.2.0 <7.0.0'
Expand All @@ -11,7 +12,3 @@ dependencies:

dev_dependencies:
dart_flutter_team_lints: ^3.1.0

dependency_overrides:
source_gen:
path: ../source_gen
7 changes: 2 additions & 5 deletions example_usage/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: source_gen_example_usage
publish_to: none
resolution: workspace

environment:
sdk: ^3.4.0
sdk: ^3.5.0

dependencies:
source_gen_example:
Expand All @@ -13,7 +14,3 @@ dev_dependencies:
build_verify: ^3.0.0
dart_flutter_team_lints: ^3.1.0
test: ^1.5.1

dependency_overrides:
source_gen:
path: ../source_gen
13 changes: 13 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: source_gen_workspace
publish_to: none
environment:
sdk: ^3.5.0

workspace:
- source_gen
- example
- example_usage
- _test_annotations

dev_dependencies:
dart_flutter_team_lints: ^3.1.0
4 changes: 2 additions & 2 deletions source_gen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
`GeneratorForAnnotation.generateForAnnotatedElement`.
- Support all the glob quotes.
- Revive to the object's `variableElement` if available
- Require `analyzer: ^6.4.0`
- Require Dart 3.4.0
- Require `analyzer: ^6.9.0`
- Require Dart 3.5.0

## 1.5.0

Expand Down
3 changes: 3 additions & 0 deletions source_gen/lib/src/constants/revive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// 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(kevmoo): migrate analyzer APIs when we can get latest with a stable SDK
// ignore_for_file: deprecated_member_use

import 'package:analyzer/dart/constant/value.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
Expand Down
3 changes: 2 additions & 1 deletion source_gen/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ version: 1.5.1-wip
description: >-
Source code generation builders and utilities for the Dart build system
repository: https://github.com/dart-lang/source_gen/tree/master/source_gen
resolution: workspace

environment:
sdk: ^3.4.0
sdk: ^3.5.0

dependencies:
analyzer: ^6.4.0
Expand Down
2 changes: 1 addition & 1 deletion tool/ci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Created with package:mono_repo v6.6.1
# Created with package:mono_repo v6.6.2

# Support built in commands on windows out of the box.

Expand Down

0 comments on commit e2ba988

Please sign in to comment.