Skip to content

feat: Remove some long deprecated APIs - #2206

Merged
tmathern merged 18 commits into
mainfrom
gpeacock/remove_deprecated_apis_1
Jun 11, 2026
Merged

feat: Remove some long deprecated APIs#2206
tmathern merged 18 commits into
mainfrom
gpeacock/remove_deprecated_apis_1

Conversation

@gpeacock

@gpeacock gpeacock commented Jun 3, 2026

Copy link
Copy Markdown
Member

This removes some of the longer deprecated APIs:

Including:
Ingredient:
from_file
from_file_with_folder
from_file_with_options
from_memory
set_memory_thumbnail
IngredientOptions
DefaultOptions

c_ffi_api
c2pa_read_file
c2pa_read_ingredient_file
c2pa_sign_file

Store is not public but these methods were no longer used.
Store:
verify_from_path
load_jumbf_from_path

I also updated c2pattool and the client.rs example to not use the deprecated/removed methods.

Several unit and integration tests updated or removed due the the changes.
Removed if they were only testing things that no longer exist.

gpeacock added 2 commits June 2, 2026 19:11
- Remove Ingredient::from_file, from_file_with_folder, from_file_with_options,
  from_file_impl, from_memory, set_memory_thumbnail, IngredientOptions trait,
  and DefaultOptions struct
- Remove deprecated C FFI functions c2pa_read_file, c2pa_read_ingredient_file,
  c2pa_sign_file and the json_api module they depended on
- Update CLI --ingredient flag to use Builder::add_ingredient_from_stream with
  explicit resource writing instead of Ingredient::from_file_with_folder
- Update cli/src/info.rs to use Builder::add_ingredient_from_stream instead of
  deprecated from_file_with_options
- Make Ingredient::with_base_path and Builder base_path/intent fields private
- Update client.rs example to use BuilderIntent::Edit instead of manual parent
  ingredient setup
- Fix org.cai.ingredientIds -> ingredientIds in identity test fixture
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.26%. Comparing base (f999e1a) to head (334ffd0).

Files with missing lines Patch % Lines
cli/src/main.rs 0.00% 14 Missing ⚠️
sdk/src/ingredient.rs 85.71% 1 Missing ⚠️
sdk/src/manifest.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2206      +/-   ##
==========================================
- Coverage   78.56%   78.26%   -0.31%     
==========================================
  Files         176      175       -1     
  Lines       46407    46004     -403     
==========================================
- Hits        36460    36004     -456     
- Misses       9947    10000      +53     

☔ View full report in Codecov by Harness.
📢 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.

@codspeed-hq

codspeed-hq Bot commented Jun 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 30 untouched benchmarks
⏩ 64 skipped benchmarks1


Comparing gpeacock/remove_deprecated_apis_1 (334ffd0) with main (f999e1a)

Open in CodSpeed

Footnotes

  1. 64 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gpeacock gpeacock self-assigned this Jun 3, 2026
Comment thread sdk/src/builder.rs

@tmathern tmathern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I will need a getter for base_path on Builder, like this: #2208

Draft changes based on this branch are in contentauth/c2pa-cpp#228. (Use local build steps from the C++ repo to test it out).

Update: Merged change into this branch.

@tmathern tmathern added the check-release Force the full Tier 1A+1B+2 suite on this PR label Jun 8, 2026
@tmathern tmathern self-assigned this Jun 8, 2026
@tmathern
tmathern self-requested a review June 8, 2026 17:41
@tmathern
tmathern marked this pull request as ready for review June 8, 2026 22:04
@tmathern

tmathern commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Related C++ update: contentauth/c2pa-cpp#228

@tmathern

tmathern commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Related Python update: contentauth/c2pa-python#282

@tmathern tmathern changed the title chore: Remove some long deprecated APIs feat: Remove some long deprecated APIs Jun 11, 2026
@tmathern
tmathern merged commit 0a1a717 into main Jun 11, 2026
67 of 68 checks passed
@tmathern
tmathern deleted the gpeacock/remove_deprecated_apis_1 branch June 11, 2026 20:24
This was referenced Jun 11, 2026
crandmck added a commit that referenced this pull request Jun 18, 2026
@caiopensrc caiopensrc mentioned this pull request Jun 22, 2026
This was referenced Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

check-release Force the full Tier 1A+1B+2 suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants