Swift package dependencies

How can I tell which version of Database Kit is being used by .package(url: "https://github.com/vapor/fluent-postgresql.git", from: "1.0.0")?

If there is a bug in Database Kit that is fixed in a later version that what is in fluent-postgresql, how do I ensure it is using an updated dependency?

@0xtim Can you please help with this when you get a chance? Thank you - much appreciated! :]

@michaeltansg if you look in Package.resolved, that files contains the current packages and exact versions you’re using.

To ensure you’re using an updated dependency, run swift package update to update everything.

1 Like

Thank you so much @0xtim. Checking the resolved file is very useful. If I see a fix to an issue in one of the dependencies that I would like to pick up (example: Database Kit), is it true that I should just add that package last and the last entry will supersede the previous? (I know I could just check the resolved file, but I just want to be sure this is the proper way to pick up a bug fix in one of the transitive dependencies of fluent-postgresql.

Example:

    dependencies: [
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor/fluent-postgresql.git", from: "1.0.0"),
        .package(url: "https://github.com/vapor/database-kit.git", from: "1.3.3")
    ],

Yes if you want to pull in a specific dependency version then that will work. However you’ll get a warning if you aren’t linking that dependency to your target. Best bet is to just use swift package update to update the dependencies