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

[Trimming] Simpler image source service provider #4

Closed
wants to merge 6 commits into from

Conversation

simonrozsival
Copy link
Owner

This is an attempt to fix trimming warnings in ImageSourceServiceProvider without changing the existing APIs. The main idea of this approach is to iterate over all the registered image source to image source service mappings (there aren't that many usually + we're caching the result of the lookup anyway) and find the best match for the input image source type.

There are just a few TODOs:

  • I added two new methods to IImageSourceServiceCollection and they're not part of the publicly declared API yet
  • While all unit tests and most device tests on Mac Catalyst are passing, there are 55 failing device tests in scroll view tests that I'm having hard time diagnosing and fixing (ObjCException which hides the original exception).

The main question I think we need to ansewer: Is this a better way to go about the ImageSourceServiceProvider than what Mitch has been working on with keyed services? The change is certainly a lot less invasive, and it doesn't significantly change how DI works, but maybe we need the disruptive change to be able to phase out MauiFactory eventually?

@simonrozsival simonrozsival force-pushed the simpler-image-source-service-provider branch from d9e6c72 to a39e019 Compare January 19, 2024 07:56
@simonrozsival simonrozsival changed the base branch from main to net9.0 January 19, 2024 07:56
@simonrozsival simonrozsival changed the title Simpler image source service provider [Trimming] Simpler image source service provider Jan 19, 2024
@simonrozsival simonrozsival force-pushed the simpler-image-source-service-provider branch from a39e019 to 02d18ef Compare January 19, 2024 18:44
Copy link

Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines.

@simonrozsival simonrozsival force-pushed the simpler-image-source-service-provider branch from 7d1f55a to 19929eb Compare January 22, 2024 09:37
Copy link

Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines.

@simonrozsival simonrozsival force-pushed the simpler-image-source-service-provider branch from 00c09bd to 62a7505 Compare January 22, 2024 09:48
@simonrozsival simonrozsival force-pushed the simpler-image-source-service-provider branch from 62a7505 to 199946b Compare January 22, 2024 10:25
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant