open-source

Published

Tags

Unleashing Parallel Processing in Your F# Compiler

Intro Hey there, let’s cut to the chase: the dotnet SDK release brings some feature flags that can turbocharge your F# compiler. In this post, I’m shining a spotlight on three of these gems that you absolutely need to give a spin. Setup First things first, you need the latest SDK ( and beyond). Then, let’s tweak some to fine-tune the F# compiler in MSBuild. Just drop this snippet into your or file: (sample) Want to double-check if it’s working? Run and spot the extra compiler flags in : But what magic do these flags weave, you ask? They sprinkle…

Published

Tags

Fantomas 6: The Legendary Formatter

Introduction Early this year we announced our plans for Fantomas 6. We are happy to announce that we have wrapped up the development of version 6 and a preview is now available on NuGet. What’s new? Fantomas 6 is a major release and contains a lot of new features and improvements. In this post we will highlight some of the most important changes. Parallel formatting Fantomas 6 is now able to format multiple files in parallel. This is a huge improvement for large projects. This happens out of the box and you don’t have to do anything to benefit from this…

Published

Tags

My F# compiler scripts

Intro For the last year, I’ve been working quite extensively in the dotnet/fsharp codebase. I’ve picked up a couple of habits and created some helper scripts along the way. This is some stuff that works for me and it might be insightful for you. Or not. In this blog post, I’m going over some of my frequently used scripts. Some are general purpose, others are very specific to the F# compiler codebase. PowerShell profile I’ve always been a Windows guy and thus is my go-to. ( is cross-platform though) Having multiple terminal windows open is the norm and I…

Published

Tags

The oak sleeps in the acorn

Introduction We launched Fantomas v5 in September, and it was the first version to ship with a custom F# parser and an improved syntax tree. Many view it as a big technical achievement – I know its launch was a point of personal pride. Release party Because version 5 was a big deal, I decided to organize a grand release party where we talked about how v5 came to be, what exactly changes for end-users and I wrapped it up with a well-deserved glass of champagne. The project is in a good state. We have a brand new documentation website, I onboarded a new co…

Published

Tags

Say Hello to Fantomas 5

Introduction Fantomas 5 is here! The API of v5 is finalized! In this blogpost I will explain how you can migrate to v5 from v4. The latest preview versions are labelled as beta’s, meaning the API is stable. Please start using these latest versions, as the final product will be very close to what is out there today. Install Fantomas using dotnet tool install fantomas —prerelease What changed? Under the good, we achieve a massive performance boost. I explained this in a previous blogpost, Fantomas v5 is twice or more, as fast as v4. Achieving this required…

Published

Tags

World domination, part one

Intro Some time ago, I was able to merge in a huge refactoring effort into the next major version of Fantomas. The result of these changes make Fantomas at least twice as fast as the v4 release. Before After In this blogpost, I’ll elaborate a bit how we did this and what you can expect from the V5 release. F# eXchange 2021 Last October, I had the opportunity to speak at F# eXchange. There I announced that what the plan was for the next major of Fantomas and how to get there. A crucial part of that talk was about how improving the at dotnet/fsharp was…

Published

Tags

A word on triple-slash comments

Intro Yesterday, pretty much out of nowhere, FCS 41.0.3 was published on NuGet. I must say, I’m pretty hyped about this release. It contains a few PRs that improve the syntax tree and provide more information to work within Fantomas. It also contains some XML documentation improvements that Alex of the Rider team has been working on. You can read the details about this new XML collecting mechanism in this RFC. It is a nice improvement and I’ve decided to implement an enhancement in Fantomas due to these changes. There actually are comments in the syntax…

Published

Tags

Fantomas Daemon

Intro The F# advent calendar is a wonderful initiative that inspires the community to create new content in a short period of time. I’ve been fortunate enough to be part of this for some years now. This year, I had in mind to sit this one out actually. Sometimes, there are just no new tales to tell and it is better suited to give others an opportunity. When I noticed that Sergey still had some spots left to fill, I did happily volunteer, though didn’t think it through that much. My original thought for this post was to create some content around the F…

Published

Tags

Gitpod & Snowpack

Hey all, For my F# Advent calendar entry of 2020 I messed around with Gitpod, Snowpack & Fable. You can find the result in this video: Take care everyone! Cheers, nojaf Photo by Annie Spratt on Unsplash

Published

Tags

Fantomas configuration file

Hi all, The cat’s out of the bag: Fantomas now has support for configuration files. This means you can override the default settings using a JSON file. Check out the documentation for more information. In this post I wish to answer a couple of small questions about the Fantomas configuration files. JSON schema? We’ve added a JSON schema definition to http://schemastore.org. So to get intellisense in most editors, you can add to the configuration file. Ionide integration? When using the latest Ionide version (4.4.3 and higher), your configuration will…

Published

Tags

Fantomas 2.8: global .NET Core cli tool!

Hi all, A quick update regarding the new release of the Fantomas project. There is a new and shiny global .NET Core cli tool. Install: dotnet tool install -g fantomas-tool The executable will be added to your path. Another new feature is the —preserveEOL option. This will respect additional newlines after formatting. You can check the release notes for all changes in the 2.8 version. Last but not least there is a rumor that the project might move to the fsprojects organization. This could lead to more people being involved in the project. Many thanks…