Comments (9)
You are correct - if the EventLoopFuture
-based API was broken by these changes, that is a real bug and needs to be addressed.
from fluent-kit.
If you're using .wait()
with app.autoMigrate()
, you're most likely using an outdated version of the app entrypoint. The configure()
method is async
by default in the current app template, allowing you to write try await app.autoMigrate()
. The pregenerated PostgreSQL template - in particular the entrypoint.swift
and configure.swift
files - provides an example starting point. In general, except in very unusual cases, there should no longer be any need to use .wait()
for anything. Even if there is no async
version of a futures-based method, you can use the EventLoopFuture.get()
helper to turn any future into an await
-able expression.
This having been said, none of the changes made in 1.48.0 should have affected this. My guess would be that you were lucking into it working before and that the added Sendable
annotations were enough to throw that off.
from fluent-kit.
@gwynne, My use of the legacy entry point is because I (surprise!) do not use Swift Structured Concurrency. My project did not start yesterday, it has been going on for more than three years, in the pre-async/await era, and it's relatively large, so it's hard to rewrite quickly.
In the same time, the SemVer principles tell us that without changing the major version, the API should not break. We see it breaking down, little by little, piece by piece, component by component. By updating dependencies today, I never know which one will break tomorrow. The major version remains the same.
We are gradually losing the ability to use the legacy API based on EventLoopFuture
s without any official announcement that it is no longer supported. But its support breaks down here and there, spontaneously.
This is not a complaint (although I am of course saddened by this state of affairs), it is simply a statement of the fact that, while formally remaining within the major version, Vapor is no longer quite version 4. This, in turn, means that upToNextMajor
no longer works, and we should abandon it.
So, I'd like to know in advance if it's time to freeze the Vapor dependency versions as well as the version of itself, or if I can wait a little longer on this.
Thanks!
P.S. Since the situation is fully resolved, it would be better to close this issue.
from fluent-kit.
Can you see if #603 (and, ideally, vapor/fluent#774) fixes this issue? Easiest way to test is to temporarily add these lines to the dependencies for your app target in your Package.swift
:
.package(url: "https://github.com/vapor/fluent-kit.git", branch: "oldstyle-migration-fix-maybe"),
.package(url: "https://github.com/vapor/fluent.git", branch: "sendable-fixup"),
If it doesn't work with both, try it with only the FluentKit override. (And don't forget to revert the change later!)
from fluent-kit.
@gwynne Yes it helped (with both)!
from fluent-kit.
Awesome, thanks for bearing with me on this! I'll make sure both PRs get merged and releases tagged ASAP.
from fluent-kit.
Wonderful!
from fluent-kit.
FluentKit 1.48.1 and Fluent 4.10.0 have been released, let me know if you run into any more issues!
from fluent-kit.
@gwynne I have already managed to rebuild the project with the new release and everything works. Thanks!
from fluent-kit.
Related Issues (20)
- Fluent Postgres driver crashes getting sum and average aggregates
- 1.42.2 no longer supports multiple properties with the same field name HOT 1
- MySQL delete multiple-field index fails HOT 1
- Filtering with ~~ on enum collection does not work HOT 6
- Async functions within attach closure
- Aliases in select queries can cause fatal errors HOT 7
- Using Querybuilder with .field() or .fields() on models with optional relations crashes in SiblingsEagerLoader() HOT 1
- owner likely unsaved, attach within attach closure HOT 2
- [PostgreSQL] Storing Arrays of Custom Codable Types as JSONB[] instead of JSONB?
- Fluent Models malfunction if given a property named `description`
- @Group does not compile if SwiftUI is imported
- ServiceContext lost when eager loading parent models
- Fatal error "Non-uniform query input" when creating models from a collection. HOT 2
- Improve FieldKey ergonomics HOT 4
- Separate Field property wrappers into separate package HOT 4
- Print binding data in exception description
- [Q]: Generic representation of a relationship
- Create on model collections does not assign database generated Ids HOT 4
- Can't query a single Field or the entire Group when querying a @Group modifier HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent-kit.