Skip to content

Development and Testing

Liu.Yandong.Hanks edited this page Aug 19, 2026 · 3 revisions

开发、测试与贡献

Development, Testing, and Contribution

适用版本:4.0.0

Applies to 4.0.0.

首页 · 性能与基准

本地构建

主库、测试和语言工具都使用 .NET 项目。先还原依赖,再按需要构建对应项目。

The main library, tests, and language tools are .NET projects. Restore dependencies first, then build the project you need.

dotnet build src/AuroraScript.csproj -c Release
dotnet build language-tools/AuroraScript.Mcp/AuroraScript.Mcp.csproj -c Release
dotnet build language-tools/AuroraScript.VisualStudio/AuroraScript.VisualStudio.csproj -c Release

测试

功能测试项目多目标到 net8.0net9.0net10.0。运行对应目标前,本机必须安装相应 runtime。

The functional test project targets net8.0, net9.0, and net10.0. Install the corresponding runtimes locally before running each target.

dotnet test tests/AuroraScript.Tests/AuroraScript.Tests.csproj -c Release

新增或修改语言语义时,应同时覆盖正常路径、诊断路径、跨模块行为和可观察的边界条件。性能回归不以时间断言写入功能测试,而应通过 benchmark 检测。

When adding or changing language semantics, cover the normal path, diagnostics, cross-module behavior, and observable boundary conditions. Do not encode timing assertions in functional tests; detect performance regressions through benchmarks.

文档与 schema

documents/ 是语言工具和 MCP 的随包语言资料。修改公开 API 或语言特性时,同步更新相应 schema、示例和 Wiki;避免仅更新 README 或仅更新代码。

documents/ is the packaged language material for tooling and MCP. When changing a public API or language feature, update the corresponding schema, examples, and Wiki together; avoid updating only a README or only code.

提交前检查

  • 运行受影响项目的构建与测试。
  • 运行相关 benchmark 或至少 --smoke,若更改位于热路径。
  • 检查 Wiki 链接、版本号和 API 页面是否同步。
  • 不提交 bin/obj/、本地发布目录或机器专属配置。
  • Build and test every affected project.
  • Run the relevant benchmark, or at least --smoke, when changing a hot path.
  • Check that Wiki links, versions, and API pages are synchronized.
  • Do not commit bin/, obj/, local publish folders, or machine-specific configuration.

Clone this wiki locally