Skip to content

feat(lister.go): Add opendal_list_options_set_versions and opendal_list_options_set_deleted#7645

Open
FrankYang0529 wants to merge 1 commit into
apache:mainfrom
FrankYang0529:opendal-7632
Open

feat(lister.go): Add opendal_list_options_set_versions and opendal_list_options_set_deleted#7645
FrankYang0529 wants to merge 1 commit into
apache:mainfrom
FrankYang0529:opendal-7632

Conversation

@FrankYang0529
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #7632

Rationale for this change

The Go binding lacked support for listing object versions and delete markers, which are already supported in the Rust core via list_with_versions and list_with_deleted capabilities.

What changes are included in this PR?

  • C binding: Added versions and deleted fields to opendal_list_options, with corresponding setter functions opendal_list_options_set_versions and opendal_list_options_set_deleted.
  • C binding: Added list_with_versions and list_with_deleted fields to opendal_capability and its From<core::Capability> mapping.
  • Go binding: Added ListWithVersions(bool) and ListWithDeleted(bool) functional options, FFI wrappers, and Capability.ListWithVersions() / Capability.ListWithDeleted() methods.

Are there any user-facing changes?

Two new functional options are now available when calling op.List():

  op.List("path/", opendal.ListWithVersions(true))
  op.List("path/", opendal.ListWithDeleted(true))

AI Usage Statement

OpenCode with claude-sonnet-4.6.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels May 30, 2026
@dentiny
Copy link
Copy Markdown
Member

dentiny commented May 30, 2026

Hey could you please take a look at CI? Ping me anytime, thanks!

@FrankYang0529 FrankYang0529 force-pushed the opendal-7632 branch 3 times, most recently from 18ec42e to ed1741d Compare May 30, 2026 10:06
Comment thread bindings/c/src/metadata.rs Outdated
Comment thread bindings/go/tests/behavior_tests/list_test.go Outdated
Comment thread bindings/go/string_ownership_test.go Outdated
@dentiny
Copy link
Copy Markdown
Member

dentiny commented Jun 1, 2026

Hi @FrankYang0529 , do you mind re-requesting review and ping me when ready? Thanks!

@FrankYang0529 FrankYang0529 requested a review from dentiny June 1, 2026 12:28

var parsedOverrides map[string]bool

func getCapOverrides() map[string]bool {
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.

I think I've already added the util function to a more centralized place, could you please use that instead?

func getCapOverrides() map[string]bool {

@FrankYang0529 FrankYang0529 force-pushed the opendal-7632 branch 2 times, most recently from 2d938cd to 1e71d79 Compare June 2, 2026 11:59
@FrankYang0529 FrankYang0529 requested a review from dentiny June 2, 2026 12:27
@dentiny
Copy link
Copy Markdown
Member

dentiny commented Jun 4, 2026

=== CONT  TestBehavior/WriteWithUserMetadata
SIGSEGV: segmentation violation
PC=0x1017c4fac m=4 sigcode=2 addr=0x100000
signal arrived during cgo execution

goroutine 82 gp=0x140003f56c0 m=4 mp=0x1400005fb08 [syscall]:
runtime.cgocall(0x1004463c0, 0x14000efd1e0)
	/Users/runner/hostedtoolcache/go/1.22.5/arm64/src/runtime/cgocall.go:157 +0x44 fp=0x140004cc8c0 sp=0x140004cc880 pc=0x1002f0f84
github.com/ebitengine/purego.syscall_syscall15X(0x1017c4f68, 0x14000106060, 0x12976c6fc, 0x0, 0x140001081c8, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/runner/go/pkg/mod/github.com/ebitengine/purego@v0.8.4/syscall_sysv.go:24 +0x158 fp=0x140004cc9c0 sp=0x140004cc8c0 pc=0x1004456c8

I met a similar CI failure on my PR as well, could be an existing issue on main branch

@dentiny
Copy link
Copy Markdown
Member

dentiny commented Jun 4, 2026

@FrankYang0529 You might need to rerun the failed CI to confirm, but I should have fixed the segfault issue -- don't see it any longer since the fix commit.

…st_options_set_deleted

Signed-off-by: PoAn Yang <payang@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(binding/go): Add ListWithVersions and ListWithDeleted support

2 participants