From 06d52ea41223840cb950369eae8ba5d16349dc18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20A=C4=9Facan?= Date: Mon, 19 May 2025 10:00:15 +0100 Subject: [PATCH 1/3] Switch to pub workspace --- benchmarks/pubspec.yaml | 8 +++----- protobuf/pubspec.yaml | 4 +++- protoc_plugin/pubspec.yaml | 4 +++- protoc_plugin/pubspec_overrides.yaml | 3 --- pubspec.yaml | 8 ++++++++ 5 files changed, 17 insertions(+), 10 deletions(-) delete mode 100644 protoc_plugin/pubspec_overrides.yaml create mode 100644 pubspec.yaml diff --git a/benchmarks/pubspec.yaml b/benchmarks/pubspec.yaml index 14515e426..4c3ec96f9 100644 --- a/benchmarks/pubspec.yaml +++ b/benchmarks/pubspec.yaml @@ -7,7 +7,9 @@ description: Benchmarks for various protobuf functions. publish_to: none environment: - sdk: '>=2.19.0 <3.0.0' + sdk: '^3.6.0' + +resolution: workspace dependencies: # NB. When bumping benchmark_harness check if `benchmark_base.BenchmarkBase` @@ -24,7 +26,3 @@ dev_dependencies: pool: ^1.5.1 protoc_plugin: path: '../protoc_plugin' - -dependency_overrides: - protobuf: - path: "../protobuf" diff --git a/protobuf/pubspec.yaml b/protobuf/pubspec.yaml index 8379e5a01..a18bd4a4f 100644 --- a/protobuf/pubspec.yaml +++ b/protobuf/pubspec.yaml @@ -6,7 +6,9 @@ description: >- repository: https://github.com/google/protobuf.dart/tree/master/protobuf environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '^3.6.0' + +resolution: workspace dependencies: collection: ^1.15.0 diff --git a/protoc_plugin/pubspec.yaml b/protoc_plugin/pubspec.yaml index 7fa23ae97..b65247820 100644 --- a/protoc_plugin/pubspec.yaml +++ b/protoc_plugin/pubspec.yaml @@ -4,7 +4,9 @@ description: A protobuf protoc compiler plugin used to generate Dart code. repository: https://github.com/google/protobuf.dart/tree/master/protoc_plugin environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '^3.6.0' + +resolution: workspace dependencies: collection: ^1.15.0 diff --git a/protoc_plugin/pubspec_overrides.yaml b/protoc_plugin/pubspec_overrides.yaml deleted file mode 100644 index 5cd5685f5..000000000 --- a/protoc_plugin/pubspec_overrides.yaml +++ /dev/null @@ -1,3 +0,0 @@ -dependency_overrides: - protobuf: - path: ../protobuf diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 000000000..82dd031b7 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,8 @@ +name: _ +publish_to: none +environment: + sdk: ^3.6.0 +workspace: + - benchmarks + - protobuf + - protoc_plugin From 0c496d1ad6e2ece4da209aec0c170232838a8272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20A=C4=9Facan?= Date: Mon, 19 May 2025 10:28:15 +0100 Subject: [PATCH 2/3] Regenerate mono_repo setup --- .github/workflows/dart.yml | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index ed8c3abe5..970b7fdf8 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -39,23 +39,23 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "format_analyze; linux; Dart 3.3.0; PKG: protobuf; `dart analyze lib`, `dart analyze test`" + name: "format_analyze; linux; Dart 3.6.0; PKG: protobuf; `dart analyze lib`, `dart analyze test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:analyze_1-analyze_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:protobuf;commands:analyze_1-analyze_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:protobuf + 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@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.3.0" + sdk: "3.6.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -191,23 +191,23 @@ jobs: if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" working-directory: protoc_plugin job_006: - name: "run_tests; linux; Dart 3.3.0; PKG: protobuf; `dart test`" + name: "run_tests; linux; Dart 3.6.0; PKG: protobuf; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:test" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:protobuf;commands:test" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:protobuf + 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@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.3.0" + sdk: "3.6.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -227,23 +227,23 @@ jobs: - job_004 - job_005 job_007: - name: "run_tests; linux; Dart 3.3.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`" + name: "run_tests; linux; Dart 3.6.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protoc_plugin;commands:command_0-command_2-test" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:protoc_plugin;commands:command_0-command_2-test" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protoc_plugin - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:protoc_plugin + 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@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.3.0" + sdk: "3.6.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -351,23 +351,23 @@ jobs: - job_004 - job_005 job_010: - name: "run_tests; osx; Dart 3.3.0; PKG: protobuf; `dart test`" + name: "run_tests; osx; Dart 3.6.0; PKG: protobuf; `dart test`" runs-on: macos-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:macos-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:test" + key: "os:macos-latest;pub-cache-hosted;sdk:3.6.0;packages:protobuf;commands:test" restore-keys: | - os:macos-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf - os:macos-latest;pub-cache-hosted;sdk:3.3.0 + os:macos-latest;pub-cache-hosted;sdk:3.6.0;packages:protobuf + os:macos-latest;pub-cache-hosted;sdk:3.6.0 os:macos-latest;pub-cache-hosted os:macos-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.3.0" + sdk: "3.6.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -423,13 +423,13 @@ jobs: - job_004 - job_005 job_012: - name: "run_tests; windows; Dart 3.3.0; PKG: protobuf; `dart test`" + name: "run_tests; windows; Dart 3.6.0; PKG: protobuf; `dart test`" runs-on: windows-latest steps: - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.3.0" + sdk: "3.6.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 From af79606700e9a9289f555d6716980b28af0d6075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20A=C4=9Facan?= Date: Mon, 19 May 2025 17:20:12 +0100 Subject: [PATCH 3/3] Update changelogs --- protobuf/CHANGELOG.md | 2 ++ protoc_plugin/CHANGELOG.md | 58 ++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/protobuf/CHANGELOG.md b/protobuf/CHANGELOG.md index f71d5c4c1..61f11ba0e 100644 --- a/protobuf/CHANGELOG.md +++ b/protobuf/CHANGELOG.md @@ -1,9 +1,11 @@ ## 4.1.0 * Improve packed field decoding performance. ([#959], [#981]) +* Minimum SDK dependency bumped from 3.3.0 to 3.6.0. ([#1001]) [#959]: https://github.com/google/protobuf.dart/pull/959 [#981]: https://github.com/google/protobuf.dart/pull/981 +[#1001]: https://github.com/google/protobuf.dart/pull/1001 ## 4.0.0 diff --git a/protoc_plugin/CHANGELOG.md b/protoc_plugin/CHANGELOG.md index 7ce0e7bb9..fb1e9403c 100644 --- a/protoc_plugin/CHANGELOG.md +++ b/protoc_plugin/CHANGELOG.md @@ -5,36 +5,38 @@ and write that information to the generated gRPC clients. * Generate dartdocs for grpc services ([#973]). -We now parse and generate code cooresponding to the proto options -`google.api.default_host` and `google.api.oauth_scopes`: - -```proto -service Firestore { - option (google.api.default_host) = "firestore.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/datastore"; - - ... -``` - -Will generate as: - -```dart -class FirestoreClient extends $grpc.Client { - /// The hostname for this service. - static const $core.String defaultHost = 'firestore.googleapis.com'; - - /// OAuth scopes needed for the client. - static const $core.List<$core.String> oauthScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/datastore', - ]; - - ... -``` + We now parse and generate code cooresponding to the proto options + `google.api.default_host` and `google.api.oauth_scopes`: + + ```proto + service Firestore { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + + ... + ``` + + Will generate as: + + ```dart + class FirestoreClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = 'firestore.googleapis.com'; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; + + ... + ``` +* Minimum SDK dependency bumped from 3.3.0 to 3.6.0. ([#1001]) [#973]: https://github.com/google/protobuf.dart/issues/973 +[#1001]: https://github.com/google/protobuf.dart/pull/1001 ## 22.1.0