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

Re-write CurrencyMint implementation for new Currency protocol #41

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

Mordil
Copy link
Collaborator

@Mordil Mordil commented Dec 27, 2024

Motivation:

CurrencyMint is a useful abstraction that allows creation of instances of Currency types dynamically, such as from API responses. The existing implementation doesn't correctly allow working with existential instances. There are also language features available in 5.7+ to better express things in the type system.

Modifications:

  • Change: CurrencyMint to work with any Currency instead of AnyCurrency
  • Change: Codgen to return the new Currency conforming types rather than AnyCurrency
  • Change: Unit tests to be smaller units that better cover the different behaviors of the type

Result:

CurrencyMint is more flexible in the type system and plays better with modern Swift language features.

@Mordil Mordil added enhancement New feature or request semver-major Require SemVer Major bump labels Dec 27, 2024
Base automatically changed from rewrite-impl to 0.7.0 January 6, 2025 16:35
Motivation:

CurrencyMint is a useful abstraction that allows creation of instances of Currency types dynamically, such as from API responses. The existing implementation doesn't correctly allow working with existential instances. There are also language features available in 5.7+ to better express things in the type system.

Modifications:

- Change: `CurrencyMint` to work with `any Currency` instead of `AnyCurrency`
- Change: Codgen to return the new `Currency` conforming types rather than `AnyCurrency`
- Change: Unit tests to be smaller units that better cover the different behaviors of the type

Result:

`CurrencyMint` is more flexible in the type system and plays better with modern Swift language features.
@Mordil
Copy link
Collaborator Author

Mordil commented Jan 6, 2025

Latest push was a rebase off the target branch

@Mordil Mordil merged commit d416247 into 0.7.0 Jan 6, 2025
1 of 12 checks passed
@Mordil Mordil deleted the update-mint branch January 6, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver-major Require SemVer Major bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants