Giter Club home page Giter Club logo

Comments (5)

alvarhansen avatar alvarhansen commented on August 14, 2024 1

Yes, i am using latest commit. I was able to create project where this bug reproduces:
alvarhansen@62b6889

MyFramework2 demonstrates the bug and MyFramework3 shows how it should work.

In MyFramework2Mocks.generated.swift ViewModelView2Mock has empty
InitializerProxy which is incorrect. Instead it should have
fileprivate init(sourceLocation: Mockingbird.SourceLocation) as can
be seen in MyFramework3Mocks.generated.swift

from mockingbird.

andrewchang-bird avatar andrewchang-bird commented on August 14, 2024

Thanks for reporting, Alvar. A few questions:

  1. In your example are MyProtocol1 and MyProtocol2 in the same module as MyVC?
  2. Are you including the default supporting source files for UIViewController?

from mockingbird.

alvarhansen avatar alvarhansen commented on August 14, 2024
  1. No. MyVC.swift and MyProtocol2.swift are in one framework and MyProtocol1.swift in separate framework.
  2. Yes, the supporting files are included and are working for other mocked types in this framework.

The issue seems to be that MyVC.swift and MyProtocol2.swift do not import Foundations, and because of that Swift Foundation support is never used when resolving inherited types at https://github.com/birdrides/mockingbird/blob/78707c9544d78535e68223e46fabdbb07b1ae3ab/MockingbirdGenerator/Parser/Operations/FlattenInheritanceOperation.swift#L111

from mockingbird.

andrewchang-bird avatar andrewchang-bird commented on August 14, 2024

Just to check, are you on 0.9.0 (your branch seems to still be on 0.8.0)? I think this might be fixed by #19. Can you update and see if that solves it?

from mockingbird.

andrewchang-bird avatar andrewchang-bird commented on August 14, 2024

Thanks! Definitely similar to the previous issue you found except across modules (versus files within the same module).

from mockingbird.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.