Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluding file mechanism not working (on a custom Swift Package) #328

Open
4 tasks done
Narayane opened this issue Oct 9, 2023 · 3 comments
Open
4 tasks done

Excluding file mechanism not working (on a custom Swift Package) #328

Narayane opened this issue Oct 9, 2023 · 3 comments
Labels
generator bug Causes malformed generated code

Comments

@Narayane
Copy link

Narayane commented Oct 9, 2023

New Issue Checklist

Overview

Hi,

I tried to ignore a file where I have defined a @convention(block) attribute by following https://mockingbirdswift.com/excluding-files

I created a .mockingbird-ignore file at the root of my custom Swift Package just containing the name of the file but it has no effects.

When I activate verbose mode during mock generation mechanism, I can not see the relative file exclusion log, so I suppose it is why that it is not working

Example

The problematic relative file content

import Foundation

//FIXME: understand why https://mockingbirdswift.com/excluding-files not working

protocol DispatchQueueProtocol { //TODO: @all comment protocol to allow mocks generation
    
    func async(execute work: @escaping @convention(block) () -> Void)
}

Expected Behavior

Generator does not consider this file (and this issue does not have to occur)

Environment

  • Mockingbird CLI version (mockingbird version) 0.20.0
  • Xcode and Swift version (swift --version) Xcode 14.3.1, Swift 5.8.1
  • Package manager (CocoaPods, Carthage, SPM project, SPM package) SPM package
  • Unit testing framework (XCTest, Quick/Nimble) XCTest
  • Custom configuration
    • Mockingbird ignore files
    • Supporting source files
@Narayane Narayane added the generator bug Causes malformed generated code label Oct 9, 2023
@Svantulden
Copy link

Same problem here!

@stidch
Copy link

stidch commented Feb 2, 2024

+1

@Narayane @Svantulden Have you found a workaround for this?

@Narayane
Copy link
Author

@andrewchang-bird?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator bug Causes malformed generated code
Projects
None yet
Development

No branches or pull requests

3 participants