Skip to content

Switch to pub workspace #1001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions benchmarks/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -24,7 +26,3 @@ dev_dependencies:
pool: ^1.5.1
protoc_plugin:
path: '../protoc_plugin'

dependency_overrides:
protobuf:
path: "../protobuf"
2 changes: 2 additions & 0 deletions protobuf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 3 additions & 1 deletion protobuf/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
58 changes: 30 additions & 28 deletions protoc_plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

...
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is indented so that it'll be a part of the bulleted list.

* 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

Expand Down
4 changes: 3 additions & 1 deletion protoc_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions protoc_plugin/pubspec_overrides.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: _
publish_to: none
environment:
sdk: ^3.6.0
workspace:
- benchmarks
- protobuf
- protoc_plugin