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

internal/gengapic: remove omit-snippets option #1332

Open
quartzmo opened this issue May 18, 2023 · 6 comments
Open

internal/gengapic: remove omit-snippets option #1332

quartzmo opened this issue May 18, 2023 · 6 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@quartzmo
Copy link
Member

The omit-snippets generator option is no longer used and should be removed, including all related conditionals in internal/gengapic.

@quartzmo quartzmo added type: cleanup An internal cleanup or hygiene concern. priority: p3 Desirable enhancement or fix. May not be included in next release. labels May 18, 2023
@jjkoh95
Copy link

jjkoh95 commented Dec 27, 2023

Hi @quartzmo
can I understand if there is any flag to remove snippets?
Thanks

@quartzmo
Copy link
Member Author

quartzmo commented Jan 2, 2024

@jjkoh95 I'm sorry, I don't understand exactly. What do you want to do?

@jjkoh95
Copy link

jjkoh95 commented Jan 3, 2024

Hi @quartzmo
I wish to generate clients without snippets, is it possible?
I'm not sure if this project is dedicated only to google apis, but I have some protobuf definition that i need to generate its equivalent http clients.

@quartzmo
Copy link
Member Author

quartzmo commented Jan 3, 2024

Yes, the omit-snippets flag is documented in the readme. If set to true (the default is false), snippets will not be generated. However, this flag may be removed in the future. If you indeed use it in production, please comment on this issue to let us know.

@quartzmo quartzmo closed this as completed Jan 3, 2024
@quartzmo quartzmo reopened this Jan 3, 2024
@jjkoh95
Copy link

jjkoh95 commented Jan 4, 2024

I believe this flag might have already been removed in the latest version, setting ommit-snippets to true still give me the snippets.

github.com/googleapis/gapic-generator-go v0.39.4

It is not too painful for me to remove it everytime i generate it, but it seems to be redundant given the example test file is generated altogether.

@quartzmo
Copy link
Member Author

quartzmo commented Jan 4, 2024

Unfortunately, I think you'll just need to keep removing the snippets. To comply with this issue, the motivation for which is to simplify the codebase, the omit-snippets flag will someday be removed anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

2 participants