StanfordSpezi / SpeziViews

A common set of SwiftUI views and related functionality used in Spezi modules
https://swiftpackageindex.com/StanfordSpezi/SpeziViews/documentation/
MIT License
4 stars 3 forks source link

Minor Strict Concurrency fix #41

Closed Supereg closed 2 months ago

Supereg commented 2 months ago

Minor Strict Concurrency fix

:recycle: Current situation & Problem

This PR adds a missing Sendable conformance.

:gear: Release Notes

:books: Documentation

--

:white_check_mark: Testing

--

:pencil: Code of Conduct & Contributing Guidelines

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

Supereg commented 2 months ago

@PSchmiedmayer the Snapshots test are failing within the CI. If you look at the xcresult bundle, the snapshot images don't differ though. I couldn't reproduce the failure locally. I also tried to regenerate the images (they resulted in the exact same binary representation).

PSchmiedmayer commented 2 months ago

@Supereg As noted on Slack: I unfortunately don't have a clear idea where this might come from, let me know if you want me to dig deeper into this!

Supereg commented 2 months ago

@Supereg As noted on Slack: I unfortunately don't have a clear idea where this might come from, let me know if you want me to dig deeper into this!

Maybe we can wait for Xcode 16 beta 4 release today and see if that changes anything? Otherwise, let's discuss other strategies in the meeting later.

PSchmiedmayer commented 2 months ago

@Supereg I have just installed the Xcode 16 Beta 4 on all macOS runners that we host.

Supereg commented 2 months ago

@Supereg I have just installed the Xcode 16 Beta 4 on all macOS runners that we host.

Just resolved the issue. It seems there is a difference, if the snapshot tests are run on the iOS 18 simulator vs on an iOS 17.5 simulator. The iOS 18 simulator slightly changes shadows around text which made all of the snapshot testing fail. This is now resolved.

I added some additional minor changes to the PR, like improving Sendable annotation of ValidationRule, allow arbitrarily built Regex instances with ValidationRule and slightly improving flexibility of the VerifiableTextField. I re-requested a review to cover those changes πŸ‘

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.45%. Comparing base (ff61e65) to head (7d92cad).

Files Patch % Lines
Sources/SpeziValidation/ValidationRule.swift 88.89% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41/graphs/tree.svg?width=650&height=150&src=pr&token=7UbLX71dAO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #41 +/- ## ========================================== + Coverage 80.36% 80.45% +0.10% ========================================== Files 44 44 Lines 1298 1304 +6 ========================================== + Hits 1043 1049 +6 Misses 255 255 ``` | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Ξ” | | |---|---|---| | [...Configuration/ValidationEngine+Configuration.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziValidation%2FConfiguration%2FValidationEngine%2BConfiguration.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZhbGlkYXRpb24vQ29uZmlndXJhdGlvbi9WYWxpZGF0aW9uRW5naW5lK0NvbmZpZ3VyYXRpb24uc3dpZnQ=) | `66.67% <ΓΈ> (ΓΈ)` | | | [Sources/SpeziValidation/ValidationEngine.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziValidation%2FValidationEngine.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZhbGlkYXRpb24vVmFsaWRhdGlvbkVuZ2luZS5zd2lmdA==) | `93.83% <ΓΈ> (ΓΈ)` | | | [...es/SpeziValidation/Views/VerifiableTextField.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziValidation%2FViews%2FVerifiableTextField.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZhbGlkYXRpb24vVmlld3MvVmVyaWZpYWJsZVRleHRGaWVsZC5zd2lmdA==) | `93.94% <100.00%> (+0.40%)` | :arrow_up: | | [Sources/SpeziViews/Views/Button/AsyncButton.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziViews%2FViews%2FButton%2FAsyncButton.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL0J1dHRvbi9Bc3luY0J1dHRvbi5zd2lmdA==) | `67.77% <100.00%> (ΓΈ)` | | | [Sources/SpeziViews/Views/Drawing/CanvasView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziViews%2FViews%2FDrawing%2FCanvasView.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL0RyYXdpbmcvQ2FudmFzVmlldy5zd2lmdA==) | `92.41% <ΓΈ> (ΓΈ)` | | | [...iViews/Views/Layout/HorizontalGeometryReader.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziViews%2FViews%2FLayout%2FHorizontalGeometryReader.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL0xheW91dC9Ib3Jpem9udGFsR2VvbWV0cnlSZWFkZXIuc3dpZnQ=) | `100.00% <ΓΈ> (ΓΈ)` | | | [Sources/SpeziValidation/ValidationRule.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?src=pr&el=tree&filepath=Sources%2FSpeziValidation%2FValidationRule.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZhbGlkYXRpb24vVmFsaWRhdGlvblJ1bGUuc3dpZnQ=) | `48.15% <88.89%> (+4.15%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Ξ” = absolute (impact)`, `ΓΈ = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [ff61e65...7d92cad](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/41?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).