-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Get HummingbirdFluent working with HB 2.0 #11
Conversation
Wrap migrations in a MainActorBox Wrap Databases in a UnsafeTransfer
39da381
to
1489205
Compare
public let history: History | ||
/// List of migrations. Only accessible from the main actor | ||
@MainActor | ||
public var migrations: Migrations { self._migrations.value } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently using @MainActor
here. @Joannis what are your thoughts on setting up a Hummingbird global actor in Hummingbird and using that instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you foresee other places where you'd want/need this? What's the "domain" of the actor? What type of information do you scope it to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point I time probably not so we can keep as @MainActor
. The migration stuff should only be setup during initialisation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't worked on or with Fluent for ages, so I'm not confident I can give a great review when it comes to API design
} catch { | ||
return request.eventLoop.makeFailedFuture(error) | ||
print("\(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print statement
} catch { | ||
return request.eventLoop.makeFailedFuture(error) | ||
print("\(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print statement
It's not like I've used it a great deal. I'm not really a fan. I basically provided this as I know a lot of people rely on it. |
Remove HBApplication extensions
HBFlluent is now a Service.
Make HBFluent Sendable by
Update HBFluentPersistDriver