Code Monkey home page Code Monkey logo

Comments (8)

seanhenry avatar seanhenry commented on June 4, 2024

Hi @andyboyd

Thanks for raising this issue. It looks like from your error message that you are not using the latest version. Can you open the companion app and check that the version number is v0.16? If it is lower can you install the latest version and try again?

I haven't been able to reproduce this issue using v0.16 and Xcode 10 so far. Can you attach a simple project where it is reproducible if you still get the problem with v0.16?

from swiftmockgeneratorforxcode.

andyboyd avatar andyboyd commented on June 4, 2024

I've updated to version 0.16 and I'm still seeing the same error (except now it says "Could not find a class or protocol"!)

I tried to reproduce it in a fresh project, and I did manage, but then I cleaned something up and the bug went away, and I haven't been able to reproduce it again. Our project has a ReplayKit Broadcast Upload Extension in it, and we have 2 copies of each target for live and dev builds. Only the Dev target is configured for testing.

The bug appeared when I tried to mirror that setup, but like I say, it went away when I changed something, but I'm not sure what it was I changed. Not sure if that information is helpful to you. I can't really go changing things on our real project, because it's set up the way we need it to be.

I'll investigate a bit more when I get time, unless the above info gives you a lightbulb moment!

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on June 4, 2024

Thanks for the info. The error essentially means that Source Kit could not resolve any inherited types to a protocol or class and the source kit implementation is very basic in this project. Source kit is given all the files in the project directory ignoring any different targets or modules which can lead to some problems. For example, if you have two types with the same name across two different modules then source kit cannot resolve to either because it has no knowledge of those modules.

So perhaps your project was set up in such a way which didn't allow for such a simple source kit implementation. I've been working on a way to support modules and third party frameworks but it's a little way off. I'll close this for now but please reopen if the problem returns. I would be really interesting in finding out what the problem was.

from swiftmockgeneratorforxcode.

joshwoods avatar joshwoods commented on June 4, 2024

@seanhenry We are running into this issue on our end as well with Xcode 10. Not entirely sure what the cause is here, but for our target that is the host of our testing suite, we are also not getting autocomplete. I have a feeling that this may all be related to the mock generator not working as well but I haven't been able to reproduce in sample projects at all either.

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on June 4, 2024

Interesting... If you're not getting autocomplete then that says to me that source kit is not working for you project for some reason. Can you try cleaning the project directory, restarting Xcode, etc and seeing if you can get autocomplete to work? The rule of thumb is if you can resolve to the declaration in Xcode with cmd+click then you should be able to generate a mock. Although there are exceptions to that rule (see above comment).

If you can cmd+click to the declaration in Xcode and the generator still gives you an error let me know and perhaps we can work through this problem to figure out a solution.

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on June 4, 2024

@andyboyd @joshwoods

If you're still having issues I've released a new version which might help.

If it doesn't help then I have a couple of other things to try... See my comment in issue #16

from swiftmockgeneratorforxcode.

andyboyd avatar andyboyd commented on June 4, 2024

New version works again, thanks!

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on June 4, 2024

Awesome! Thanks for letting me know :)

from swiftmockgeneratorforxcode.

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.