Skip to content

[emitter-framework] Use internal refkeys for declarations #7205

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

maorleger
Copy link
Member

@maorleger maorleger commented May 1, 2025

Presently the emitter framework defaults refkeys to simply refkey(type), which is quite presumptuous - other declarations may want such a refkey. The emitter framework should use its own internal refkeys to track declarations it knows about.

This PR updates the internal refkey generation for declarations to use the internal refkeys while plumbing the emitter provided refkeys through. In addition, any non-declarations will use internal unique refkeys.

Partially addresses #6919

Copy link
Contributor

github-actions bot commented May 1, 2025

All changed packages have been documented.

  • @typespec/emitter-framework
  • @typespec/http-client-js
Show changes

@typespec/emitter-framework - internal ✏️

Add prefix to all emitter-framework owned refkeys

@typespec/http-client-js - internal ✏️

Add prefix to all emitter-framework owned refkeys

@azure-sdk
Copy link
Collaborator

azure-sdk commented May 1, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@@ -17,15 +17,8 @@ export function Models(props: ModelsProps) {
<ts.SourceFile path={props.path ?? "models.ts"}>
<For each={dataTypes} joiner={"\n"} hardline>
{(type) => {
if ($.model.is(type) && $.model.isHttpFile(type)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Was chatting with @joheredi and this was no longer needed, File is handled just fine as a builtin

@maorleger maorleger requested a review from bterlson May 2, 2025 21:00
@maorleger maorleger enabled auto-merge May 2, 2025 21:21
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