dotnet / dotnet/fsharp

Can we get feedback when compiling, about what FSC version is being used?

Open
#13,816 6 comments 0 reactions 0 assignees View on GitHub
Area-FCS Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

This may be more relevant to people working with developing the compiler itself, but I often find myself wondering what compiler is being configured from my Visual Studio. Having both VS 2022, older version and VS 2022 Preview, plus the one compiled by the F# repo, I'm often not 100% sure what version I'm using.

This is even more relevant when reporting bugs. People tend to be behind on updates, so having the FSC (or VS or whatever) dump the version of FSC just before compiling helps identifying where they’re at.

Another use case is in CI, which can have slightly different versions of FSC. As such, dumping the version for comparison may help analyse spurious bugs.

## Proposed solution

Instead of this:

```
Build started...
1>------ Build started: Project: My.Extensions.Actions, Configuration: Debug Any CPU ------
2>------ Build started: Project: My.Extensions.Security, Configuration: Debug Any CPU ------
```

I'd like to see this instead:

```
Build started using fsc version 6.0.12345-beta45678...
1>------ Build started: Project: My.Extensions.Actions, Configuration: Debug Any CPU ------
2>------ Build started: Project: My.Extensions.Security, Configuration: Debug Any CPU ------
```

It may also be reported on each individual project, if that makes more sense.

## Describe alternatives you've considered

Well, I tried using `--version` on `fsc` but that crashed Visual Studio (https://github.com/dotnet/fsharp/issues/13549). This has meanwhile been fixed (https://github.com/dotnet/fsharp/pull/13702), but the solution suppresses the version output, as opposed to showing it.

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.