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

use @generated mark in files created by sea-orm-codegen #2199

Merged
merged 1 commit into from
Apr 17, 2024
Merged

use @generated mark in files created by sea-orm-codegen #2199

merged 1 commit into from
Apr 17, 2024

Conversation

RafDevX
Copy link
Contributor

@RafDevX RafDevX commented Apr 17, 2024

Changes the doc header on generated files to include @generated. This makes it easier for external tools to identify these files as generated and treat them differently according to their own configuration, e.g., code formatters might ignore them. This is the de facto way to indicate a file has been automatically generated, and even Cargo.lock uses it.

This can perhaps be considered a breaking change if someone is relying on the current exact header, so an alternative would be to keep the current comment and add another line after it with // @generated. On the other hand, that would mean almost anything at all changing this crate's writers would too be a breaking change, which is debatable -- this PR does not introduce any changes to e.g. function signatures.

Breaking Changes

  • Different doc header with @generated

This makes it easier for external tools to identify these files as
generated and treat them differently according to their own
configuration.
Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's neat. Thanks!

@tyt2y3
Copy link
Member

tyt2y3 commented Apr 17, 2024

The RC period is for breaking changes :D

@tyt2y3 tyt2y3 merged commit c59e28f into SeaQL:master Apr 17, 2024
@RafDevX RafDevX deleted the generated-mark branch April 17, 2024 22:53
Copy link

github-actions bot commented May 3, 2024

🎉 Released In 1.0.0-rc.4 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

Copy link

github-actions bot commented Aug 4, 2024

🎉 Released In 1.0.0 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

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 this pull request may close these issues.

2 participants