Skip to content

Use compile error in proc macro#2186

Open
Shourya742 wants to merge 2 commits into
stratum-mining:mainfrom
Shourya742:2026-06-09-use-compiler-error-in-proc-macro
Open

Use compile error in proc macro#2186
Shourya742 wants to merge 2 commits into
stratum-mining:mainfrom
Shourya742:2026-06-09-use-compiler-error-in-proc-macro

Conversation

@Shourya742

Copy link
Copy Markdown
Member

closes: #2166

@Shourya742 Shourya742 changed the title Use compiler error in proc macro Use compile error in proc macro Jun 9, 2026
@plebhash plebhash self-requested a review June 9, 2026 15:36

@plebhash plebhash left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

non-blocking clanker suggestion:

add compile-fail tests (e.g., in binary-sv2 tests) for unsupported syntax + reserved field names so this behavior stays locked in and future refactors don’t reintroduce panic paths

@Shourya742 Shourya742 force-pushed the 2026-06-09-use-compiler-error-in-proc-macro branch from 8843c24 to c0e0d6b Compare June 14, 2026 14:52
@Shourya742

Copy link
Copy Markdown
Member Author

non-blocking clanker suggestion:

add compile-fail tests (e.g., in binary-sv2 tests) for unsupported syntax + reserved field names so this behavior stays locked in and future refactors don’t reintroduce panic paths

We have another issue on proc macro to restrict binary_sv2 only for sv2 types, maybe this can be added then.

@plebhash

Copy link
Copy Markdown
Member

We have another issue on proc macro to restrict binary_sv2 only for sv2 types, maybe this can be added then.

can you please take note there?

@Shourya742

Copy link
Copy Markdown
Member Author

We have another issue on proc macro to restrict binary_sv2 only for sv2 types, maybe this can be added then.

can you please take note there?

Done

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.

Binary_sv2(Proc macro): Replace panics with compile_errors

2 participants