-
Notifications
You must be signed in to change notification settings - Fork 509
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
feat(adapters-kv): add rename and copy support to kv adapters #2513
Conversation
@tisonkun @kassane It seems the zig fmt error is unexpected, Can you help me take a look? And in main branch, zig test is still failed
|
Zig changed API -@enumToInt(Code.OK))
+@intFromEnum(Code.OK)) |
@kassane Maybe we need to pin zig toolchain version in CI 😆, The lack of a stable ABI can be troublesome at times. |
Await 0.11.0 release. |
@kassane Would you mind helping us to fix this error by opening another PR? or I can fix it in the current PR. |
try: diff --git a/bindings/zig/test/bdd.zig b/bindings/zig/test/bdd.zig
index c998454c..79748fa3 100644
--- a/bindings/zig/test/bdd.zig
+++ b/bindings/zig/test/bdd.zig
@@ -62,16 +62,16 @@ test "Opendal BDD test" {
.len = std.mem.len(testkit.content),
};
const code = opendal.c.opendal_operator_blocking_write(testkit.p, testkit.path, data);
- try testing.expectEqual(code, @enumToInt(Code.OK));
+ try testing.expectEqual(code, @intFromEnum(Code.OK));
// The blocking file "test" should exist
var e: opendal.c.opendal_result_is_exist = opendal.c.opendal_operator_is_exist(testkit.p, testkit.path);
- try testing.expectEqual(e.code, @enumToInt(Code.OK));
+ try testing.expectEqual(e.code, @intFromEnum(Code.OK));
try testing.expect(e.is_exist);
// The blocking file "test" entry mode must be file
var s: opendal.c.opendal_result_stat = opendal.c.opendal_operator_stat(testkit.p, testkit.path);
- try testing.expectEqual(s.code, @enumToInt(Code.OK));
+ try testing.expectEqual(s.code, @intFromEnum(Code.OK));
var meta: [*c]opendal.c.opendal_metadata = s.meta;
try testing.expect(opendal.c.opendal_metadata_is_file(meta));
@@ -82,7 +82,7 @@ test "Opendal BDD test" {
// The blocking file "test" must have content "Hello, World!"
var r: opendal.c.opendal_result_read = opendal.c.opendal_operator_blocking_read(testkit.p, testkit.path);
defer opendal.c.opendal_bytes_free(r.data);
- try testing.expect(r.code == @enumToInt(Code.OK));
+ try testing.expect(r.code == @intFromEnum(Code.OK));
try testing.expectEqual(std.mem.len(testkit.content), r.data.*.len);
var count: usize = 0; Testing➜ zig build test --summary all
make: Entrando no diretório '/home/kassane/Documentos/incubator-opendal/bindings/c'
mkdir -p ./build
cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
make: Saindo do diretório '/home/kassane/Documentos/incubator-opendal/bindings/c'
Build Summary: 4/4 steps succeeded; 2/2 tests passed
test success
├─ run make success 143ms MaxRSS:55M
└─ run test 2 passed 1ms MaxRSS:10M
└─ zig test Debug native success 1s MaxRSS:816M
➜ zig git:(main) ✗ zig version
0.11.0-dev.3771+128fd7dd0 |
Signed-off-by: owl <[email protected]>
Signed-off-by: owl <[email protected]>
2a7a0ce
to
8b231a0
Compare
I have squashed my commit, So maybe we merge it no need to squash it. And thanks @kassane |
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.
Thanks!
add rename and copy support to kv adapters, it will bring kv base services to rename and copy capability