Skip to content

Add #version;; directive to F# Interactive#19332

Merged
T-Gro merged 2 commits intodotnet:mainfrom
bbatsov:fsi-version-directive
Mar 7, 2026
Merged

Add #version;; directive to F# Interactive#19332
T-Gro merged 2 commits intodotnet:mainfrom
bbatsov:fsi-version-directive

Conversation

@bbatsov
Copy link
Contributor

@bbatsov bbatsov commented Feb 19, 2026

Description

Users with multiple F#/SDK/VS installations often need to identify which FSI they're running. The startup banner shows the version, but it scrolls away quickly. This adds a #version;; directive that prints version and environment info on demand — useful for debugging and bug reporting.

Example output:

Microsoft (R) F# Interactive version 12.9.100.0 for F# 9.0
.NET: .NET 9.0.0
OS: Darwin 24.1.0 (Arm64)

Fixes #13307

Checklist

  • Test cases added
  • Performance benchmarks added in case of performance changes
  • Release notes entry updated

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

@bbatsov bbatsov force-pushed the fsi-version-directive branch from db76027 to 4b4cfea Compare February 20, 2026 07:12
@T-Gro
Copy link
Member

T-Gro commented Feb 20, 2026

Thank you 👍 .

Two bonus ideas if doable and if you think they are good additions:

The same F# binary can be configured (VS options, directory.props,..) to serve different F# Language version, maybe show that as well?

The same for FSharp.Core version - often not clear where FSharp.Core comes from (from VS, from SDK, from project,...).

From a perspective of a person who reads bugs reports, all of those make sense 👍 .

@bbatsov bbatsov force-pushed the fsi-version-directive branch from 4b4cfea to 1ee5705 Compare February 20, 2026 10:27
@bbatsov
Copy link
Contributor Author

bbatsov commented Feb 20, 2026

Done! I've added both the F# language version and FSharp.Core version to the output. #version;; now prints something like:

Microsoft (R) F# Interactive version 12.9.100.0 for F# 9.0
Language Version: 9.0
FSharp.Core: 9.0.0.0
.NET: .NET 9.0.0
OS: Darwin 24.1.0 (Arm64)

@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling Feb 27, 2026
@T-Gro
Copy link
Member

T-Gro commented Feb 27, 2026

Thanks for doing the additions, this is nice 👍

@T-Gro T-Gro enabled auto-merge (squash) February 27, 2026 15:24
auto-merge was automatically disabled March 5, 2026 10:40

Head branch was pushed to by a user without write access

@bbatsov bbatsov force-pushed the fsi-version-directive branch from a89aa71 to 0b3b9ae Compare March 5, 2026 10:40
Prints version, language version, FSharp.Core version, .NET runtime,
and OS/architecture info on demand — useful for debugging and bug
reporting when the startup banner has scrolled away. Closes dotnet#13307.
@bbatsov bbatsov force-pushed the fsi-version-directive branch from 0b3b9ae to d23f69b Compare March 5, 2026 10:52
@bbatsov
Copy link
Contributor Author

bbatsov commented Mar 5, 2026

Moved the release notes entry from 10.0.300.md to 11.0.100.md because the CI check is looking for the latter. Not sure if that's the right file or if the check is misconfigured — happy to move it back if needed.

@T-Gro T-Gro enabled auto-merge (squash) March 6, 2026 22:03
@T-Gro T-Gro merged commit c80d142 into dotnet:main Mar 7, 2026
45 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

FSI Interactive directive: #version

2 participants