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

Option to disable CopyWith generation #352

Closed
sigis151 opened this issue Jun 17, 2024 · 6 comments · Fixed by #357
Closed

Option to disable CopyWith generation #352

sigis151 opened this issue Jun 17, 2024 · 6 comments · Fixed by #357

Comments

@sigis151
Copy link

is there abitily to disable CopyWith methods generation to reduce generation time?

Copy link

👋 @sigis151
Thank you for raising an issue. I will investigate the issue and get back to you as soon as possible.
Please make sure you have provided enough context.

This library is created and maintained by me, @budde377. Please consider supporting my work and ensure our survival by donating here.

@budde377
Copy link
Contributor

Thanks for reaching out @sigis151 - before we consider this, I would like to understand your setup better. What kind of generation times are you seeing and how many GraphQL files are you generating?

@sigis151
Copy link
Author

Hi,
we have around ±100 different queries in the project and it can take up to a minute to rebuild (dart run build_runner build --delete-conflicting-outputs) all generated files, and as we re-map all gql responses to our own domain classes I don't see any real need for copy methods that are generated :)

@budde377
Copy link
Contributor

I've added the disableCopyWithGeneration. Setting this to true will disable copy-with generation.

@sigis151
Copy link
Author

sigis151 commented Sep 2, 2024

Do when statements depend on CopyWith as those are also disabled with disableCopyWithGeneration?

@budde377
Copy link
Contributor

budde377 commented Sep 4, 2024

Those should be added back again in 1.0.1.

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.

2 participants