-
Notifications
You must be signed in to change notification settings - Fork 24
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
Swift 6 Support and Base URL Handling Update #38
base: main
Are you sure you want to change the base?
Conversation
Great work, @1amageek! Could you kindly explain its significance? Why do we need to make all types conform to Additionally, could you please run the Playground application and verify that everything functions smoothly without any modifications required. Thanks! |
Thank you for your insightful question and feedback! Sendable in Swift 6:
Current code works due to implicit conformance or non-concurrent usage Explicit Sendable benefits:
I have already implemented it in my project, and it is working without any issues. |
Hi @1amageek, could you please verify and fix the issues by running the Playground app? |
Hey @1amageek, I’m happy for all your contributions! But I’m a bit bummed that changing the data type from Could we stick this PR (or create a new one) just for making OllamaKit conform to |
Thank you always for your amazing work. I am also using OllamaKit there. |
It looks like you have integrated |
This is super cool! I’ll definitely check it out in my free time. |
This PR introduces updates to support Swift 6, including adjustments to concurrency-related features and the Sendable conformance across relevant types.
Swift 6 Compatibility:
Updated swift-tools-version to 6.0 in Package.swift.
Added Sendable conformance to various structs, enums, and classes in compliance with Swift 6’s stricter concurrency rules.
Refined baseURL Handling:
Modified OKRouter to require an explicit baseURL argument in the asURLRequest() method rather than relying on a static baseURL.
Refactored OllamaKit to store baseURL as an instance property, allowing more flexible and testable configurations.
Updated all API request functions to pass baseURL explicitly when creating URLRequest objects.
These updates help ensure compatibility with Swift 6 while making the base URL configuration more flexible and consistent.