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

Reduce the Usage of Manual Type Erasure #12

Merged
merged 2 commits into from
Nov 3, 2022
Merged

Conversation

PSchmiedmayer
Copy link
Member

@PSchmiedmayer PSchmiedmayer commented Nov 3, 2022

Reduce the Usage of Manual Type Erasure

♻️ Current situation & Problem

The current version of the framework uses different type erasure types that enabled a faster prototyping designing the external APIs at the beginning of the project.

💡 Proposed solution

This PR uses the Swift 5.7 any and some keywords to reduce the reliance on type erasures in the project. It also ensures that components defined in a configuration are passed in a type-safe through the Dependency Manager in a type-safe way.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #12 (620bd85) into main (ce8acc1) will decrease coverage by 0.63%.
The diff coverage is 88.64%.

❗ Current head 620bd85 differs from pull request most recent head 53b1cc1. Consider uploading reports for the commit 53b1cc1 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
- Coverage   92.18%   91.56%   -0.62%     
==========================================
  Files          24       24              
  Lines         805      805              
==========================================
- Hits          742      737       -5     
- Misses         63       68       +5     
Impacted Files Coverage Δ
...t/CardinalKit/Infrastructure/TypedCollection.swift 100.00% <ø> (ø)
Sources/CardinalKit/Configuration/Component.swift 100.00% <ø> (ø)
...ardinalKit/Configuration/ComponentCollection.swift 37.50% <37.50%> (ø)
Sources/CardinalKit/CardinalKit/CardinalKit.swift 100.00% <100.00%> (ø)
...rdinalKit/CardinalKit/CardinalKitAppDelegate.swift 100.00% <100.00%> (ø)
...ces/CardinalKit/CardinalKit/View+CardinalKit.swift 100.00% <100.00%> (ø)
...s/CardinalKit/Configuration/ComponentBuilder.swift 100.00% <100.00%> (ø)
...rces/CardinalKit/Configuration/Configuration.swift 100.00% <100.00%> (ø)
...bilities/Dependencies/Component+Dependencies.swift 100.00% <100.00%> (ø)
.../Capabilities/Dependencies/DependencyManager.swift 96.97% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce8acc1...53b1cc1. Read the comment docs.

@PSchmiedmayer PSchmiedmayer merged commit 70626db into main Nov 3, 2022
@PSchmiedmayer PSchmiedmayer deleted the imporveProtocols branch November 3, 2022 03:25
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.

1 participant