Skip to main content

fsharp-diagnostics

Always invoke after editing `.fs` files under `src/Compiler/`. Fast parse/typecheck without `dotnet build`, plus symbol references and inferred type hints. Use whenever the user asks about F# errors, compile errors, type inference, finding usages, or renaming a symbol in the compiler tree.

来源信息

仓库
dotnet/fsharp
最近来源活动
2026年8月4日 09:26
检测到的 SKILL.md 语言
英语
星标
4,344
分支
881

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
9 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
fsharp-diagnostics
description
Always invoke after editing `.fs` files under `src/Compiler/`. Fast parse/typecheck without `dotnet build`, plus symbol references and inferred type hints. Use whenever the user asks about F# errors, compile errors, type inference, finding usages, or renaming a symbol in the compiler tree.
# F# Diagnostics **Scope:** `src/Compiler/` files only. ## Setup (once per session) Requires pwsh 7+ (`brew install powershell` / `winget install Microsoft.PowerShell` / `apt install powershell`). ```pwsh function GetErrors { & "$(git rev-parse --show-toplevel)/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1" @args } ``` From bash/zsh without a function: `pwsh -File <repo>/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1 <args>`. ## Parse first, typecheck second ```pwsh GetErrors -ParseOnly src/Compiler/Checking/CheckBasics.fs # syntax only GetErrors src/Compiler/Checking/CheckBasics.fs # full typecheck ``` Fix all parse errors before typechecking; type errors on top of bad syntax are noise. ## Symbol references (line 1-based, col 0-based) ```pwsh GetErrors -FindRefs src/Compiler/Checking/CheckBasics.fs 30 5 ``` Use before any rename. ## Type hints (line range, 1-based) Returns the range with inferred types as inline `// (name: Type)` comments: ```pwsh GetErrors -TypeHints src/Compiler/TypedTree/TypedTreeOps.Transforms.fs 100 120 ``` ## Other ```pwsh GetErrors -CheckProject # typecheck entire project GetErrors -Ping # liveness check, no side effects GetErrors -Shutdown ``` ## Timing - First real call after a fresh clone: server build + in-memory warmup, 5–15 min → `initial_wait=1200`. - After warmup: real commands answer in seconds → `initial_wait=180`. - `-Ping` / `-Shutdown`: sub-second; never trigger build or warmup. Auto-shuts down after 4h idle; ~3 GB RAM while running.
在 GitHub 查看