feat: Remove some long deprecated APIs - #2206
Conversation
- 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
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.
…m/contentauth/c2pa-rs into gpeacock/remove_deprecated_apis_1
|
Related C++ update: contentauth/c2pa-cpp#228 |
|
Related Python update: contentauth/c2pa-python#282 |
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.