With #6193, both Docker variants are built on different machines, so
that not both binaries need to be handled at once.
Since the binaries are not used as release artifacts anymore, dynamic
linking should be fine as well.
Tasks we perform with Sourcery are rather simple and can be replaced
with a basic collection of files and the generation of lists in the
new `swiftlint-dev` command. This spares contributors from installing
either Sourcery or Bazel.
The current algorithm is like "collect all included files and subtract all excluded files".
Collecting all included and all excluded files relies on the file system. This can become slow
when the patterns used to exclude files resolve to a large number of files.
The new approach only collects all lintable files and checks them against the exclude patterns.
This can be done by in-memory string-regex-match and does therefore not require file system accesses.
Ideally, SwiftLintCore would some day only contain components
that are needed to define rules. Consequently, it would be the
only bundle required to import for (external) rule development.
* Compile with `-strict-concurrency=complete`
Only in Bazel for now, because this is considered an unsafe flag in
SwiftPM which would lead to warnings for downstream consumers of
SwiftLint using SwiftPM.
Some imports of SwiftSyntax need the `@preconcurrency` annotation until
https://github.com/apple/swift-syntax/pull/2322 is available in a
release.
The following SwiftLint libraries have `-strict-concurrency=complete`
applied:
* SwiftLintCoreMacros
* SwiftLintBuiltInRules
* SwiftLintExtraRules
The following SwiftLint libraries don't have the flag applied and need
to be migrated:
* SwiftLintCore
* swiftlint (CLI target)
So really the rules and macros are now being compiled with
`-strict-concurrency=complete`, but the core infrastructure of SwiftLint
is not.
Still, given that Swift 6 will eventually make these warnings errors by
default, it's good to prevent issues from creeping in earlier rather
than later.
* Add CI job to build with strict concurrency