When does tuist install update packages?

Originally posted by Keke Arif on Slack:

How does tuist install work with regard to package updates? Does it always try to fetch the newest version of the package?I see there is the option --update/--no-update : Instead of simple install, update external content when available. (env: TUIST_INSTALL_UPDATE) (default: --no-update) Does this mean that by default tuist install will never try to update a package?

Here’s my answer:
tuist install runs swift package resolveswift package resolve will try to use the Package.resolved. There might be cases when swift package ends up resolving a different version than in Package.resolved. To ensure those package versions are stable, you can add --force-resolved-versions to the passthroughSwiftPackageManagerArguments. That being said, in majority of cases, swift package resolve respects whatever you have in your Package.resolved.

If you run tuist install --update, Tuist runs swift package update that should update your packages based on the version range defined in your Package.swift.