Skip to content

Conversation

@zamderax
Copy link
Contributor

@zamderax zamderax commented Oct 11, 2025

Reduce Swift 6 concurrency warnings

What changed

  • Wrapped file I/O operations in FileAdapter with explicit closures to avoid Sendable conversion warnings
  • Marked Config as Sendable (safe since it only holds value types)

Why

  • Reduces Swift 6 concurrency warnings and clarifies intent
  • No behavior changes

Testing

  • All tests pass locally (Swift 6.1.2)

@hsluoyz
Copy link
Member

hsluoyz commented Oct 11, 2025

@zamderax you can fix all sendable warnings for all files in one single PR

…in InternalApi generic; wrap FileAdapter handlers; mark Config Sendable\n\n- Adds Sendable to error enums\n- Constrains afterOperatePolicy generic T: Sendable\n- Wraps Util.* handlers in explicit @sendable closures\n- Marks Config as Sendable\n\nThis consolidates sendability fixes into one PR to address Swift 6 warnings.
@zamderax zamderax changed the title chore: silence sendable warnings in FileAdapter; make Config Sendable chore: fix Sendable warnings across the codebase Oct 11, 2025
@zamderax
Copy link
Contributor Author

@hsluoyz okay!

@hsluoyz
Copy link
Member

hsluoyz commented Oct 11, 2025

@zamderax is this all?

@zamderax
Copy link
Contributor Author

No it's not but given my local staggered workflow, I will make a more "meatier" one later. But for now I'll silence the warnings for this branch / PR

@hsluoyz
Copy link
Member

hsluoyz commented Oct 11, 2025

@zamderax the PR is not by file, it's by feature. You should fix all Sendable warnings for all files in one PR

@hsluoyz hsluoyz changed the title chore: fix Sendable warnings across the codebase feat: fix Sendable warnings across the codebase Oct 15, 2025
@hsluoyz hsluoyz merged commit 4131d98 into casbin:master Oct 15, 2025
4 checks passed
@hsluoyz
Copy link
Member

hsluoyz commented Oct 15, 2025

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants