minimal-repro

द्वारा microsoft

TypeSpec कंपाइलर या एमिटर बग के लिए न्यूनतम प्रतिकृति बनाने में सहायता करें। तब उपयोग करें जब कोई उपयोगकर्ता TypeSpec स्रोत (पेस्ट किया गया कोड या GitHub URL) प्रदान करता है और वर्णन करता है…

npx skills add https://github.com/microsoft/typespec --skill minimal-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.

  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.

microsoft की और Skills

oss-growth
microsoft
OSS ग्रोथ हैकर व्यक्तित्व
official
accessibility-aria-expert
microsoft
React/Fluent UI वेबव्यू में पहुँच संबंधी समस्याओं का पता लगाता है और उन्हें ठीक करता है। स्क्रीन रीडर संगतता के लिए कोड की समीक्षा करते समय, ARIA लेबल ठीक करते समय, सुनिश्चित करते समय उपयोग करें…
official
generate-canvas-app
microsoft
[पुराना हो चुका है — इसके बजाय canvas-app का उपयोग करें] एक पूर्ण Power Apps कैनवास ऐप जनरेट करें।
official
django
microsoft
Django वेब डेवलपमेंट के लिए सर्वोत्तम अभ्यास जिसमें मॉडल, व्यू, टेम्पलेट और परीक्षण शामिल हैं।
official
github-issue-creator
microsoft
कच्चे नोट्स, एरर लॉग्स, वॉइस डिक्टेशन या स्क्रीनशॉट को साफ-सुथरे GitHub-फ्लेवर्ड मार्कडाउन इश्यू रिपोर्ट्स में बदलें। तब उपयोग करें जब उपयोगकर्ता बग जानकारी, एरर…
official
python-package-management
microsoft
निर्भरता प्रबंधन के लिए uv और कार्य स्वचालन के लिए poethepoet का उपयोग करता है।
official
runtime-validation
microsoft
माइग्रेटेड एप्लिकेशन के लिए रनटाइम सत्यापन — परीक्षण रणनीति (योजना चरण) और परीक्षण निष्पादन (सत्यापन चरण) को शामिल करता है: स्टार्टअप सत्यापन,…
official
azure-postgres-ts
microsoft
Azure Database for PostgreSQL Flexible Server से pg (node-postgres) पैकेज का उपयोग करके कनेक्ट करें, जिसमें पासवर्ड और Microsoft Entra ID (पासवर्डलेस) प्रमाणीकरण के लिए समर्थन है।
official