ReflectionFormattingAnalyzerModule
PackageAxial.Guardrails
The `ReflectionFormatting` analyzer: flags formatting that relies on F#'s reflection-based structured printer,
which fails at run time under NativeAOT and full trimming.
F# unions and records get a compiler-generated `ToString()` that calls `sprintf "%+A"`. FSharp.Core's own option,
voption, list, Result, Choice, Map and Set override `ToString()` but print their contents the same way. `%A`/`%O`
walk the value with `FSharp.Reflection`. NativeAOT strips the metadata this needs, so the call throws — for
example `KeyNotFoundException` from `FSharpValue.GetUnionFields` — and the build gives no warning, because the
reflection happens inside FSharp.Core, whose trim warnings are reported once for the whole assembly.
Formatting a type parameter is flagged too: it is only as safe as whatever type is substituted, and a generic
helper like `Cause.prettyPrint string` is exactly where a union slips in unnoticed.
Render such values explicitly instead (a `describe`/`render` function or a hand-written `ToString` override).
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| rawRangesWithNativeAot | rawRangesWithNativeAot nativeAot ctx | No description available. |
| analyzeWithNativeAot | analyzeWithNativeAot nativeAot ctx | No description available. |
| analyze | analyze ctx | No description available. |
| reflectionFormattingAnalyzer | reflectionFormattingAnalyzer ctx | No description available. |

