Replace Sourcery with swift-mocking for mock generation - #150
Draft
WezSieTato with Copilot wants to merge 3 commits into
Draft
Replace Sourcery with swift-mocking for mock generation#150WezSieTato with Copilot wants to merge 3 commits into
WezSieTato with Copilot wants to merge 3 commits into
Conversation
- Add swift-mocking dependency to Package.swift - Replace // sourcery: AutoMockable with @mocked macro on 5 protocols - Update all test files to use swift-mocking API - Delete Sourcery stencil, generated mocks, and config - Remove Sourcery from Mintfile - Remove Sourcery from Fastfile lanes - Clean up .swiftlint.yml Co-authored-by: WezSieTato <4258662+WezSieTato@users.noreply.github.com>
Co-authored-by: WezSieTato <4258662+WezSieTato@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace Sourcery with swift-mocking library for mocking
Replace Sourcery with swift-mocking for mock generation
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces Sourcery code generation with swift-mocking macros for compile-time mock generation. Removes all Sourcery tooling, stencils, and generated files.
Protocol changes
// sourcery: AutoMockable→@Mocked(compilationCondition: .debug)on all 5 mockable protocols. Addedimport Mockingto each.Test migration
Updated mock API across 8 test files:
Dependency & build changes
swift-mocking0.2.2+ to bothScanNowCoreandScanNowCoreTeststargetsRemoved
sourcery/AutoMockable.stencilApp/Tests/ScanNowCoreTests/generated/AutoMockable.generated.swiftApp/Tests/ScanNowCoreTests/.sourcery.ymlkrzysztofzablocki/Sourcery@2.3.0from Mintfilefastlane-plugin-sourceryfrom Pluginfile/Gemfile.lockcheck_generated_codeandgenerate_codelanesWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
www.swift.org/usr/share/swift/usr/bin/swift-package /usr/share/swift/usr/bin/swift-package resolve(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.