-
Notifications
You must be signed in to change notification settings - Fork 489
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
refactor (bindings/zig): Improvements #5247
Conversation
Why?? ================================================================================
"operator advanced operations" - Unsupported
================================================================================
/home/kassane/opendal/bindings/zig/src/opendal.zig:269:5: 0x103d9a0 in codeToError (test)
return switch (code) {
^
/home/kassane/opendal/bindings/zig/src/opendal.zig:113:13: 0x103f725 in copy (test)
try codeToError(err.*.code);
^
/home/kassane/opendal/bindings/zig/src/opendal.zig:385:5: 0x1040031 in test.operator advanced operations (test)
try op.copy("/testdir/renamed.txt", "/testdir/copied.txt");
^ opendal/bindings/zig/src/opendal.zig Lines 394 to 402 in b2c839c
|
async unittest get error: GDB outputWarning: 'set target-async', an alias for the command 'set mi-async', is deprecated.
Use 'set mi-async'.
No line 468 in file "/home/kassane/opendal/bindings/zig/src/opendal.zig".
Running executable
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
undefined
Error Tests (0.07ms)
Semantic Analyzer (0.01ms)
operator basic operations (6.53ms)
operator advanced operations (1.36ms)
Breakpoint 2, opendal.writeData () at opendal.zig:448
448 fn writeData(op: *Operator, path: []const u8, data: []const u8) anyerror!void {
Program
received signal SIGSEGV, Segmentation fault.
0x00007ffff7500837 in core::str::validations::next_code_point<core::slice::iter::Iter<u8>> (bytes=0xaaaaaaaaaaaaaaaa) at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/str/validations.rs:35
warning: 35 /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/str/validations.rs: File or directory does not exist Tested
Edit May be blocked by: |
3119fc7
to
2d88433
Compare
Thank you @kassane for you effort, I will review this PR later this week. |
* Operator wrapper added * more unittests * add async (library) support * replace `@cImport/@cInclude` to `translate-c` only * add custom testrunner output * clean `build.zig` Signed-off-by: Matheus C. França <[email protected]>
Nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kassane for this great work!
Which issue does this PR close?
N/D
Rationale for this change
It tends to be usable and testable.
What changes are included in this PR?
@cImport/@cInclude
totranslate-c
only (see: zig#20875)Note
zig build [run|test] --summary [all|new|failures|none]
show build-runner tree-output, not test output.Are there any user-facing changes?
testable and easy to use.