dillon1000/react
Commit
Browse files Make CompilerError.reason a static string
While running the latest Forget build on www I noticed that a lot of the bailouts were special-cases where we used interpolation in the error `reason` string to provide more context for debugging. This is a pretty cool result, because it means that we actually support nearly all the common syntax (at least based on a sample of the codebase). But it makes our tools for aggregating errors break down a bit. This PR adds a new, nullable `description` property to CompilerErrorDetail, and manually updates to ensure that we always pass a static `reason` and only use interpolation in the `description`. This will allow our aggregation tools to group by the reason.
Changed paths11 files
First-parent comparisoncompiler/forget/src/CompilerError.ts ModifiedM compiler/forget/src/HIR/ValidateConsistentIdentifiers.ts ModifiedM compiler/forget/src/HIR/ValidateTerminalSuccessors.ts ModifiedM compiler/forget/src/Inference/InferReferenceEffects.ts ModifiedM compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/forget/src/SSA/EnterSSA.ts ModifiedM compiler/forget/src/SSA/LeaveSSA.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.hoisted-function-declaration.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.mutate-after-aliased-freeze.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.mutate-after-freeze.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.mutate-captured-arg-separately.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…