[core-util] depend on @typespec/ts-http-runtime
#32700
Draft
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.
Packages impacted by this PR
@azure/core-util
@typespec/ts-http-runtime
Issues associated with this PR
@azure/core-*
and@typespec/ts-http-runtime
#32698Describe the problem that is addressed by this PR
Opening this PR to get initial feedback on the approach, not looking to get it merged immediately. Let me know your thoughts.
This is a proof of concept of how we might deduplicate the Azure and unbranded package without changing the Azure API surface in any meaningful way. This is done by exporting the necessary internals from the unbranded package under a subpath export,
__internal/<package-name>
. The Azure package then wraps these internals and re-exports them. All the internals exported are prefixed with a double underscore to prevent a naming conflict when they are imported by the Azure package, and also to help make sure that none of the internal names show up in the public API of the Azure package.Exporting under the
__internal/<x>
subpath keeps the main API surface of@typespec/ts-http-runtime
clean and focused on the library's core purpose, which is to provide the necessary APIs for code generated from TypeSpec. This necessary surface is much smaller than what the combined Azure Core packages expose today.I'm starting with
core-util
since it's one of the simpler packages to convert. This is because:Other packages are a bit trickier but I've had some initial success with this approach even with these differences.
(more detailed description to come; let me know if any questions!)