From ca24d92017d448b21f1502f13c7aa5e6a722a344 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 12 Sep 2022 17:26:40 -0700 Subject: [PATCH 1/7] Support latest package:analyzer Prepare to publish several packages --- _test/pubspec.yaml | 2 +- build/CHANGELOG.md | 4 ++++ build/pubspec.yaml | 10 ++++++++-- build_daemon/pubspec.yaml | 2 +- build_modules/CHANGELOG.md | 4 +++- build_modules/pubspec.yaml | 4 ++-- build_resolvers/CHANGELOG.md | 3 ++- build_resolvers/pubspec.yaml | 8 ++++++-- build_runner/CHANGELOG.md | 3 ++- build_runner/pubspec.yaml | 4 ++-- build_runner_core/pubspec.yaml | 2 +- build_test/pubspec.yaml | 2 +- build_vm_compilers/CHANGELOG.md | 4 +++- build_vm_compilers/pubspec.yaml | 4 ++-- build_web_compilers/CHANGELOG.md | 4 +++- build_web_compilers/pubspec.yaml | 4 ++-- example/pubspec.yaml | 2 +- 17 files changed, 44 insertions(+), 22 deletions(-) diff --git a/_test/pubspec.yaml b/_test/pubspec.yaml index 31c53fae3..d90df17a1 100644 --- a/_test/pubspec.yaml +++ b/_test/pubspec.yaml @@ -5,7 +5,7 @@ environment: sdk: ">=2.12.0 <3.0.0" dev_dependencies: - analyzer: ">=1.0.0 <5.0.0" + analyzer: ">=1.0.0 <6.0.0" build: any build_config: any build_modules: any diff --git a/build/CHANGELOG.md b/build/CHANGELOG.md index 6c8f197e6..90653cbf7 100644 --- a/build/CHANGELOG.md +++ b/build/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.1 + +- Allow the latest `package:analyzer`. + ## 2.3.0 - Support ^ in build extensions that don't use capture groups, which results diff --git a/build/pubspec.yaml b/build/pubspec.yaml index c73980baa..c1833b242 100644 --- a/build/pubspec.yaml +++ b/build/pubspec.yaml @@ -1,5 +1,5 @@ name: build -version: 2.3.0 +version: 2.3.1 description: A package for authoring build_runner compatible code generators. repository: https://github.com/dart-lang/build/tree/master/build @@ -7,7 +7,7 @@ environment: sdk: ">=2.14.0 <3.0.0" dependencies: - analyzer: ">=1.5.0 <5.0.0" + analyzer: ">=1.5.0 <6.0.0" async: ^2.5.0 convert: ^3.0.0 crypto: ^3.0.0 @@ -21,3 +21,9 @@ dev_dependencies: build_test: ^2.0.0 lints: '>=1.0.0 <3.0.0' test: ^1.16.0 + +dependency_overrides: + build_resolvers: + path: ../build_resolvers + build_test: + path: ../build_test diff --git a/build_daemon/pubspec.yaml b/build_daemon/pubspec.yaml index 83a35f758..4b4c2164d 100644 --- a/build_daemon/pubspec.yaml +++ b/build_daemon/pubspec.yaml @@ -21,7 +21,7 @@ dependencies: dev_dependencies: build_runner: ^2.0.0 - analyzer: '>=3.4.0 <5.0.0' + analyzer: '>=3.4.0 <6.0.0' # TODO: untangle analyzer dependency built_value_generator: ^8.1.0 lints: '>=1.0.0 <3.0.0' diff --git a/build_modules/CHANGELOG.md b/build_modules/CHANGELOG.md index e6a87492c..87f5aa363 100644 --- a/build_modules/CHANGELOG.md +++ b/build_modules/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.0.6-dev +## 4.0.6 + +- Allow the latest `package:analyzer`. ## 4.0.5 diff --git a/build_modules/pubspec.yaml b/build_modules/pubspec.yaml index f9c2ed45b..390411d32 100644 --- a/build_modules/pubspec.yaml +++ b/build_modules/pubspec.yaml @@ -1,5 +1,5 @@ name: build_modules -version: 4.0.6-dev +version: 4.0.6 description: Builders for Dart modules repository: https://github.com/dart-lang/build/tree/master/build_modules @@ -7,7 +7,7 @@ environment: sdk: ">=2.14.0 <3.0.0" dependencies: - analyzer: ^4.4.0 + analyzer: '>=4.4.0 <6.0.0' async: ^2.5.0 bazel_worker: ^1.0.0 build: ^2.0.0 diff --git a/build_resolvers/CHANGELOG.md b/build_resolvers/CHANGELOG.md index 5c3f41daa..70431c0b7 100644 --- a/build_resolvers/CHANGELOG.md +++ b/build_resolvers/CHANGELOG.md @@ -1,9 +1,10 @@ -## 2.0.10-dev +## 2.0.10 - Migrate from `LibraryElement#parts` to `LibraryElement#parts2`. - Update min sdk constraint to `2.17.0` since this is the minimum selectable (and testable) sdk. - Use a constructor tearoff since our min sdk now supports them. +- Allow the latest `package:analyzer`. ## 2.0.9 diff --git a/build_resolvers/pubspec.yaml b/build_resolvers/pubspec.yaml index c587e0f5f..14f0bd979 100644 --- a/build_resolvers/pubspec.yaml +++ b/build_resolvers/pubspec.yaml @@ -1,5 +1,5 @@ name: build_resolvers -version: 2.0.10-dev +version: 2.0.10 description: Resolve Dart code in a Builder repository: https://github.com/dart-lang/build/tree/master/build_resolvers @@ -7,7 +7,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - analyzer: ^4.6.0 + analyzer: '>=4.4.0 <6.0.0' async: ^2.5.0 build: ^2.0.0 crypto: ^3.0.0 @@ -24,3 +24,7 @@ dev_dependencies: lints: '>=1.0.0 <3.0.0' test: ^1.16.0 build_test: ^2.0.0 + +dependency_overrides: + build: + path: ../build diff --git a/build_runner/CHANGELOG.md b/build_runner/CHANGELOG.md index 1ccd0ec99..98e222cfc 100644 --- a/build_runner/CHANGELOG.md +++ b/build_runner/CHANGELOG.md @@ -1,5 +1,6 @@ -## 2.2.1-dev +## 2.2.1 +- Allow the latest `package:analyzer`. - Stop ignoring the no_leading_underscores_for_library_prefixes lint in generated build scripts, code_builder now does this for you. diff --git a/build_runner/pubspec.yaml b/build_runner/pubspec.yaml index d469841dc..0bfdf1f5e 100644 --- a/build_runner/pubspec.yaml +++ b/build_runner/pubspec.yaml @@ -1,5 +1,5 @@ name: build_runner -version: 2.2.1-dev +version: 2.2.1 description: A build system for Dart code generation and modular compilation. repository: https://github.com/dart-lang/build/tree/master/build_runner @@ -9,7 +9,7 @@ environment: dependencies: args: ^2.0.0 async: ^2.5.0 - analyzer: ">=1.4.0 <5.0.0" + analyzer: '>=4.4.0 <6.0.0' build: ">=2.1.0 <2.4.0" build_config: ">=1.1.0 <1.2.0" build_daemon: ^3.1.0 diff --git a/build_runner_core/pubspec.yaml b/build_runner_core/pubspec.yaml index 57f63f136..0dc166e7b 100644 --- a/build_runner_core/pubspec.yaml +++ b/build_runner_core/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: yaml: ^3.0.0 dev_dependencies: - analyzer: ^4.6.0 + analyzer: '>=4.4.0 <6.0.0' build_runner: ^2.0.0 build_test: ^2.0.0 lints: '>=1.0.0 <3.0.0' diff --git a/build_test/pubspec.yaml b/build_test/pubspec.yaml index b112ac5d2..1d6cf824d 100644 --- a/build_test/pubspec.yaml +++ b/build_test/pubspec.yaml @@ -24,6 +24,6 @@ dependencies: watcher: ^1.0.0 dev_dependencies: - analyzer: ^4.6.0 + analyzer: '>=4.4.0 <6.0.0' collection: ^1.15.0 lints: '>=1.0.0 <3.0.0' diff --git a/build_vm_compilers/CHANGELOG.md b/build_vm_compilers/CHANGELOG.md index cf381f081..b07dbd8e4 100644 --- a/build_vm_compilers/CHANGELOG.md +++ b/build_vm_compilers/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.0.12-dev +## 1.0.12 + +- Allow the latest `package:analyzer`. ## 1.0.11 diff --git a/build_vm_compilers/pubspec.yaml b/build_vm_compilers/pubspec.yaml index b1913c559..06b5b0e6b 100644 --- a/build_vm_compilers/pubspec.yaml +++ b/build_vm_compilers/pubspec.yaml @@ -1,5 +1,5 @@ name: build_vm_compilers -version: 1.0.12-dev +version: 1.0.12 description: Builder implementations wrapping Dart VM compilers. repository: https://github.com/dart-lang/build/tree/master/build_vm_compilers @@ -7,7 +7,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - analyzer: ^4.4.0 + analyzer: '>=4.4.0 <6.0.0' build: ^2.0.0 build_config: ^1.0.0 build_modules: ^4.0.0 diff --git a/build_web_compilers/CHANGELOG.md b/build_web_compilers/CHANGELOG.md index 7c1de74cb..3a257d398 100644 --- a/build_web_compilers/CHANGELOG.md +++ b/build_web_compilers/CHANGELOG.md @@ -1,4 +1,6 @@ -## 3.2.6-dev +## 3.2.6 + +- Allow the latest `package:analyzer`. ## 3.2.5 diff --git a/build_web_compilers/pubspec.yaml b/build_web_compilers/pubspec.yaml index 90bc0057d..1116a41a6 100644 --- a/build_web_compilers/pubspec.yaml +++ b/build_web_compilers/pubspec.yaml @@ -1,5 +1,5 @@ name: build_web_compilers -version: 3.2.6-dev +version: 3.2.6 description: Builder implementations wrapping Dart compilers. repository: https://github.com/dart-lang/build/tree/master/build_web_compilers @@ -7,7 +7,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - analyzer: ^4.4.0 + analyzer: '>=4.4.0 <6.0.0' archive: ^3.0.0 bazel_worker: ^1.0.0 build: ^2.0.0 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index c7b0aa87c..1f1ac98b8 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - analyzer: ">=2.0.0 <5.0.0" + analyzer: ">=2.0.0 <6.0.0" build: ^2.0.0 # Not imported in code, but used to constrain `build.yaml` requirements build_config: ^1.0.0 From 0242f2fde1357c0b213ad241c3b827cf5192ab5b Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 12 Sep 2022 17:30:17 -0700 Subject: [PATCH 2/7] Bump min SDK for pkg:build --- .github/workflows/dart.yml | 24 ++++++++++++------------ build/CHANGELOG.md | 1 + build/pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 56d3c9271..cd9367181 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_and_format; linux; Dart 2.14.0; PKG: build; `dart analyze --fatal-infos .`" + name: "analyze_and_format; linux; Dart 2.17.0; PKG: build; `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:build;commands:analyze_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:build;commands:analyze_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:build - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:build + os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: - sdk: "2.14.0" + sdk: "2.17.0" - id: checkout name: Checkout repository uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b @@ -448,23 +448,23 @@ jobs: if: "always() && steps._test_null_safety_pub_upgrade.conclusion == 'success'" working-directory: _test_null_safety job_009: - name: "unit_test; linux; Dart 2.14.0; PKG: build; `dart test --test-randomize-ordering-seed=random`" + name: "unit_test; linux; Dart 2.17.0; PKG: build; `dart test --test-randomize-ordering-seed=random`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:build;commands:test_04" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:build;commands:test_04" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:build - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:build + os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: - sdk: "2.14.0" + sdk: "2.17.0" - id: checkout name: Checkout repository uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b @@ -1154,13 +1154,13 @@ jobs: - job_007 - job_008 job_027: - name: "unit_test; windows; Dart 2.14.0; PKG: build; `dart test --test-randomize-ordering-seed=random`" + name: "unit_test; windows; Dart 2.17.0; PKG: build; `dart test --test-randomize-ordering-seed=random`" runs-on: windows-latest steps: - name: Setup Dart SDK uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: - sdk: "2.14.0" + sdk: "2.17.0" - id: checkout name: Checkout repository uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b diff --git a/build/CHANGELOG.md b/build/CHANGELOG.md index 90653cbf7..2bdb11ffb 100644 --- a/build/CHANGELOG.md +++ b/build/CHANGELOG.md @@ -1,6 +1,7 @@ ## 2.3.1 - Allow the latest `package:analyzer`. +- Bump min sdk to 2.17.0. ## 2.3.0 diff --git a/build/pubspec.yaml b/build/pubspec.yaml index c1833b242..93ce77d5f 100644 --- a/build/pubspec.yaml +++ b/build/pubspec.yaml @@ -4,7 +4,7 @@ description: A package for authoring build_runner compatible code generators. repository: https://github.com/dart-lang/build/tree/master/build environment: - sdk: ">=2.14.0 <3.0.0" + sdk: ">=2.17.0 <3.0.0" dependencies: analyzer: ">=1.5.0 <6.0.0" From 25cd42a6a61197b174f73b5655532066c6abe361 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 12 Sep 2022 17:33:16 -0700 Subject: [PATCH 3/7] fix newly enabled lint --- build/lib/src/builder/file_deleting_builder.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/src/builder/file_deleting_builder.dart b/build/lib/src/builder/file_deleting_builder.dart index 639f7d3b4..72004c4ca 100644 --- a/build/lib/src/builder/file_deleting_builder.dart +++ b/build/lib/src/builder/file_deleting_builder.dart @@ -24,7 +24,7 @@ class FileDeletingBuilder implements PostProcessBuilder { FileDeletingBuilder.withExcludes( this.inputExtensions, Iterable exclude, {this.isEnabled = true}) - : exclude = exclude.map((s) => Glob(s)).toList(); + : exclude = exclude.map(Glob.new).toList(); @override FutureOr build(PostProcessBuildStep buildStep) { From 41e7a3fb7e0ec7ec98b0feea1ae30df096d80599 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 13 Sep 2022 10:10:10 -0700 Subject: [PATCH 4/7] drop dep overrides --- build/pubspec.yaml | 6 ------ build_resolvers/pubspec.yaml | 4 ---- build_runner_core/pubspec.yaml | 4 ---- example/pubspec.yaml | 6 ------ 4 files changed, 20 deletions(-) diff --git a/build/pubspec.yaml b/build/pubspec.yaml index 93ce77d5f..11ccb90b6 100644 --- a/build/pubspec.yaml +++ b/build/pubspec.yaml @@ -21,9 +21,3 @@ dev_dependencies: build_test: ^2.0.0 lints: '>=1.0.0 <3.0.0' test: ^1.16.0 - -dependency_overrides: - build_resolvers: - path: ../build_resolvers - build_test: - path: ../build_test diff --git a/build_resolvers/pubspec.yaml b/build_resolvers/pubspec.yaml index 14f0bd979..093daeafc 100644 --- a/build_resolvers/pubspec.yaml +++ b/build_resolvers/pubspec.yaml @@ -24,7 +24,3 @@ dev_dependencies: lints: '>=1.0.0 <3.0.0' test: ^1.16.0 build_test: ^2.0.0 - -dependency_overrides: - build: - path: ../build diff --git a/build_runner_core/pubspec.yaml b/build_runner_core/pubspec.yaml index 0dc166e7b..a23e20e93 100644 --- a/build_runner_core/pubspec.yaml +++ b/build_runner_core/pubspec.yaml @@ -37,7 +37,3 @@ dev_dependencies: test_process: ^2.0.0 _test_common: path: ../_test_common - -dependency_overrides: - build: - path: ../build diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1f1ac98b8..d0205f963 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -13,9 +13,3 @@ dev_dependencies: build_runner: ^2.0.0 build_web_compilers: ^3.0.0 lints: '>=1.0.0 <3.0.0' - -dependency_overrides: - build: - path: ../build - build_runner_core: - path: ../build_runner_core From ff0ec5921371723db00c8582f5746f41db7cad97 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 13 Sep 2022 10:21:15 -0700 Subject: [PATCH 5/7] Update build_resolvers/pubspec.yaml Co-authored-by: Nate Bosch --- build_resolvers/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_resolvers/pubspec.yaml b/build_resolvers/pubspec.yaml index 093daeafc..275acab8f 100644 --- a/build_resolvers/pubspec.yaml +++ b/build_resolvers/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - analyzer: '>=4.4.0 <6.0.0' + analyzer: '>=4.6.0 <6.0.0' async: ^2.5.0 build: ^2.0.0 crypto: ^3.0.0 From 9e61eafbb080075029a7ae499b959e4508047cf4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 13 Sep 2022 10:21:21 -0700 Subject: [PATCH 6/7] Update build_test/pubspec.yaml Co-authored-by: Nate Bosch --- build_test/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_test/pubspec.yaml b/build_test/pubspec.yaml index 1d6cf824d..097c32339 100644 --- a/build_test/pubspec.yaml +++ b/build_test/pubspec.yaml @@ -24,6 +24,6 @@ dependencies: watcher: ^1.0.0 dev_dependencies: - analyzer: '>=4.4.0 <6.0.0' + analyzer: '>=4.6.0 <6.0.0' collection: ^1.15.0 lints: '>=1.0.0 <3.0.0' From 50d371ad65fae9cbb0fdd23d4fce994c93065eb3 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 13 Sep 2022 10:21:25 -0700 Subject: [PATCH 7/7] Update build_runner_core/pubspec.yaml Co-authored-by: Nate Bosch --- build_runner_core/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_runner_core/pubspec.yaml b/build_runner_core/pubspec.yaml index a23e20e93..824c5854c 100644 --- a/build_runner_core/pubspec.yaml +++ b/build_runner_core/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: yaml: ^3.0.0 dev_dependencies: - analyzer: '>=4.4.0 <6.0.0' + analyzer: '>=4.6.0 <6.0.0' build_runner: ^2.0.0 build_test: ^2.0.0 lints: '>=1.0.0 <3.0.0'