Conversation
- Fix FS0760 IDisposable warnings in docs/evaluation.fsx by using 'new FsiEvaluator()' constructor syntax (two occurrences) - Improve error message in ParseScript when type errors are found in a script file (now includes the file path) - Add CheckDocScripts stage to the Verify pipeline in build.fsx so that 'dotnet fsi build.fsx -- -p Verify' also type-checks docs scripts with --strict, catching errors locally before CI The full CI pipeline already ran 'fsdocs build --strict' in the GenerateDocs stage (permanent check). The new CheckDocScripts stage makes the same check available via the lighter-weight Verify pipeline. Closes #1081 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/repo-assist there is no reason not to run this on Windows. |
Remove the 'whenNot Windows' guard and use System.OperatingSystem.IsWindows() to select the correct binary extension (fsdocs.exe on Windows, fsdocs on Unix). This means the Verify pipeline now type-checks documentation scripts on all platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
/repo-assist is "Verify" pipeline even running during CI? |
|
🤖 Repo Assist here. No — the "Verify" pipeline does not run during CI. Here's how the pipelines are wired:
The CI workflow ( The So the value of adding
|
|
/repo-assist add it to the general build pipeline as well |
Move fsdocsLocalBin/checkDocScriptsStage definitions before the CI pipeline and include the stage in CI (after Tests, before GenerateDocs). This ensures doc-script type errors are caught on all CI runners, not only when running the Verify pipeline locally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
/repo-assist remove the changelog changes you made. This has no value for end-users |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
🤖 This is an automated PR from Repo Assist.
Closes #1081
Root cause
docs/evaluation.fsxcontained twoFsiEvaluator()constructor calls withoutnew, triggering FS0760 IDisposable warnings from FCS on every documentation build (printed 5× — once per output format). While these warnings did not fail CI (warnings ≠ errors under--strict), they indicate a latent resource-management concern and add noise to the build output.Additionally, when
ParseScript.ParseAndCheckScriptFiledetected type errors in a script, it reported a generic"errors parsing or checking script"message with no file path, making diagnosis harder.Finally, the
Verifypipeline (dotnet fsi build.fsx -- -p Verify) — commonly used by developers for a quick pre-push check — did not runfsdocs build, so doc-script type errors were only caught in the full CI pipeline (GenerateDocsstage on Linux).Fix
docs/evaluation.fsx: changed bothFsiEvaluator()→new FsiEvaluator()to eliminate the FS0760 warnings.src/FSharp.Formatting.Literate/ParseScript.fs: improved the error message to include the file path ("errors found in '(file)'") and renamed thefailflag tohasErrorsfor clarity.build.fsx: added aCheckDocScriptsstage (Linux-only, using the locally built fsdocs tool) to theVerifypipeline. Developers who rundotnet fsi build.fsx -- -p Verifyafter building the solution will now also type-check all documentation scripts with--strict.Rationale & trade-offs
GenerateDocsstage which installs fsdocs from NuGet artifacts and runs--strict. This PR preserves that unchanged.CheckDocScriptsstage inVerifyuses the locally built fsdocs binary (src/fsdocs-tool/bin/Release/net10.0/fsdocs). It requires a priordotnet build; runningVerifywithout a pre-built binary will fail gracefully with "file not found".GenerateDocs) since doc generation tooling is Linux-focused.Test Status
dotnet build FSharp.Formatting.sln --configuration Release— succeeded (1 pre-existing FS0760 warning inBuildCommand.fs, unrelated to this PR)dotnet test FSharp.Formatting.sln --configuration Release --no-build— all 499 tests pass (0 failures)dotnet fantomas build.fsx src tests docs --check— no formatting issues