mockingbird
mockingbird copied to clipboard
Infinite loop when a function parameter has an unknown attribute
https://github.com/birdrides/mockingbird/blob/210ec238b470ac6fd60f7ecfa2218b544519773f/Sources/MockingbirdGenerator/Parser/Models/Function.swift#L91-L112
If you look at line 100, it seems index
will always be 0
since @
isn't a letter nor a number which means mutableComponent
won't change and we'll keep hitting the same branch indefinitely.
You can reproduce the issue by annotating a parameter with @Sendable
for example and you'll see something like this:
My coworkers and I bumped into this issue today... any chance the PR can be reviewed and merged soon, @andrewchang-bird? https://github.com/birdrides/mockingbird/pull/315
I just wanted to play around with mockingbird in our project and I'm not able to generate mocks since it ends up in the infinite loop as described above.
It's now 2024 and I wonder why there wasn't any activity on this. I was actually hoping that this framework is more up to date than the current one we're using. But know I have some doubts honestly.
Any plans to get this fixed?