Skip to content

Fix invalid signature file when the fslex header defines a module - #243

Merged
nojaf merged 1 commit into
fsprojects:masterfrom
nojaf:fix-836
Aug 28, 2026
Merged

Fix invalid signature file when the fslex header defines a module#243
nojaf merged 1 commit into
fsprojects:masterfrom
nojaf:fix-836

Conversation

@nojaf

@nojaf nojaf commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

The header of a .fsl file is repeated in the generated signature file so that its module declaration and opens are visible there. Any line starting with "module " was copied, including a nested module definition, whose body is not part of the signature file. The header was also written without a trailing newline, so the first "/// Rule ..." comment ended up on the same line.

A header containing "module Ranges =" therefore produced "module Ranges =/// Rule token" in the signature file, which does not compile (FS0010). Only copy a module declaration now, and write every header line on its own line. #240

The header of a .fsl file is repeated in the generated signature file so
that its module declaration and opens are visible there. Any line
starting with "module " was copied, including a nested module
definition, whose body is not part of the signature file. The header was
also written without a trailing newline, so the first "/// Rule ..."
comment ended up on the same line.

A header containing "module Ranges =" therefore produced
"module Ranges =/// Rule token" in the signature file, which does not
compile (FS0010). Only copy a module declaration now, and write every
header line on its own line. fsprojects#240
@nojaf
nojaf merged commit 4bf094b into fsprojects:master Aug 28, 2026
3 checks passed
@nojaf
nojaf deleted the fix-836 branch August 28, 2026 15:44
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.

1 participant