Skip to content

DICOMKit v2.2.1 — Strict-Concurrency Bridge Fix & Warnings Cleanup

Latest

Choose a tag to compare

@SureshKViswanathan SureshKViswanathan released this 06 Jul 16:27

Patch release: Swift 6 strict-concurrency bridge fix plus package-wide warning cleanup. Both swift build and swift build -Xswiftc -warnings-as-errors pass cleanly; no runtime behavior changes.

Fixed — Swift 6 Strict-Concurrency Task Bridge in CLI Targets

  • Fixed the DispatchSemaphore + Task {} async-to-sync bridge pattern used by CLI entry points (dicom-jpip, dicom-3d, dicom-j2k, dicom-viewer) so strict concurrency no longer flags data-race sendability risks. The bridge now uses Task.result with an explicitly documented manually-synchronized capture (nonisolated(unsafe)), preserving runtime behavior.
  • Cleaned up adjacent strict/warnings-as-errors diagnostics in shared runtime files (ScriptEngine, DICOMDIRReader/DICOMDIRWriter, ImagePreprocessor, ImageResizer, JP3DVolumeBridge, JP3DVolumeDocument, StudyManager, gateway helpers, compression manager).

Fixed — Remaining -warnings-as-errors Diagnostics Across the Package

  • dicom-3d: never-mutated var locals converted to let; redundant try/try? removed from non-throwing DataSet accessor calls.
  • DICOMWeb: redundant await removed from synchronous same-isolation calls; unused guard let url binding replaced with an existence test; unused locals dropped.
  • DICOMStudio: pure static J2K test helpers marked nonisolated (they already executed off the main actor); pipe-drain captures use the documented nonisolated(unsafe) + happens-before pattern; cine timer callback wrapped in MainActor.assumeIsolated; slider Binding setters made Sendable-safe; unused locals removed.

Full changelog: https://github.com/Raster-Lab/DICOMKit/blob/main/CHANGELOG.md