[http-client-csharp] Handling types that are both experimental and obsolete, including omitting unused types
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
Start with the C# generator changes in Azure/azure-sdk-for-net#64227 and inspect how it emits [Obsolete] and [Experimental] attributes, then trace model reachability and type suppression customization. The issue asks for a safe policy covering backward compatibility, retained SDK references, serialization, custom code, and generated suppressions. Done means proposing and implementing a policy or opt-in mechanism that handles these cases without breaking generated or custom code.
索引モデルが issue の本文から書いたものです。
説明
Context
While updating the C# generator in Azure/azure-sdk-for-net#64227 to @typespec/http-client-csharp 1.0.0-alpha.20261026.4, regeneration added [Obsolete] to three types that already have [Experimental("AAIP001")]:
Azure.AI.Extensions.OpenAI.BrowserAutomationPreviewToolAzure.AI.Projects.Agents.BrowserAutomationPreviewToolboxToolAzure.AI.Projects.Agents.WorkflowAgentDefinition
This produces obsolete diagnostics at existing use sites. It also exposes a compiler interaction: adding [Obsolete] to an experimental type causes references inside that type to other experimental APIs to start reporting their diagnostics. For example, BrowserAutomationPreviewTool derives from OpenAI's experimental ResponseTool, so both generated and custom partial declarations start reporting OPENAI001.
Minimal reproduction
Verified with .NET SDK 10.0.401:
using System;
using System.Diagnostics.CodeAnalysis;
[Experimental("OPENAI001")]
public class ExperimentalBase { }
[Experimental("AAIP001")]
[Obsolete("Legacy")]
public class Derived : ExperimentalBase { }
The base-class reference reports OPENAI001. Removing only [Obsolete("Legacy")] makes the example compile without diagnostics.
Desired direction / questions
What should the generator's policy be for types that are both experimental and deprecated?
Ideally, we would not generate the type when it is not required for backward compatibility and is not otherwise used. Could we consider:
- Omitting these types when the configured backward-compatibility baseline does not require them and no retained SDK surface depends on them, or providing an explicit opt-in policy for this behavior.
- Defining the reachability rules carefully: client signatures, other models, polymorphic serialization/deserialization, and custom code may still require a type. Generator-created model factories or model-reader/writer context registrations should not accidentally make an otherwise unused type impossible to omit.
- Providing a supported per-type exclusion customization when automatic omission cannot be determined safely. The current C#
CodeGenSuppressattribute suppresses members, not top-level types. - When the type must remain, generating the necessary narrowly scoped suppressions for experimental dependencies so that adding
[Obsolete]does not break generated code. Custom-code references may still need explicit acknowledgement.
The types above are examples of the attribute interaction, not a claim that they can all be removed as-is: there are existing custom dispatch, telemetry, test, and sample references that must be accounted for. The goal is to discuss a safe policy and customization mechanism rather than dropping every deprecated experimental type unconditionally.
- 主要言語
- Java
- スター
- 5.9k
- フォーク
- 421
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 176
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/typespec のほかの issue
-
bug emitter:client:csharp
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/typespec#12572 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Make website build cross-platform compatible対応中かも @pcbeingused333 が今日担当しました。 オープンbug meta:website
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/typespec#12550 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Emitter framework: make the language-specific Alloy peer dependencies optional対応中かも @timotheeguerin が 8 日前に担当しました。 オープンemitter-framework feature triaged:core
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
microsoft/typespec#12476 · コメント 1 件 · リアクション 2 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
Upgrade C# generator Roslyn to 5.9.0対応中かも @ArthurMa1978 が 7 日前に担当しました。 オープンemitter:client:csharp feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/typespec#12445 · コメント 2 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug emitter:client:python
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/typespec#12360 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/typespec の issue をすべて見る
似ている issue
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration対応中かも @amalsaidov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
area/ai area/backend component/zeebe kind/task
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
spAnser/reacharound#38 ·