Skip to content

Minimum nextest versions

0.9.55

Nextest's per-repository configuration can include minimum required and recommended versions per-repository. This is similar to the rust-version field in Cargo.toml.

  • If the current version of nextest is lower than the required version, nextest will produce an error and exit with code 92 REQUIRED_VERSION_NOT_MET.
  • If the current version of nextest is lower than the recommended version, nextest will produce a warning, but will run as normal.

Setting minimum versions

To set a minimum required version, add to .config/nextest.toml, at the top of the file:

nextest-version = "0.9.55"
# or
nextest-version = { required = "0.9.55" }

To set a minimum recommended version, add to .config/nextest.toml:

nextest-version = { recommended = "0.9.55" }

Both required and recommended versions can be set simultaneously:

nextest-version = { required = "0.9.53", recommended = "0.9.55" }

Note

Versions of nextest prior to 0.9.55 do not support the nextest-version configuration. Depending on how old the version is, nextest may print an "unknown configuration" warning or ignore nextest-version entirely.

Bypassing the version check

Nextest accepts an --override-version-check CLI option that bypasses the version check. If the override is activated, nextest will print a message informing you of that.

% cargo nextest run --override-version-check
info: overriding version check (required: 0.9.55, current: 0.9.54)
    Finished test [unoptimized + debuginfo] target(s) in 0.22s
    Starting 191 tests across 13 binaries
...

To show and verify the version status, run cargo nextest show-config version. This will produce output similar to:

% cargo nextest show-config version
current nextest version: 0.9.54
version requirements:
    - required: 0.9.55
evaluation result: does not meet required version
error: update nextest with cargo nextest self update, or bypass check
with --override-version-check

This command exits with:

  • Exit code 92 (REQUIRED_VERSION_NOT_MET) if the current version of nextest is lower than the required version.
  • Exit code 10 (RECOMMENDED_VERSION_NOT_MET) if the current version of nextest is lower than the recommended version. This is an advisory exit code that does not necessarily indicate failure.
  • Exit code 0 if the version check was satisfied, or if the check was overridden.

Note for tool developers

If you're building a tool on top of nextest, you can use tool-specific configuration to define minimum required and recommended nextest versions.

As an exception to the general priority rules with tool-specific configuration, required and recommended versions across all config files (both repository and tool-specific configurations) are taken into account.

For example, if:

  • The repository requires nextest 0.9.54.
  • There are two tool config files, and the first one requires nextest 0.9.57.
  • The second one requires nextest 0.9.60.

Then, nextest will produce an error unless it is at 0.9.60.