Skip to content
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

Rewrite internals and add new APIs and deprecation warnings. #56

Merged
merged 22 commits into from
Mar 8, 2024
Merged

Conversation

lilith
Copy link
Member

@lilith lilith commented Mar 7, 2024

This release makes user-facing changes with deprecation warnings. Please review your build warnings to avoid breakage in the future.

  • There are new classes for attaching source image data to jobs; use MemorySource.* over ByteSource and BufferedStreamSource.* instead of StreamSource.
  • Microsoft.IO.RecyclableMemoryStream 3.x is now required
  • System.Buffers and System.Memory 4.x+ are now required on .NET 4.x / .NET Standard 2.0
  • InputWatermark.Source is now IMemorySource instead of IBytesSource

It also makes lots of internal changes to increase performance, eliminate unnecessary allocations/copies, and improve compatibility with AOT and trimming.

It is now possible to provide ReadOnlyMemory data and IOwnedMemory data, without copying to a byte[] array. The new IAsyncMemorySource interface allows for asynchronous data sources, and the new IMemorySource interface allows for synchronous data sources.

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 41.27907% with 404 lines in your changes are missing coverage. Please review.

Project coverage is 46.70%. Comparing base (ae68b97) to head (6cbbb6b).

Files Patch % Lines
src/Imageflow/Bindings/JobContext.cs 50.84% 53 Missing and 34 partials ⚠️
...c/Imageflow/Fluent/IOutputDestinationExtensions.cs 10.63% 41 Missing and 1 partial ⚠️
src/Imageflow/Fluent/MemorySource.cs 7.89% 32 Missing and 3 partials ⚠️
src/Imageflow/Fluent/BufferedStreamSource.cs 49.09% 19 Missing and 9 partials ⚠️
src/Imageflow/Fluent/ImageJob.cs 56.25% 25 Missing and 3 partials ⚠️
...nternal.Helpers/StreamMemoryExtensionsPolyfills.cs 32.25% 20 Missing and 1 partial ⚠️
src/Imageflow/Bindings/JsonResponse.cs 42.85% 19 Missing and 1 partial ⚠️
...ageflow/Internal.Helpers/UnmanagedMemoryManager.cs 5.00% 19 Missing ⚠️
src/Imageflow/Fluent/BytesDestination.cs 38.46% 11 Missing and 5 partials ⚠️
src/Imageflow/Fluent/StreamDestination.cs 0.00% 14 Missing ⚠️
... and 16 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
- Coverage   50.64%   46.70%   -3.95%     
==========================================
  Files          42       55      +13     
  Lines        2235     2715     +480     
  Branches      385      484      +99     
==========================================
+ Hits         1132     1268     +136     
- Misses        910     1212     +302     
- Partials      193      235      +42     

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

@lilith lilith merged commit 0d39641 into main Mar 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants