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

Unable to use Sourcery-generated mocks as sources without adding extensions #1365

Open
Fostonger opened this issue Sep 1, 2024 · 1 comment

Comments

@Fostonger
Copy link

I'm working on creating a generator that collects all the necessary mocks to initialize a class. These mocks are generated using Sourcery, and it appears that the only way to include them in the source files is by appending extension to their filenames and using the extension in --force-parse argument.
However, for the past years, we've been generating mocks without needing to add any additional extensions like ".generated." to their filenames. This new requirement is causing some issues with our workflow.
Is there any workaround or configuration setting that would allow us to continue using these generated mocks without modifying their filenames to include specific extensions? Any guidance or suggestions would be greatly appreciated.

@krzysztofzablocki
Copy link
Owner

Sourcery never scanned code that was generated by Sourcery, it's a chicken and egg situation and could cause very weird and inconsistent behaviour, that's why we added --force-parse, if someone really needs 2 pass then they can use it, but not in regular execution flow

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

No branches or pull requests

2 participants