It should be noted that I was only talking about projects that broke due to ambiguity — I didn't count projects that broke due to the use of a prefix /
operator. (I probably should have said 1 out of 2879 and not included those projects at all — I'll edit my original post.)
Here are the findings in full:
To contribute some data to the level of source impact when in Swift 6 mode: we tested the proposed literal syntax using the Swift Package Index package collection . The packages were selected if they successfully built for Swift 5.6 using Swift package manager ( swift build
) on macOS.
Total packages - 2968
16 Projects failed due to Regex Literal change
15 Projects failed with error: prefix operator may not contain '/'
1 Project failed due to /
ambiguity
74 Projects failed due to unrelated reasons
We also tested changes against a large closed-source swift codebase and found one instance of failure.
Mishal is not around today but he sent me the logs from the failures, and it might help (without judgement on whether 15 is a high or low number) to break those projects impacted by prefix operator /
down a little further:
5 are packages that are part of the composable architecture suite (including CasePaths itself)
5 are users of CasePaths
1 is something that looks like CasePaths
1 is a parser written by @rxwei (sadly not an author of this particular proposal, for irony purposes)
3 are part of a suite that uses pre/postfix /
to simulate regular expression syntax
Incidentally, I wanted to give a shout out to @daveverwer and @finestructure for creating such a fantastic resource in SwiftPackageIndex.com that allows for this kind of analysis (as well as all the community members open-sourcing their packages).
5 Likes