Skip to content

Keep the right-hand side of an exception abbreviation - #3513

Merged
nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:t3code/069ecb37
Oct 2, 2026
Merged

nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:t3code/069ecb37

Conversation

@nojaf

@nojaf nojaf commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

exception MyError = System.Exception was formatted as exception MyError, which silently declares a new exception instead of abbreviating an existing one. ASTTransformer dropped the abbreviated name that SynExceptionDefnRepr carries, in implementation and signature files alike. ExceptionDefnNode now holds it, and CodePrinter prints it after the case and before any with members.

Adding that field changes a public Oak constructor, which is allowed in any release. The docs now say so in every place a reader of the Oak lands: a standing section in the upgrade guide replaces the v8 Oak change lists and shows how to diff SyntaxOak.fs between release tags, and GeneratingCode, the SyntaxOak module doc, the pull request ground rules and AGENTS.md all point the same way.

Fixes #3511

`exception MyError = System.Exception` was formatted as
`exception MyError`, which silently declares a new exception instead
of abbreviating an existing one. ASTTransformer dropped the abbreviated
name that SynExceptionDefnRepr carries, in implementation and signature
files alike. ExceptionDefnNode now holds it, and CodePrinter prints it
after the case and before any `with` members.

Adding that field changes a public Oak constructor, which is allowed in
any release. The docs now say so in every place a reader of the Oak
lands: a standing section in the upgrade guide replaces the v8 Oak
change lists and shows how to diff SyntaxOak.fs between release tags,
and GeneratingCode, the SyntaxOak module doc, the pull request ground
rules and AGENTS.md all point the same way.

Fixes fsprojects#3511
@nojaf
nojaf merged commit 8bf81a1 into fsprojects:main Oct 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception abbreviation loses its right-hand side

1 participant