When to expect regex literals working on Windows?

Let me please first note that I am very happy with the progress currently being made on Windows :slight_smile: , and regex literals are maybe more a Swift 6 thing, so this is really just a kind question when regex literals could be supported on Windows (I tested with Trunk Development (main) from April 20, 2023 using the -enable-bare-slash-regex flag).

According to another remark the missing bootstrapping step on Windows is a problem, so maybe this needs some more time and is not easily fixed? I suppose it "should" come with Swift 6, but is there a chance to get it working in an earlier version? Thanks!

There are a few different things here.

  • fundamental issues in SILOptimizer that prevented the build the last I tried (granted this was a while ago).
  • incorrect dependencies for the targets / other issues in the custom build system
  • the dependency on Swift is a problem for the official builds

So, even if the technical blockers are resolved, we will not be able to enable the support in the nightlies as the toolchain is far too large and installing the Swift toolchain means that we do not have sufficient space to build just the compilers even (though this will require building the runtime and all so it will require even more space).

The first step towards this would be to get the SILOptimizer bugs fixed as they are preventing the code from compiling even.

CC: @etcwilde @Douglas_Gregor @mishal_shah


To be clear, regex literals are unusual in that they're implemented as part of the compiler in Swift, so all alternative platforms where bootstrapping the portions of the compiler that are written in Swift is broken because of C++ Interop, like Windows and Android since the 5.8 release, also do not support regex literals.