outskirts home
Documentation menu

Migrating to 4.0

outskirts 4.0 is planned, with no date, and no earlier than one full minor release after 3.32.0, the notice release, and the feedback it gathers. This guide lists what is planned to change and what to do now on 3.x. Everything below is planned and may change with feedback; the roadmap tracks the current plan.

3.x only adds opt-in behaviour: nothing here changes your results until you upgrade to 4.0. Where a warning is mentioned, it is printed on stderr, once per run, even with --quiet.

On this page

What changes in 4.0#

Every variant by default#

every_variant is on by default, as with --every-variant today.

  • Xcode projects: one Debug build per platform the scanned targets support, instead of one build. Release stays opt-in. A scan takes longer and uses more disk, in proportion to the number of platforms. --no-every-variant (every_variant: false) keeps the single build.
  • Swift packages: the host triple only. Retention by platform name for packages stays unchanged.
  • A missing platform fails the scan, with a message naming the variant that could not be built. Restrict the platforms with variant_platforms if a project does not build on all of them.
  • --skip-build fails until each variant has been built once, naming the variant that has no index yet. Run one scan without --skip-build first. This also applies to the outskirts.skipBuild setting of the VS Code extension.
  • build_arguments is an error when it contains -destination, -sdk, -configuration or --triple, since outskirts chooses these per variant. Remove them, or use --no-every-variant.
  • disable_platform_conditional_retention has no effect on Xcode projects: each platform is scanned, so there is nothing to retain by name. Swift packages keep the option.
  • @available(X, unavailable) declarations are retained. Expect fewer results. A baseline entry for such a declaration becomes stale, and --strict-baseline reports it until you prune the baseline.
  • Xcode integration: pages that suggest -destination in build_arguments are rewritten, see Xcode integration.

Exit codes v2 by default#

Status Meaning
0 The scan finished without a blocking finding.
1 --strict with results, or --strict-baseline with stale entries.
2 Invalid configuration: file, value, option combination, refused path.
3 Project, build, index store, git or external tool failure.
64 Unreadable command line (unchanged).
129, 130, 131, 143 Signals (unchanged).

Status 3 is new: today every failure exits 1. Scripts that treat any non-zero status alike keep working; scripts that tell 1 from other statuses need a look. --exit-codes v1 restores the 3.x statuses in 4.0; it is planned to be deprecated in a 4.x release and removed in 5.0. See Exit status.

Baseline v3 for new files#

--write-baseline creates a version 3 baseline, keyed by result id. Existing v1 and v2 baselines are still read, with a deprecation warning in 4.x; reading them is planned to end in 5.0. A baseline keeps its version when it is written again.

Removals#

  • Bazel: the options and keys have been refused since 3.13.0 (exit status 1). In 4.0 an old Bazel option is an unknown option, and the status is 64.
  • --no-color: use --color never.
  • external_encodable_protocols: use external_codable_protocols.
  • The migration of the old periphery cache folder: to reclaim the space, delete the folder yourself; outskirts clear-cache no longer looks for it.

Toolchain#

Swift 6.2 is the minimum toolchain.

What stays the same#

The json format and the paths and CI fingerprints of the existing formats (SARIF, GitLab, Code Climate) are planned to stay as they are; each result also gets a stable id. The periphery command, .periphery.yml and // periphery: comments keep working. A configuration file without version keeps being read.

What to do now on 3.x#

Change Do now
Every variant Set every_variant: true and compare the results; see Try it. Add --no-every-variant if you prefer to keep the single build.
disable_platform_conditional_retention on Xcode 3.32.0 warns when it is set on an Xcode project. Remove it once every_variant is on.
Single build on a multi-platform project 3.32.0 prints a notice once. every_variant: false silences it.
@available(X, unavailable) With every_variant: true these declarations are already retained; run --prune-baseline or write the baseline again.
--skip-build Run one scan without it, then keep using it.
build_arguments Remove -destination, -sdk, -configuration and --triple.
Exit codes Try --exit-codes v2 (exit_codes: v2, since 3.30.0) and update your scripts.
Baselines Run outskirts baseline migrate --baseline baseline.json with your usual scan options, then --apply; see Baselines. The last 3.x reads and writes version 3, so you can go back.
--no-color Use --color never.
external_encodable_protocols Rename it to external_codable_protocols; 3.32.0 warns.
Bazel 3.32.0 repeats the error with a note that it is removed in 4.0.

outskirts config check validates your configuration file without scanning.

Staying on 3.x, or going back#

  • 3.x after 4.0: it is planned to stay on a maintenance branch with toolchain and crash fixes for at least three months, longer if usage calls for it. The update notice of a 3.x release only offers 3.x releases.
  • Homebrew: outskirts@3, a versioned formula on the last 3.x, is planned for the release of 4.0. It is also the entry point for the Periphery 3.8 compatible contract.
  • GitHub Action: v1 stays on 3.x with version: latest, and v2 will be 4.x. Pin the action to a commit SHA with version: latest, or to an exact version, so that a major upgrade is always a change you make:
- uses: tiny-earth-moon/outskirts-action@<commit sha> # v1
  with:
    version: latest
  • Mint and other installs: pin a release, for example tiny-earth-moon/outskirts@3.32.0.

Try it, and tell us#

The best help before 4.0 is a run of your project with every_variant: true on 3.32:

outskirts scan --every-variant

Report a declaration that is reported although a platform or configuration uses it (false positive), one that is missing although nothing uses it (false negative), a build that fails or takes too long, or anything in this guide that is unclear, as an issue.

Edit this page on GitHub