Skip to content

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

@T-Gro

Description

@T-Gro

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions