Skip to content

M0017 profile-defaults

Rule: The dev profile splits debug info and a deploy profile builds incrementally.

Code M0017 (stable, never reused)
Id profile-defaults
Category repo
Source spirit_level
Fix by hand

Level per tier

Tier Level Reason
small warn split debug info and an incremental deploy profile: measured large build-time wins
small-workspace warn split debug info and an incremental deploy profile: measured large build-time wins
medium warn split debug info and an incremental deploy profile: measured large build-time wins
big warn split debug info and an incremental deploy profile: measured large build-time wins
ai off
embedded off
ui off
egui off
units-strict off
units-paranoid off

Parameters

Name Type Default Meaning
deploy-profile string "deploy" the profile just install builds with

Why

Measured on real projects: split-debuginfo = "unpacked" in the dev and test profiles took an edit-then-test build from 141 s to 11 s (test binaries stopped being I/O-bound), and an incremental deploy profile took a one-file deploy from 43 s to 15 s.

How to fix

[profile.dev]
split-debuginfo = "unpacked"

[profile.test]
split-debuginfo = "unpacked"

[profile.deploy]
inherits = "release"
incremental = true

just install builds with --profile deploy. The deploy profile's name is the parameter deploy-profile.

Configure

[lints.profile-defaults]
level = "deny"
deploy-profile = "deploy"
reason = "why this project wants it at this level"

Allow one finding in the code with // spirit-level: allow(profile-defaults) <reason> (waivers); the code works there too, as in [lints.M0017].