dotnet / dotnet/fsharp

Improve .fsi tooling experience to keep signatures and implementation in sync

Open
#14,170 1 comment 0 reactions 0 assignees View on GitHub
Area-Compiler-SigFileGen Feature Improvement Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

With the ability to type check implementation files in parallel in case of signature files present, build-time speed can now be a strong factor when considering signature files.

At the moment, they come with a maintenance cost of manually editing the same information twice - function and modules names, number and types of arguments, comments.

The CLI offers a way to refresh signature files based on actual implementation, but this feature is not integrated into tooling.

The following actions are considered to be beneficial:
- Mirroring xmldoc comments between .fsi and .fs files
- **Open question:** Mirror via a code-lens-like feature, or offer an action to really duplicate the text at source code level?
- If this means a duplication on source code level, another check would be needed to make sure they are equal?
- Add contextual editor action to (re)generate .fsi files based on existing implementation:
- For file
- For all files in a project
- **Open question:** Is a quick fix reacting to a specific range of error codes suitable here?
- **Open question to consider:**
- Any suitable actions for generating also the other way around, from .fsi to .fs ?
- A well targetable scenario might be changes in function arguments, e.g. a new argument added on .fsi.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.