Synchronize implementation files and signature files
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
Large projects can benefit from signature files due to an optimization in FCS that skips type checking for files that have a matching signature file.
https://github.com/dotnet/fsharp/blob/36af364b538cde99d8de8df93db241af53329f22/src/Compiler/Driver/ParseAndCheckInputs.fs#L1211-L1229
This solution could make working on said large projects more optimal. The problem with this is that signature files can get out of sync quite rapidly when changing the implementation file.
**Describe the solution you'd like**
Could we at some level (FCS or editor) introduce a feature that automatically keeps signature files up to date? Or perhaps display a light bulb when the signature file no longer matches the implementation.
**Describe alternatives you've considered**
Maintain the signature files by hand.
**Additional context**
If we were to have a synchronization mechanism, I wonder if we could generate the files in a `.vscode` like folder? So that end-users don't even need to include them inside the `fsproj`.
Contributor guide
Assessment
This issue has not been assessed yet.