Remove head-as-boolean emitter flag (superseded by TCGC @responseAsBool)#3986
Open
Copilot wants to merge 2 commits into
Open
Remove head-as-boolean emitter flag (superseded by TCGC @responseAsBool)#3986Copilot wants to merge 2 commits into
head-as-boolean emitter flag (superseded by TCGC @responseAsBool)#3986Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/Azure/autorest.typescript/sessions/bd25be6d-f337-4fcb-b1ca-fd7d7c256207 Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove head-as-boolean flag and update related UT case
Remove May 19, 2026
head-as-boolean emitter flag (superseded by TCGC @responseAsBool)
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.
The emitter flag
head-as-booleanduplicates functionality now provided by TCGC's@responseAsBooldecorator, which promotes the operation's response type tobooleandirectly. The flag is removed in favor of the decorator-based approach.Changes
src/lib.ts— Remove"head-as-boolean"fromEmitterOptionsinterface andRLCOptionsSchemasrc/transform/transfromRLCOptions.ts— RemoveheadAsBooleanextraction and propagationsrc/modular/helpers/operationHelpers.ts:isHeadAsBooleanOperation: dropcontextparameter and the legacycontext.rlcOptions?.headAsBooleanfallback; now solely relies on TCGC'sresponse.type.kind === "boolean"signalbuildNonModelResponseTypeDeclaration: remove dead code branch that handled void-HEAD with the emitter flagtest/util/emitUtil.ts— Remove bothhead-as-boolean→headAsBooleanforwarding blockstest/modularUnit/scenarios/operations/wrapNonModelReturn.md— Remove 3 scenarios that drove behavior viahead-as-boolean: true(covered byheadResponseAsBool.mdusing@responseAsBool); striphead-as-boolean: falsefrom remaining HEAD scenariosMigration
Replace emitter option with the TCGC decorator on the operation: