clearer errors
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- zig
- Domain
- developer-experience
Research direction
Reproduce the example with zig build build-lib:bindings, then inspect src/js/wrap_function.zig around line 180 where the convertArg: unsupported type bool error is reported. Improve the diagnostic so it identifies the user-facing function argument and the unsupported value more clearly, then rerun the build to confirm the resulting error.
Written by the indexing model from the issue text.
Description
Right now it's a bit devex unfriendly if you use a non js wrapped value as an arg to a function signature. For example:
pub fn foo(self: *const Bar, my_bool: bool) !void { ... }
The error, when you try to build:
➜ zig build build-lib:bindings
build-lib:bindings
└─ install bindings
└─ compile lib bindings Debug native 1 errors
zig-pkg/zapi-2.2.0-rIqzUXBaBADUsvvvB2N5kOBdLEO0rGPhowTqmIXe3qVh/src/js/wrap_function.zig:180:5: error: convertArg: unsupported type bool
@compileError("convertArg: unsupported type " ++ @typeName(T));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
it does not tell you exactly where/what went wrong, but only something internally that went wrong, and unless you're familiar with zapi the error can be quite confusing.
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hemilabs/ui-monorepo#2332 ·
-
Help-Wanted Needs-Triage Package-Update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-pkgs#438662 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
olcf/olcf-test-harness#278 · 1 comment ·