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

Minor Strict Concurrency fix #41

Merged
merged 21 commits into from
Aug 6, 2024
Merged

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Jul 17, 2024

Minor Strict Concurrency fix

♻️ Current situation & Problem

This PR adds a missing Sendable conformance.

⚙️ Release Notes

  • Add missing Sendable conformance.
  • Allow arbitrary Regex Output types with ValidationRules (e.g., allows to pass Regex instances built with RegexBuilder).
  • Don't require a ValidationEngine in the environment with VerifiableTextField for greater flexibility.

📚 Documentation

--

✅ Testing

--

📝 Code of Conduct & Contributing Guidelines

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

@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Jul 18, 2024
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this!

Seems like we also need to update the Snapshot tests & other functionality to reflect the concurrency change to make the PR mergable

@Supereg
Copy link
Member Author

Supereg commented Jul 18, 2024

@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
Copy link
Member

@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
Copy link
Member Author

Supereg commented Jul 22, 2024

@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
Copy link
Member

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

@Supereg
Copy link
Member Author

Supereg commented Aug 5, 2024

@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 👍

Copy link

codecov bot commented Aug 5, 2024

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 ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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 Coverage Δ
...Configuration/ValidationEngine+Configuration.swift 66.67% <ø> (ø)
Sources/SpeziValidation/ValidationEngine.swift 93.83% <ø> (ø)
...es/SpeziValidation/Views/VerifiableTextField.swift 93.94% <100.00%> (+0.40%) ⬆️
Sources/SpeziViews/Views/Button/AsyncButton.swift 67.77% <100.00%> (ø)
Sources/SpeziViews/Views/Drawing/CanvasView.swift 92.41% <ø> (ø)
...iViews/Views/Layout/HorizontalGeometryReader.swift 100.00% <ø> (ø)
Sources/SpeziValidation/ValidationRule.swift 48.15% <88.89%> (+4.15%) ⬆️

Continue to review full report in Codecov by Sentry.

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

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you; those look good to me! 🚀

@Supereg Supereg merged commit 4a8245e into main Aug 6, 2024
15 checks passed
@Supereg Supereg deleted the fix/concurrency-validationengine-config branch August 6, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants