[EndpointUri PR 3/4] Update codegen to use the EndpointUrl#7160
Open
alextwoods wants to merge 1 commit into
Open
[EndpointUri PR 3/4] Update codegen to use the EndpointUrl#7160alextwoods wants to merge 1 commit into
alextwoods wants to merge 1 commit into
Conversation
…oviders Update both rules1 (EndpointProviderSpec) and rules2 (CodeGeneratorVisitor) codegen to emit EndpointUrl.fromString() instead of URI.create() or SdkUri.getInstance().create() when building Endpoint objects in generated code. This is a uniform change: all URL expressions now go through EndpointUrl.fromString(urlString), which performs lightweight string splitting instead of full URI parsing. The endpointCaching/SdkUri path is no longer needed since EndpointUrl.fromString() is already cheaper than both URI.create() and SdkUri.
| private final SymbolTable symbolTable; | ||
| private final Map<String, KeyTypePair> knownEndpointAttributes; | ||
| private final Map<String, ComputeScopeTree.Scope> ruleIdToScope; | ||
| private final boolean endpointCaching; |
Contributor
There was a problem hiding this comment.
IfendpointCaching is no longer needed, should we remove it?
zoewangg
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is PR 3/4 for replacing Uri.create in endpoint resolution with the light weight EndpointUrl.
Note: This PR merges to feature/master/endpoint-remove-uri and NOT to master
Previous PRs:
Modifications
Update both rules1 (EndpointProviderSpec) and rules2 (CodeGeneratorVisitor) codegen to emit EndpointUrl.fromString() instead of URI.create() or SdkUri.getInstance().create() when building Endpoint objects in generated code. This is a uniform change: all URL expressions now go through EndpointUrl.fromString(urlString), which performs lightweight string splitting instead of full URI parsing.
The endpointCaching/SdkUri path is no longer needed since EndpointUrl.fromString() is already cheaper than both URI.create() and SdkUri.
Testing
Updated codegen generation files - all existing tests pass (including endpoint resolution) - no new surface area to cover with these changes.
License