Skip to content

feat: Move _gax functionality to _rpc#67

Merged
brianquinlan merged 6 commits intogoogleapis:mainfrom
brianquinlan:no_gax
Oct 30, 2025
Merged

feat: Move _gax functionality to _rpc#67
brianquinlan merged 6 commits intogoogleapis:mainfrom
brianquinlan:no_gax

Conversation

@brianquinlan
Copy link
Copy Markdown
Contributor

@brianquinlan brianquinlan commented Oct 30, 2025

Changes:

  • move _gax functionality and tests to _rpc
  • deprecate _gax
  • update various .sidekick.toml files
  • remove _gax tests from CI

Relies on googleapis/librarian#2713

Changes:
- move `_gax` functionality and tests to `_rpc`
- update various .sidekick.toml files
- remove `_gax` tests from CI
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively moves the functionality from google_cloud_gax to google_cloud_rpc and marks the google_cloud_gax package as deprecated. The changes are comprehensive, covering code, tests, and configuration files. My review includes a few suggestions to improve code hygiene by avoiding imports of internal files from lib/src, which is a standard Dart convention. I've also noted that the README for the deprecated package could be clearer by removing the usage example. Overall, this is a solid refactoring effort.

Copy link
Copy Markdown
Contributor

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

lgtm

I like the gax deprecation + re-export of rpc technique. One question in-line about the client name.

We now only have packages in generated/. Longer term, we could keep packages there, move them to packages/, or move them to something like pkgs/. The split had originally been to keep generated packages separate from hand-written ones for hygiene. Not sure if we'll end up w/ any other hand-written ones living in this repo (auth? firebase?).

extension on JsonEncodable {
String get _asEncodedJson => jsonEncode(toJson());
}
export 'package:google_cloud_rpc/service_client.dart';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, exporting the symbols from here is a good idea.

const String _clientKey = 'x-goog-api-client';

// ignore: prefer_const_declarations
final String _clientName = 'gl-dart/$clientDartVersion gax/$gaxVersion';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just double checking that we still want our client name to contain 'gax' (gl-dart/0.x.0 gax/0.2.0).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I filed an issue where I want to get this version from the sidekick configuration. It might also make sense to include the name of the actual package that we are making the call on behalf of. I need to think about that a bit.

@brianquinlan
Copy link
Copy Markdown
Contributor Author

lgtm

I like the gax deprecation + re-export of rpc technique. One question in-line about the client name.

We now only have packages in generated/. Longer term, we could keep packages there, move them to packages/, or move them to something like pkgs/. The split had originally been to keep generated packages separate from hand-written ones for hygiene. Not sure if we'll end up w/ any other hand-written ones living in this repo (auth? firebase?).

I think that we will have hand written APIs in this repo at some point. Maybe "genai" or maybe something like pubsub.

@brianquinlan brianquinlan merged commit ab42a81 into googleapis:main Oct 30, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants