Skip to content

Conversation

@caldrian
Copy link
Contributor

@caldrian caldrian commented Oct 29, 2025

TaskWPB-8907 Migrate Objective C code to Swift

Issue

WireSystem does not contain any Obj-C code anymore.
Still there are currently three header files with preprocessor-macros used by other projects.
As a small step towards the goal of migrating WireSystem to a Swift package this PR moves ZMSLogging.h out of WireSystem by creating duplicates in other modules where needed.


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the logging infrastructure by moving ZMSLogging.h from WireSystem to individual modules and removes the unused NSData+WireTesting files. The PR also includes Swift toolchain updates and minor improvements.

  • Moved ZMSLogging.h from centralized WireSystem module to module-specific headers with tailored macros
  • Removed unused NSData+WireTesting files from WireTesting project
  • Updated Swift toolchain version to 6.2 in WireDomain package
  • Enhanced Sourcery template to handle array types properly
  • Fixed typo in ZMSLog.swift comment

Reviewed Changes

Copilot reviewed 48 out of 50 changed files in this pull request and generated no comments.

Show a summary per file
File Description
wire-ios-utilities/Source/ZMSLogging.h New module-specific logging header with Error, Warn, and Debug macros
wire-ios-transport/Source/Logging/ZMSLogging.h Updated transport module logging header, removed ZMLogPublic and Foundation import
wire-ios-sync-engine/Source/ZMSLogging.h New sync-engine module-specific logging header with Error, Info, and Debug macros
wire-ios-request-strategy/Sources/ZMSLogging.h New request-strategy module-specific logging header with Info and Debug macros
wire-ios-mocktransport/Source/ZMSLogging.h New mocktransport module-specific logging header with Error and Debug macros
wire-ios-data-model/Source/ZMSLogging.h New data-model module-specific logging header with Error, Warn, and Debug macros
wire-ios-system/Source/WireSystem.h Removed import of centralized ZMSLogging.h
WireDomain/Package.swift Updated Swift tools version to 6.2 and added new Swift language features
WirePlugins/Plugins/SourceryPlugin/Stencils/AutoMockable.stencil Enhanced template to handle array and optional existential types
wire-ios-system/Source/ZMSLog.swift Fixed typo: "usefull" to "useful"
Various .m files Added imports for module-specific ZMSLogging.h headers
wire-ios-testing project files Removed NSData+WireTesting files from public headers
wire-ios-system/WireSystem.xcodeproj Removed ZMSLogging.h from public headers and removed empty Frameworks group
Multiple Package.swift files Removed redundant comment about swift-tools-version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@caldrian caldrian changed the base branch from develop to chore/update-sourcery-stencil-WPB-11829 October 29, 2025 09:18
Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: can't you remove the ZMSLogger.h completely? looking at the #define we should not be using it

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

Test Results

    8 files    639 suites   8m 34s ⏱️
6 013 tests 6 006 ✅ 3 💤 4 ❌
6 024 runs  6 021 ✅ 3 💤 0 ❌

For more details on these failures, see this check.

Results for commit 5bc987f.

♻️ This comment has been updated with latest results.

@caldrian caldrian marked this pull request as draft October 30, 2025 10:38
…4-010dcca40affa272fb0f554f6f1663ebedfed343' into chore/update-sourcery-stencil-WPB-11829
Base automatically changed from chore/update-sourcery-stencil-WPB-11829 to develop October 30, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants