Skip to content

Conversation

@aleksandarskrbic
Copy link
Contributor

@aleksandarskrbic aleksandarskrbic commented Nov 22, 2025

What changes are proposed in this pull request?

Fixes #680

Avoid .unwrap() in visit_scan_metadata, replace return parameter to ExternResult<NullableCvoid>

Usage example in C:

  ExternResultNullableCvoid result = visit_scan_metadata(scan_metadata, context->engine, engine_context, scan_row_callback);
  if (result.tag != OkNullableCvoid) {
    printf("Error visiting scan metadata\n");
    exit(-1);
  }

How was this change tested?

Running read_table.c example

@codecov
Copy link

codecov bot commented Nov 22, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.74%. Comparing base (be93add) to head (039edcf).

Files with missing lines Patch % Lines
ffi/src/scan.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1526      +/-   ##
==========================================
- Coverage   84.75%   84.74%   -0.01%     
==========================================
  Files         122      122              
  Lines       33012    33015       +3     
  Branches    33012    33015       +3     
==========================================
  Hits        27980    27980              
- Misses       3660     3663       +3     
  Partials     1372     1372              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added the breaking-change Change that require a major version bump label Nov 22, 2025
@aleksandarskrbic aleksandarskrbic changed the title feat(ffi): do not panic in visit_scan_metadata feat(ffi)!: do not panic in visit_scan_metadata Nov 23, 2025
Copy link
Member

@nicklan nicklan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break the examples so we'll need to fix those too.

Copy link
Member

@nicklan nicklan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh, actually I see, it won't break them, but can we add a check that this succeeded in the examples, rather than just ignoring the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Change that require a major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In FFI, don't panic if visit_scan_files returns an error

2 participants