Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SYSLIB1219 (and placeholder SYSLIB1218) missing from the options-validation source-generator diagnostics reference

已关闭 适合新手
#56,285 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
documentation

调研方向

打开 docs/fundamentals/syslib-diagnostics/syslib1201-1219.md,检查现有的诊断表和 front matter。根据 Microsoft.Extensions.Options/gen/DiagDescriptors.cs 验证 SYSLIB1219,然后与 runtime 团队确认对保留的 SYSLIB1218 的预期处理方式。完成的标准是参考文档和关键字准确反映受支持的诊断。

由索引模型根据 Issue 内容生成。

描述

:watch: Not Triaged

Description

The options-validation source-generator diagnostics reference page's front matter (f1_keywords) already lists syslib1218 and syslib1219, but the description table only documents SYSLIB1201-SYSLIB1217. Two diagnostic IDs are undocumented:

  • SYSLIB1219 (AlreadyImplementsValidateAsyncMethod) - a new diagnostic introduced with async options-validation source generation (ValidateAsync emission for IAsyncValidateOptions<TOptions>), defined in DiagDescriptors.cs. It's the async counterpart to the existing SYSLIB1205 (AlreadyImplementsValidateMethod): the generator reports it when an attributed type already provides a handwritten ValidateAsync method matching the generated signature.
  • SYSLIB1218 - reserved as a keyword but not currently defined by any diagnostic descriptor in the Options source generator. Needs confirmation of intent (reserved for future use vs. removable from front matter).

Repro / evidence

  • Front matter lists both IDs: syslib1201-1219.md front matter
  • Table stops at SYSLIB1217: no rows for 1218/1219.
  • SYSLIB1219 diagnostic descriptor: Microsoft.Extensions.Options/gen/DiagDescriptors.cs, id: "SYSLIB1219", message SR.AlreadyImplementsValidateAsyncMethodMessage.

Suggested content

Add a table row:

Diagnostic ID Description
SYSLIB1219 A type already includes an implementation of the ValidateAsync method.

And either:

  • Add a SYSLIB1218 row once its purpose is confirmed with the runtime team, or
  • Remove syslib1218 from f1_keywords if it's unused/reserved and not meant to surface publicly yet.

Type of gap

Not a breaking change - SYSLIB1219 is a new diagnostic tied to a new generator capability (async Validate generation), not a change to previously working behavior. This is a plain content gap in an existing reference page.

Related

  • Async options-validation source generation: dotnet/runtime#130263
  • Related (already-addressed) breaking-change doc for the async validation contract unification: dotnet/docs#55794 / dotnet/docs#55901 (unrelated to this diagnostic gap)

This issue was drafted with assistance from GitHub Copilot.

主要语言
没有语言数据
星标
4.8k
派生
6.1k
平均合并
23 小时 7 分钟
30 天内合并 PR
196

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/docs 的其他 Issue

查看 dotnet/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。