VisualFSharp v4.5 Release Notes

  • πŸš€ We introduced the F# language version 4.5 with this release. This also corresponds with the new 4.5.x family of FSharp.Core (the F# core library). You can read the specs for each of these changes in the F# RFC repository. There are also many improvements to F# tools for Visual Studio with this release.

    πŸš€ Releases

    • ⚑️ Visual Studio 2017 update 15.8
    • .NET Core SDK version 2.1.400 or higher

    Language features

    • πŸ‘Œ Support for voidptr
    • πŸ‘ NativePtr.ofVoidPtr and NativePtr.toVoidPtr support
    • πŸ†• New types: inref<'T>, outref<'T> to represent read-only and write-only byrefs
    • πŸ‘Œ Support for IsByRefLike structs
    • πŸ‘Œ Support for IsReadOnly structs
    • πŸ‘ Full support for production and consumption of byref returns
    • πŸ‘Œ Support for extension methods for byref/inref/outref
    • πŸ‘Œ Support for match! in computation expressions
    • 😌 Relaxed upcast requirements for yield in sequence, list, and array expressions
    • 😌 Relaxed indentation requirements for list and array expressions
    • Enumeration cases emitted as public
    • πŸ›  Various bug fixes with byref programming

    FSharp.Core features

    • πŸ”– Version aligned to 4.5.x for the NuGet package and 4.5.0.0 for the binary
    • πŸ‘Œ Improved strack traces for async { } so that user code can now be seen
    • πŸ‘Œ Support for ValueOption<'T>
    • πŸ‘Œ Support for TryGetValue on Map

    Compiler improvements

    πŸ‘Œ Improvements to the F# compiler in addition to the previously-mentioned language features are in F# 4.5. These include:

    • βͺ Restored ability to inherit from FSharpFunc
    • βœ‚ Removed ~2.2% of all allocations in the F# compiler
    • πŸ‘ F# reference normalization support for user control of transitive assembly references written to an output file
    • ⚠ Respecting WarningsNotAsErrors
    • Error message improvement when branches of a pattern match do not return the same type
    • Respecting #nowarn "2003"
    • 🐎 Other smaller performance improvements and many bug fixes

    Tooling improvements

    πŸš€ Significant improvements in the F# tools, such as performance enhancements and some new editor features are included this release. As always, with a large number of contributions from the F# open source community. Here are the highlights:

    • 🐎 We improved IntelliSense performance for .NET SDK-style projects of all forms, including those that use multi-targeting.
    • 🐎 A community-driven effort to analyze and improve IntelliSense performance for very large files was contributed by Vasily Kirichenko, Steffen Forkmann, and Gauthier Segay. IntelliSense in very large files (10k+ lines of code) is roughly twice as fast now.
    • πŸ’… The warning for an outdated FSharp.Core (despite the package being installed) is no longer present in .NET SDK-style projects.
    • πŸ“š The description tooltip that displays XML documentation for a member after . in IntelliSense no longer times out after 10 seconds.
    • πŸ›  A bug where you could not set breakpoints in object constructor arguments has been fixed.
    • πŸ›  A bug where a renamed symbol would be duplicated when it is a generic parameter has been fixed.
    • πŸ“¦ Templates for .NET Framework (classic F# templates) now consume FSharp.Core from a NuGet package, to align with .NET SDK F# templates.
    • Automatic, transactional brace completion is now available for (), [], {}, [||], and [<>] brace pairs. We did this work in collaboration with Gibran Rosa.
    • You can now go to definition with Ctrl + Click on an F# symbol. The settings for this gesture are also respected in the Tools > Options window.
    • 🐎 The IntelliSense performance UI has been modified to allow configuration of stale typecheck information for various IDE features. Explanations for each option are now present in tooltips for the settings.
    • Brace match highlighting now correctly highlights braces, completed in collaboration with Vasily Kirichenko.
    • Go to definition now navigates correctly when a type is defined recursively, contributed by Vasily Kirichenko.
    • πŸ›  A bug where an auto-imported namespace wasn't opened when the top of a file was empty has been fixed by Vasily Kirichenko.
    • πŸ–¨ A bug where printf specifiers that contained dots were miscolored has been fixed by Vasily Kirichenko.
    • πŸ›  A bug where all opens were considered unused inside of a recursive module has been fixed by Vasily Kirichenko.
    • Autocompletion for attributes now only suggests options that are actually attributes, contributed by Vasily Kirichenko.
    • Signature Help tooltips are now generated for Type Provider static parameters at the constructor call site, contributed byVasily Kirichenko.
    • πŸ›  A bug where value types used as units of measure were colored as reference types has been fixed by Vasily Kirichenko.
    • πŸ›  A bug where semantic colorization could disappear for some files while scrolling has been fixed by Vasily Kirichenko. There is now an experimental CodeLens implementation, contributed by Victor Peter Rouven MΓΌller. You can turn it on in Options > Text Editor > F# > Code Lens.
    • πŸ“š A bug where the F# compiler service would incorrectly elide the module names in XML documentation has been fixed by Sebastian Urban.
    • Code that uses Dictionary with ContainsKey and subsequent Item calls has been changed to use TryGetValue, by Eugene Auduchinok.
    • Jakob Majoka also contributed in the process of consuming a different API for FSharpToolTip.

    Infrastructure, Packaging, and Open Source Improvements

    We made the following enhancements to infrastructure, packaging, and our open source contribution experience:

    • The F# compiler distributed with Visual Studio no longer installs as a singleton in the F# Compiler SDK location. It is now fully side-by-side with Visual Studio, meaning that side-by-side installations of Visual Studio wil finally have truly side-by-side F# tooling and language experiences.
    • πŸ“¦ The FSharp.Core NuGet package is now signed.
    • 🌲 ETW logging has been added to the F# tools and compiler.
    • The very large control.fs/control.fsi files in FSharp.Core have been split into async.fs/async.fsi, event.fs/event.fsi, eventmodule.fs/eventmodule.fsi, mailbox.fs/mailbox.fsi, and observable.fs/observable.fsi.
    • 🐎 We added .NET SDK-style versions of our project performance stress test artifacts.
    • πŸ“¦ We removed Newtonsoft.json from our codebase, and you now have one less package downloaded for OSS contributors.
    • πŸ“‡ We now use the latest versions of System.Collections.Immutable and System.Reflection.Metadata.