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

Fix generation of empty EncodeScale and DecodeScale methods #41

Open
fasmat opened this issue Jan 24, 2023 · 0 comments
Open

Fix generation of empty EncodeScale and DecodeScale methods #41

fasmat opened this issue Jan 24, 2023 · 0 comments
Assignees

Comments

@fasmat
Copy link
Member

fasmat commented Jan 24, 2023

The general process of scalegen is:

  1. Scan a package for tags for which types it should generate encode and decode methods
  2. Generate empty EncodeScale and DecodeScale methods.
  3. Fill the methods according to the type definition

Code generation fails if the code doesn't compile during any of those steps. Step 1 should work without the code being free of compile errors. This would allow to delete xxx_scale.go files and regenerate them with scalegen. At the moment this fails because then the specified types don't implement the interfaces necessary to be encoded or decoded, causing compile errors.

@fasmat fasmat self-assigned this Jan 24, 2023
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

1 participant