Giter Club home page Giter Club logo

Comments (9)

gwynne avatar gwynne commented on May 30, 2024 1

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.

gwynne avatar gwynne commented on May 30, 2024

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.

mkll avatar mkll commented on May 30, 2024

@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 EventLoopFutures 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.

gwynne avatar gwynne commented on May 30, 2024

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.

mkll avatar mkll commented on May 30, 2024

@gwynne Yes it helped (with both)!

from fluent-kit.

gwynne avatar gwynne commented on May 30, 2024

Awesome, thanks for bearing with me on this! I'll make sure both PRs get merged and releases tagged ASAP.

from fluent-kit.

mkll avatar mkll commented on May 30, 2024

Wonderful!

from fluent-kit.

gwynne avatar gwynne commented on May 30, 2024

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.

mkll avatar mkll commented on May 30, 2024

@gwynne I have already managed to rebuild the project with the new release and everything works. Thanks!

from fluent-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.