From e4e0885ca94a83bb7881189e8c647b5127a9ee87 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 11 Dec 2024 02:34:52 +0800 Subject: [PATCH 1/4] Update versions and constraints for Dart 3.6 --- examples/analysis/pubspec.yaml | 2 +- examples/analysis_alt/pubspec.yaml | 2 +- examples/analysis_options.yaml | 1 + examples/async_await/pubspec.yaml | 2 +- examples/build_runner_usage/pubspec.yaml | 4 ++-- examples/cli/pubspec.yaml | 2 +- examples/concurrency/pubspec.yaml | 2 +- examples/create_libraries/pubspec.yaml | 2 +- examples/extension_methods/pubspec.yaml | 2 +- examples/fetch_data/pubspec.yaml | 2 +- examples/futures/pubspec.yaml | 2 +- examples/html/pubspec.yaml | 2 +- examples/iterables/pubspec.yaml | 2 +- examples/language/pubspec.yaml | 2 +- examples/misc/pubspec.yaml | 2 +- examples/non_promotion/pubspec.yaml | 2 +- examples/pubspec.yaml | 2 +- examples/type_system/pubspec.yaml | 2 +- examples/util/pubspec.yaml | 2 +- examples/vector_victor/pubspec.yaml | 2 +- pubspec.yaml | 2 +- src/_data/site.yml | 2 +- src/content/effective-dart/documentation.md | 2 +- src/content/tools/build_runner.md | 2 +- src/content/tools/pub/dependencies.md | 2 +- src/content/tools/pub/packages.md | 6 +++--- src/content/tools/webdev.md | 2 +- src/content/tutorials/server/cmdline.md | 4 ++-- tool/dart_site/pubspec.yaml | 6 +++--- tool/get-dart/archive/pubspec.yaml | 4 ++-- tool/get-dart/dart_sdk_archive/pubspec.yaml | 8 ++++---- tool/get-dart/pubspec.yaml | 2 +- tool/get-dart/sdk_builds/pubspec.yaml | 2 +- 33 files changed, 43 insertions(+), 42 deletions(-) diff --git a/examples/analysis/pubspec.yaml b/examples/analysis/pubspec.yaml index 2ba9bd1f81..223cf6cc43 100644 --- a/examples/analysis/pubspec.yaml +++ b/examples/analysis/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: examples_util: {path: ../util} diff --git a/examples/analysis_alt/pubspec.yaml b/examples/analysis_alt/pubspec.yaml index 4986e3b6d3..038e595def 100644 --- a/examples/analysis_alt/pubspec.yaml +++ b/examples/analysis_alt/pubspec.yaml @@ -3,4 +3,4 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 diff --git a/examples/analysis_options.yaml b/examples/analysis_options.yaml index 2773ca43db..9032a094cc 100644 --- a/examples/analysis_options.yaml +++ b/examples/analysis_options.yaml @@ -28,3 +28,4 @@ linter: - unnecessary_library_directive - unnecessary_null_aware_operator_on_extension_on_nullable - use_enums + - use_truncating_division diff --git a/examples/async_await/pubspec.yaml b/examples/async_await/pubspec.yaml index d2bf1d7905..e3f1ce5b59 100644 --- a/examples/async_await/pubspec.yaml +++ b/examples/async_await/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: examples_util: {path: ../util} diff --git a/examples/build_runner_usage/pubspec.yaml b/examples/build_runner_usage/pubspec.yaml index 926eb66490..e3df7c8e04 100644 --- a/examples/build_runner_usage/pubspec.yaml +++ b/examples/build_runner_usage/pubspec.yaml @@ -3,9 +3,9 @@ description: dart.dev build_runner example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dev_dependencies: args: ^2.5.0 - build_runner: ^2.4.12 + build_runner: ^2.4.13 build_test: ^2.2.2 diff --git a/examples/cli/pubspec.yaml b/examples/cli/pubspec.yaml index 7de784625f..2e0a640977 100644 --- a/examples/cli/pubspec.yaml +++ b/examples/cli/pubspec.yaml @@ -3,7 +3,7 @@ description: Examples for CLI tutorials on dart.dev resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: args: ^2.5.0 diff --git a/examples/concurrency/pubspec.yaml b/examples/concurrency/pubspec.yaml index 28361c8c86..ab3f6bab8e 100644 --- a/examples/concurrency/pubspec.yaml +++ b/examples/concurrency/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: http: any diff --git a/examples/create_libraries/pubspec.yaml b/examples/create_libraries/pubspec.yaml index 41cbedfbea..26934bd747 100644 --- a/examples/create_libraries/pubspec.yaml +++ b/examples/create_libraries/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dev_dependencies: test: ^1.25.8 diff --git a/examples/extension_methods/pubspec.yaml b/examples/extension_methods/pubspec.yaml index 32de04ef12..3a42ed443a 100644 --- a/examples/extension_methods/pubspec.yaml +++ b/examples/extension_methods/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dev_dependencies: test: ^1.25.8 diff --git a/examples/fetch_data/pubspec.yaml b/examples/fetch_data/pubspec.yaml index d177ba83a1..bee059b54a 100644 --- a/examples/fetch_data/pubspec.yaml +++ b/examples/fetch_data/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: http: ^1.2.2 diff --git a/examples/futures/pubspec.yaml b/examples/futures/pubspec.yaml index 19e5d94c64..4d8b6aad3f 100644 --- a/examples/futures/pubspec.yaml +++ b/examples/futures/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: examples_util: {path: ../util} diff --git a/examples/html/pubspec.yaml b/examples/html/pubspec.yaml index 1271da4170..f2c6bb086e 100644 --- a/examples/html/pubspec.yaml +++ b/examples/html/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dev_dependencies: test: ^1.25.8 diff --git a/examples/iterables/pubspec.yaml b/examples/iterables/pubspec.yaml index d606af2dc3..8e7fbd4415 100644 --- a/examples/iterables/pubspec.yaml +++ b/examples/iterables/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dev_dependencies: examples_util: {path: ../util} diff --git a/examples/language/pubspec.yaml b/examples/language/pubspec.yaml index 6f8ea3651f..77fb5f9acf 100644 --- a/examples/language/pubspec.yaml +++ b/examples/language/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: examples_util: { path: ../util } diff --git a/examples/misc/pubspec.yaml b/examples/misc/pubspec.yaml index c7f2104140..a0d49a3f28 100644 --- a/examples/misc/pubspec.yaml +++ b/examples/misc/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: args: ^2.5.0 diff --git a/examples/non_promotion/pubspec.yaml b/examples/non_promotion/pubspec.yaml index 6c84fef9ee..beb2e7bbe0 100644 --- a/examples/non_promotion/pubspec.yaml +++ b/examples/non_promotion/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: mockito: ^5.4.4 diff --git a/examples/pubspec.yaml b/examples/pubspec.yaml index 45732f8052..566d0808fb 100644 --- a/examples/pubspec.yaml +++ b/examples/pubspec.yaml @@ -2,7 +2,7 @@ name: examples_workspace publish_to: none environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 workspace: - analysis diff --git a/examples/type_system/pubspec.yaml b/examples/type_system/pubspec.yaml index 9c0c54c9b6..a8df6c5c04 100644 --- a/examples/type_system/pubspec.yaml +++ b/examples/type_system/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev type system examples. resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: examples_util: {path: ../util} diff --git a/examples/util/pubspec.yaml b/examples/util/pubspec.yaml index 351e6149f9..3b107bad1b 100644 --- a/examples/util/pubspec.yaml +++ b/examples/util/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.2 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: test: ^1.25.8 diff --git a/examples/vector_victor/pubspec.yaml b/examples/vector_victor/pubspec.yaml index 642891b033..c4441f43ce 100644 --- a/examples/vector_victor/pubspec.yaml +++ b/examples/vector_victor/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 # dependencies: # path: ^1.8.0 diff --git a/pubspec.yaml b/pubspec.yaml index bba13a86f9..29c6889bdb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none homepage: https://dart.dev environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 workspace: - tool/dart_site diff --git a/src/_data/site.yml b/src/_data/site.yml index 7b962dc8f9..9872ff5173 100644 --- a/src/_data/site.yml +++ b/src/_data/site.yml @@ -40,4 +40,4 @@ show_banner: true # in the `firebase.json` redirect rule.) og_image_vers: "?2" -sdkVersion: 3.5.4 +sdkVersion: 3.6.0 diff --git a/src/content/effective-dart/documentation.md b/src/content/effective-dart/documentation.md index b7d0e8d29c..1432e85a0b 100644 --- a/src/content/effective-dart/documentation.md +++ b/src/content/effective-dart/documentation.md @@ -101,7 +101,7 @@ up. ### PREFER writing doc comments for public APIs -{% render 'linter-rule-mention.md', rules:'package_api_docs, public_member_api_docs' %} +{% render 'linter-rule-mention.md', rules:'public_member_api_docs' %} You don't have to document every single library, top-level variable, type, and member, but you should document most of them. diff --git a/src/content/tools/build_runner.md b/src/content/tools/build_runner.md index c98fb9994a..85a250e4a7 100644 --- a/src/content/tools/build_runner.md +++ b/src/content/tools/build_runner.md @@ -38,7 +38,7 @@ to your app's pubspec: ```yaml dev_dependencies: # ··· - build_runner: ^2.4.12 + build_runner: ^2.4.13 build_test: ^2.2.2 ``` diff --git a/src/content/tools/pub/dependencies.md b/src/content/tools/pub/dependencies.md index e6c7812b78..fea5a532a5 100644 --- a/src/content/tools/pub/dependencies.md +++ b/src/content/tools/pub/dependencies.md @@ -472,7 +472,7 @@ resemble the following: ```yaml dev_dependencies: - build_runner: ^2.4.12 + build_runner: ^2.4.13 lints: ^2.1.1 test: ^1.25.8 ``` diff --git a/src/content/tools/pub/packages.md b/src/content/tools/pub/packages.md index 6019984918..bc5c5a49e9 100644 --- a/src/content/tools/pub/packages.md +++ b/src/content/tools/pub/packages.md @@ -44,14 +44,14 @@ name: my_app ``` Here is an example of a pubspec that declares dependencies on -two packages (`js` and `intl`) that are hosted on the pub.dev site: +two packages (`intl` and `path`) that are hosted on the pub.dev site: ```yaml name: my_app dependencies: - js: ^0.6.0 - intl: ^0.17.0 + intl: ^0.20.0 + path: ^1.9.1 ``` To update the `pubspec.yaml` file, without manual editing, diff --git a/src/content/tools/webdev.md b/src/content/tools/webdev.md index d8964888d3..c7629af444 100644 --- a/src/content/tools/webdev.md +++ b/src/content/tools/webdev.md @@ -44,7 +44,7 @@ your app's `pubspec.yaml` file: ```yaml dev_dependencies: # ··· - build_runner: ^2.4.12 + build_runner: ^2.4.13 build_test: ^2.2.2 build_web_compilers: ^4.0.11 ``` diff --git a/src/content/tutorials/server/cmdline.md b/src/content/tutorials/server/cmdline.md index db8ae40035..6ce6cca8cd 100644 --- a/src/content/tutorials/server/cmdline.md +++ b/src/content/tutorials/server/cmdline.md @@ -190,7 +190,7 @@ $ dart run bin/dcat.dart -n pubspec.yaml 4 # repository: https://github.com/my_org/my_repo 5 6 environment: -7 sdk: ^3.5.4 +7 sdk: ^3.6.0 8 9 # Add regular dependencies here. 10 dependencies: @@ -198,7 +198,7 @@ $ dart run bin/dcat.dart -n pubspec.yaml 12 # path: ^1.8.0 13 14 dev_dependencies: -15 lints: ^4.0.0 +15 lints: ^5.0.0 16 test: ^1.24.0 ``` diff --git a/tool/dart_site/pubspec.yaml b/tool/dart_site/pubspec.yaml index 29e8ef2edf..2f7430555b 100644 --- a/tool/dart_site/pubspec.yaml +++ b/tool/dart_site/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: args: ^2.5.0 @@ -12,8 +12,8 @@ dependencies: path: ../../site-shared/pkgs/excerpter fbh_front_matter: ^0.0.1 html_unescape: ^2.0.0 - intl: ^0.19.0 - io: ^1.0.4 + intl: ^0.20.0 + io: ^1.0.5 linkcheck: ^3.0.0 markdown: ^7.2.2 path: ^1.9.0 diff --git a/tool/get-dart/archive/pubspec.yaml b/tool/get-dart/archive/pubspec.yaml index 03163b71d6..14f2207b5f 100644 --- a/tool/get-dart/archive/pubspec.yaml +++ b/tool/get-dart/archive/pubspec.yaml @@ -4,12 +4,12 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: dart_sdk_archive: path: ../dart_sdk_archive dev_dependencies: - build_runner: ^2.4.12 + build_runner: ^2.4.13 build_web_compilers: ^4.0.11 diff --git a/tool/get-dart/dart_sdk_archive/pubspec.yaml b/tool/get-dart/dart_sdk_archive/pubspec.yaml index 83e905c0cb..86dcb195d7 100644 --- a/tool/get-dart/dart_sdk_archive/pubspec.yaml +++ b/tool/get-dart/dart_sdk_archive/pubspec.yaml @@ -4,19 +4,19 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: http: ^1.2.2 - intl: ^0.19.0 + intl: ^0.20.0 path: ^1.9.0 pub_semver: ^2.1.4 sdk_builds: path: ../sdk_builds - web: ^1.0.0 + web: ^1.1.0 dev_dependencies: - build_runner: ^2.4.12 + build_runner: ^2.4.13 build_web_compilers: ^4.0.11 dart_style: ^2.3.7 grinder: ^0.9.5 diff --git a/tool/get-dart/pubspec.yaml b/tool/get-dart/pubspec.yaml index 15b7aa1fe1..b2d14f05cb 100644 --- a/tool/get-dart/pubspec.yaml +++ b/tool/get-dart/pubspec.yaml @@ -2,7 +2,7 @@ name: get_dart publish_to: none environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 workspace: - archive diff --git a/tool/get-dart/sdk_builds/pubspec.yaml b/tool/get-dart/sdk_builds/pubspec.yaml index 9bdbe94e56..f7631b7261 100644 --- a/tool/get-dart/sdk_builds/pubspec.yaml +++ b/tool/get-dart/sdk_builds/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.3 + sdk: ^3.6.0-0 dependencies: googleapis: ^13.2.0 From 2fbf6666c08015a3b90004abd84f18e51cc485fe Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 12 Dec 2024 02:27:59 +0800 Subject: [PATCH 2/4] Use stable 3.6 version --- examples/analysis/pubspec.yaml | 2 +- examples/analysis_alt/pubspec.yaml | 2 +- examples/async_await/pubspec.yaml | 2 +- examples/build_runner_usage/pubspec.yaml | 2 +- examples/cli/pubspec.yaml | 2 +- examples/concurrency/pubspec.yaml | 2 +- examples/create_libraries/pubspec.yaml | 2 +- examples/extension_methods/pubspec.yaml | 2 +- examples/fetch_data/pubspec.yaml | 2 +- examples/futures/pubspec.yaml | 2 +- examples/html/pubspec.yaml | 2 +- examples/iterables/pubspec.yaml | 2 +- examples/language/pubspec.yaml | 2 +- examples/misc/pubspec.yaml | 2 +- examples/non_promotion/pubspec.yaml | 2 +- examples/pubspec.yaml | 2 +- examples/type_system/pubspec.yaml | 2 +- examples/util/pubspec.yaml | 2 +- examples/vector_victor/pubspec.yaml | 2 +- pubspec.yaml | 2 +- tool/dart_site/pubspec.yaml | 2 +- tool/get-dart/archive/pubspec.yaml | 2 +- tool/get-dart/dart_sdk_archive/pubspec.yaml | 2 +- tool/get-dart/pubspec.yaml | 2 +- tool/get-dart/sdk_builds/pubspec.yaml | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/examples/analysis/pubspec.yaml b/examples/analysis/pubspec.yaml index 223cf6cc43..872fcd2eee 100644 --- a/examples/analysis/pubspec.yaml +++ b/examples/analysis/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: examples_util: {path: ../util} diff --git a/examples/analysis_alt/pubspec.yaml b/examples/analysis_alt/pubspec.yaml index 038e595def..42ca4573d9 100644 --- a/examples/analysis_alt/pubspec.yaml +++ b/examples/analysis_alt/pubspec.yaml @@ -3,4 +3,4 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 diff --git a/examples/async_await/pubspec.yaml b/examples/async_await/pubspec.yaml index e3f1ce5b59..d37ad55fd9 100644 --- a/examples/async_await/pubspec.yaml +++ b/examples/async_await/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: examples_util: {path: ../util} diff --git a/examples/build_runner_usage/pubspec.yaml b/examples/build_runner_usage/pubspec.yaml index e3df7c8e04..7ece9c0850 100644 --- a/examples/build_runner_usage/pubspec.yaml +++ b/examples/build_runner_usage/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev build_runner example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dev_dependencies: args: ^2.5.0 diff --git a/examples/cli/pubspec.yaml b/examples/cli/pubspec.yaml index 2e0a640977..65b3888014 100644 --- a/examples/cli/pubspec.yaml +++ b/examples/cli/pubspec.yaml @@ -3,7 +3,7 @@ description: Examples for CLI tutorials on dart.dev resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: args: ^2.5.0 diff --git a/examples/concurrency/pubspec.yaml b/examples/concurrency/pubspec.yaml index ab3f6bab8e..68dec19db8 100644 --- a/examples/concurrency/pubspec.yaml +++ b/examples/concurrency/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: http: any diff --git a/examples/create_libraries/pubspec.yaml b/examples/create_libraries/pubspec.yaml index 26934bd747..be4f5d01ca 100644 --- a/examples/create_libraries/pubspec.yaml +++ b/examples/create_libraries/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dev_dependencies: test: ^1.25.8 diff --git a/examples/extension_methods/pubspec.yaml b/examples/extension_methods/pubspec.yaml index 3a42ed443a..027319999a 100644 --- a/examples/extension_methods/pubspec.yaml +++ b/examples/extension_methods/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dev_dependencies: test: ^1.25.8 diff --git a/examples/fetch_data/pubspec.yaml b/examples/fetch_data/pubspec.yaml index bee059b54a..421de093c5 100644 --- a/examples/fetch_data/pubspec.yaml +++ b/examples/fetch_data/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: http: ^1.2.2 diff --git a/examples/futures/pubspec.yaml b/examples/futures/pubspec.yaml index 4d8b6aad3f..0188006662 100644 --- a/examples/futures/pubspec.yaml +++ b/examples/futures/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: examples_util: {path: ../util} diff --git a/examples/html/pubspec.yaml b/examples/html/pubspec.yaml index f2c6bb086e..1f665528c8 100644 --- a/examples/html/pubspec.yaml +++ b/examples/html/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dev_dependencies: test: ^1.25.8 diff --git a/examples/iterables/pubspec.yaml b/examples/iterables/pubspec.yaml index 8e7fbd4415..f693fab929 100644 --- a/examples/iterables/pubspec.yaml +++ b/examples/iterables/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dev_dependencies: examples_util: {path: ../util} diff --git a/examples/language/pubspec.yaml b/examples/language/pubspec.yaml index 77fb5f9acf..f367d92378 100644 --- a/examples/language/pubspec.yaml +++ b/examples/language/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: examples_util: { path: ../util } diff --git a/examples/misc/pubspec.yaml b/examples/misc/pubspec.yaml index a0d49a3f28..c27ffea177 100644 --- a/examples/misc/pubspec.yaml +++ b/examples/misc/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev example code. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: args: ^2.5.0 diff --git a/examples/non_promotion/pubspec.yaml b/examples/non_promotion/pubspec.yaml index beb2e7bbe0..6994fdb3f9 100644 --- a/examples/non_promotion/pubspec.yaml +++ b/examples/non_promotion/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: mockito: ^5.4.4 diff --git a/examples/pubspec.yaml b/examples/pubspec.yaml index 566d0808fb..baaa0919ca 100644 --- a/examples/pubspec.yaml +++ b/examples/pubspec.yaml @@ -2,7 +2,7 @@ name: examples_workspace publish_to: none environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 workspace: - analysis diff --git a/examples/type_system/pubspec.yaml b/examples/type_system/pubspec.yaml index a8df6c5c04..2cec7e7cf1 100644 --- a/examples/type_system/pubspec.yaml +++ b/examples/type_system/pubspec.yaml @@ -3,7 +3,7 @@ description: dart.dev type system examples. resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: examples_util: {path: ../util} diff --git a/examples/util/pubspec.yaml b/examples/util/pubspec.yaml index 3b107bad1b..bf3bc17d75 100644 --- a/examples/util/pubspec.yaml +++ b/examples/util/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.2 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: test: ^1.25.8 diff --git a/examples/vector_victor/pubspec.yaml b/examples/vector_victor/pubspec.yaml index c4441f43ce..ee70122dc0 100644 --- a/examples/vector_victor/pubspec.yaml +++ b/examples/vector_victor/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 # dependencies: # path: ^1.8.0 diff --git a/pubspec.yaml b/pubspec.yaml index 29c6889bdb..211dd166b3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none homepage: https://dart.dev environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 workspace: - tool/dart_site diff --git a/tool/dart_site/pubspec.yaml b/tool/dart_site/pubspec.yaml index 2f7430555b..4c0a868bb7 100644 --- a/tool/dart_site/pubspec.yaml +++ b/tool/dart_site/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: args: ^2.5.0 diff --git a/tool/get-dart/archive/pubspec.yaml b/tool/get-dart/archive/pubspec.yaml index 14f2207b5f..99597a7063 100644 --- a/tool/get-dart/archive/pubspec.yaml +++ b/tool/get-dart/archive/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: dart_sdk_archive: diff --git a/tool/get-dart/dart_sdk_archive/pubspec.yaml b/tool/get-dart/dart_sdk_archive/pubspec.yaml index 86dcb195d7..4491468db5 100644 --- a/tool/get-dart/dart_sdk_archive/pubspec.yaml +++ b/tool/get-dart/dart_sdk_archive/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: http: ^1.2.2 diff --git a/tool/get-dart/pubspec.yaml b/tool/get-dart/pubspec.yaml index b2d14f05cb..461f0d1a8b 100644 --- a/tool/get-dart/pubspec.yaml +++ b/tool/get-dart/pubspec.yaml @@ -2,7 +2,7 @@ name: get_dart publish_to: none environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 workspace: - archive diff --git a/tool/get-dart/sdk_builds/pubspec.yaml b/tool/get-dart/sdk_builds/pubspec.yaml index f7631b7261..1fc87eff03 100644 --- a/tool/get-dart/sdk_builds/pubspec.yaml +++ b/tool/get-dart/sdk_builds/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: googleapis: ^13.2.0 From a4bbe50c42fd7cf80473268917f7808040343c10 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 12 Dec 2024 02:30:20 +0800 Subject: [PATCH 3/4] Add exclusion for sdkVersion variable --- tool/config/site_variable_scanner.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/config/site_variable_scanner.yaml b/tool/config/site_variable_scanner.yaml index d5aa392c70..ed7ca86eac 100644 --- a/tool/config/site_variable_scanner.yaml +++ b/tool/config/site_variable_scanner.yaml @@ -21,8 +21,9 @@ yaml_variable_scanner: - ^site\.url$ - ^site\.branch$ - ^site\.show_banner$ + - ^site\.sdkVersion$ - ^site\.og_image_vers$ - + # File path for check file contents # # (Glob Syntax) From b3e65588d9da0333d967d49f806bcb4cbf990a2d Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 12 Dec 2024 02:56:04 +0800 Subject: [PATCH 4/4] Simplify analyzer dart command by using a single workspace --- examples/pubspec.yaml | 1 + pubspec.yaml | 2 + .../lib/src/commands/analyze_dart.dart | 47 ++++++------------- tool/get-dart/pubspec.yaml | 1 + 4 files changed, 18 insertions(+), 33 deletions(-) diff --git a/examples/pubspec.yaml b/examples/pubspec.yaml index baaa0919ca..e5eff83499 100644 --- a/examples/pubspec.yaml +++ b/examples/pubspec.yaml @@ -1,6 +1,7 @@ name: examples_workspace publish_to: none +resolution: workspace environment: sdk: ^3.6.0 diff --git a/pubspec.yaml b/pubspec.yaml index 211dd166b3..b7b38f13d2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,6 +7,8 @@ environment: workspace: - tool/dart_site + - examples + - tool/get-dart dev_dependencies: dart_site: diff --git a/tool/dart_site/lib/src/commands/analyze_dart.dart b/tool/dart_site/lib/src/commands/analyze_dart.dart index 9937229f44..ccaf178944 100644 --- a/tool/dart_site/lib/src/commands/analyze_dart.dart +++ b/tool/dart_site/lib/src/commands/analyze_dart.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:args/command_runner.dart'; -import 'package:path/path.dart' as path; import '../utils.dart'; @@ -35,44 +34,26 @@ final class AnalyzeDartCommand extends Command { int analyzeDart({ bool verboseLogging = false, }) { - final directoriesToAnalyze = [ - path.join('tool', 'dart_site'), - path.join('examples'), - path.join('tool', 'get-dart'), - ]; - if (!verboseLogging) { print('Analyzing code...'); } - for (final directory in directoriesToAnalyze) { - if (verboseLogging) { - print("Analyzing code in '$directory' directory..."); - } - - if (runPubGetIfNecessary(directory) case final pubGetResult - when pubGetResult != 0) { - return pubGetResult; - } - - final dartAnalyzeOutput = Process.runSync( - Platform.executable, - const ['analyze', '.'], - workingDirectory: directory, - ); + final dartAnalyzeOutput = Process.runSync( + Platform.executable, + const ['analyze'], + ); - if (dartAnalyzeOutput.exitCode != 0) { - final normalOutput = dartAnalyzeOutput.stdout.toString(); - final errorOutput = dartAnalyzeOutput.stderr.toString(); + if (dartAnalyzeOutput.exitCode != 0) { + final normalOutput = dartAnalyzeOutput.stdout.toString(); + final errorOutput = dartAnalyzeOutput.stderr.toString(); - stderr.write(normalOutput); - stderr.write(errorOutput); - stderr.writeln("Error: Analysis on '$directory' directory failed."); - return 1; - } else { - if (verboseLogging) { - print("Successfully analyzed code in '$directory' directory!"); - } + stderr.write(normalOutput); + stderr.write(errorOutput); + stderr.writeln('Error: Analysis failed.'); + return 1; + } else { + if (verboseLogging) { + print('Successfully analyzed Dart code!'); } } diff --git a/tool/get-dart/pubspec.yaml b/tool/get-dart/pubspec.yaml index 461f0d1a8b..18c8b341b4 100644 --- a/tool/get-dart/pubspec.yaml +++ b/tool/get-dart/pubspec.yaml @@ -1,6 +1,7 @@ name: get_dart publish_to: none +resolution: workspace environment: sdk: ^3.6.0