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

need to deprecate binary_codec_sv2 and restructure binary_sv2 + derive_codec_sv2 #1462

Open
Shourya742 opened this issue Feb 8, 2025 · 3 comments · May be fixed by #1463
Open

need to deprecate binary_codec_sv2 and restructure binary_sv2 + derive_codec_sv2 #1462

Shourya742 opened this issue Feb 8, 2025 · 3 comments · May be fixed by #1463

Comments

@Shourya742
Copy link
Contributor

The current structure of binary_sv2 does not follow best practices. Typically, a crate defining a proc_macro only includes an additional crate for the macro’s implementation. However, in binary_sv2, we have two separate crates—one for the proc_macro implementation and another for the primitives required for macro scaffolding. Due to the tightly coupled nature of the proc_macro implementation with the module structure, restructuring it requires rewriting some parts of the macro to align with the proposed design.

Kudos to @plebhash for pointing this out and suggesting a better structure: #1459 (comment)

@Shourya742 Shourya742 linked a pull request Feb 8, 2025 that will close this issue
@plebhash
Copy link
Collaborator

plebhash commented Feb 9, 2025

one detail coming from #1459 that we should clean up here is some leftover lifetime parameters that were originally motivated by serde support:

reference: 3f80718#r1947844273

@plebhash plebhash changed the title Restructure the binary_sv2 crate. need to deprecate binary_codec_sv2 and restructure binary_sv2 + derive_codec_sv2 Feb 10, 2025
@Shourya742
Copy link
Contributor Author

Reimplement or redesign parts of proc_macro in derive_codec to work around bugs like this: #1468 (comment).

@plebhash plebhash added this to the 1.3.0 milestone Feb 11, 2025
@plebhash
Copy link
Collaborator

this will introduce breaking changes to binary_sv2 APIs

@plebhash plebhash removed this from the 1.3.0 milestone Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo 📝
Development

Successfully merging a pull request may close this issue.

2 participants