Skip to content

Conversation

@ershov-konst
Copy link
Contributor

Decorator arguments are not mutated during mutation. Since arguments may contain references to mutated entities in their structure, this leads to errors like this one.

This PR adds mutation of types contained in decorator arguments.

Fixes: #8769

@microsoft-github-policy-service microsoft-github-policy-service bot added compiler:core Issues for @typespec/compiler emitter:openapi3 Issues for @typespec/openapi3 emitter labels Jan 8, 2026
Copy link
Member

@timotheeguerin timotheeguerin left a comment

Choose a reason for hiding this comment

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

Thanks for the investigation and fix!

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@9308
npm i https://pkg.pr.new/microsoft/typespec/@typespec/openapi@9308
npm i https://pkg.pr.new/microsoft/typespec/@typespec/openapi3@9308

commit: 8fd29c8

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Fixed mutation of decorator's argument values

@timotheeguerin timotheeguerin added this pull request to the merge queue Jan 8, 2026
Merged via the queue into microsoft:main with commit e089124 Jan 8, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler emitter:openapi3 Issues for @typespec/openapi3 emitter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: @opExample generation fails in @versioned namespaces with union + enum

2 participants