registerDecls swallows its options parameter
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- zig
- Domain
- backend-api-design
Research direction
Start with src/register_decls.zig and inspect registerDecls alongside its createCallback call, then review the context from issue #59. Define whether options should be forwarded or removed/documented, and consider the public API implications; done means registerDecls no longer silently discards an accepted parameter.
Written by the indexing model from the issue text.
Description
Context
Noted while reviewing #59. registerDecls(decls, options) accepts a comptime options parameter but discards it (_ = options;), while internally passing a hardcoded .{} as the options to createCallback. The parameter is dead weight in a public signature — callers can pass anything and it silently does nothing.
Proposal
Either:
- forward
options(or a per-decl subset of it) tocreateCallbackso callers can use arg/return hints (ArgHint, returns hints) withregisterDecls, or - remove/document the parameter as reserved until there is a concrete design for it.
Ref: src/register_decls.zig
- Dominant language
- Zig
- Stars
- 4
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ChainSafe/zapi
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Type: Maintenance
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
clearer errors Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/magentic-ui#588 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
alexgorbatchev/simple-ptt#3 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CorrelAid/formtransform#44 ·