Skip to main content

minimal-repro

Help create a minimal reproduction for a TypeSpec compiler or emitter bug. Use when a user provides TypeSpec source (pasted code or a GitHub URL) and describes an issue. Reproduces locally and reduces to a single-file repro.

소스 정보

저장소
microsoft/typespec
최근 소스 활동
2026년 6월 1일 12:44
감지된 SKILL.md 언어
영어
스타
5,880
포크
402

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
minimal-repro
description
Help create a minimal reproduction for a TypeSpec compiler or emitter bug. Use when a user provides TypeSpec source (pasted code or a GitHub URL) and describes an issue. Reproduces locally and reduces to a single-file repro.
# Minimal Reproduction Reduce a user-reported TypeSpec bug to the smallest single `.tsp` file that still triggers the issue. ## Inputs - TypeSpec source (pasted or GitHub URL) - Error description (diagnostic code, message, or incorrect emitter output) ## Environment Use `packages/samples/scratch/` as the working directory — it's gitignored and the `packages/samples` package already depends on compiler, http, rest, openapi3, versioning, json-schema, etc. If the repro needs packages NOT in the workspace (e.g., `@azure-tools/*`), use a temp folder with `npm install` instead. ## Steps 1. **Reproduce** — Write the user's code to `packages/samples/scratch/main.tsp`, compile with `npx tsp compile main.tsp` (add `--emit <emitter>` if relevant), and confirm the same error occurs. 2. **Minimize** — Iteratively remove code (unused imports, models, properties, decorators, operations, namespaces) and re-compile after each removal. Keep only what's needed to trigger the same error. Undo any removal that makes the error disappear. 3. **Present** — Show the final minimal `.tsp`, the compile command, and the error output. Suggest pasting into a GitHub issue or the [TypeSpec Playground](https://typespec.io/playground). 4. **Cleanup** — Remove scratch files (`rm -f packages/samples/scratch/*.tsp packages/samples/scratch/tspconfig.yaml && rm -rf packages/samples/scratch/tsp-output`). ## Tips - Most reproductions reduce to a single file with no namespaces needed. - Remove `@service`, `@server`, `@doc`, `@info` early — they're rarely relevant. - Combine multi-file code into one file by inlining. - If the error doesn't reproduce, check for missing `import`/`using` statements.
GitHub에서 보기