We have, in our codebase, a few instances of the following:
@preconcurrency import class OldLibrary.EldritchHorror
/// Omitting a bunch of usual library imports.
import OldLibrary
In this instance, the order of the imports matters. We only want to skip all the Swift 6 concurrency and other checks for that class since it's an eldritch horror but the rest of the library has either gotten a cleanup or is not complex enough not to fix along the way if issues pop up.
Unfortunately swiftformat insists on reordering the imports to the point where the dedicated @preconcurrency import goes after the library one, causing compilation issues.
I'm unsure of what would be the best tool fix for this (we just added // swiftformat:ignore:this sortImports to the affected lines) but wanted to make sure you were aware of the issue.
We have, in our codebase, a few instances of the following:
In this instance, the order of the imports matters. We only want to skip all the Swift 6 concurrency and other checks for that class since it's an eldritch horror but the rest of the library has either gotten a cleanup or is not complex enough not to fix along the way if issues pop up.
Unfortunately swiftformat insists on reordering the imports to the point where the dedicated
@preconcurrencyimport goes after the library one, causing compilation issues.I'm unsure of what would be the best tool fix for this (we just added
// swiftformat:ignore:this sortImportsto the affected lines) but wanted to make sure you were aware of the issue.