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

Infinite loop when a function parameter has an unknown attribute #310

Open
mhdhejazi opened this issue Aug 24, 2022 · 2 comments · May be fixed by #315
Open

Infinite loop when a function parameter has an unknown attribute #310

mhdhejazi opened this issue Aug 24, 2022 · 2 comments · May be fixed by #315

Comments

@mhdhejazi
Copy link

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:

image

@bbrk24 bbrk24 linked a pull request Sep 29, 2022 that will close this issue
@kielgillard
Copy link
Contributor

My coworkers and I bumped into this issue today... any chance the PR can be reviewed and merged soon, @andrewchang-bird?
#315

@stidch
Copy link

stidch commented Feb 2, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants