Skip to content

Stability Guarantee/Version Strategy #4286

Closed
@calebcartwright

Description

@calebcartwright

AFAIK there's no readily available/discoverable information about rustfmt's stability guarantee defined within the repo, nor is there definitive links or references to external information.

AIUI the stability story is articulated in the RFC rust-lang/rfcs#2437, but IMO it'd be good to document the resulting details of the guarantee here within the rustfmt documentation.

Based on my understanding of the guarantee, a few salient points:

  • formatting will be idempotent across all versions of rustfmt that have the same major version (barring things like new syntax, bug fixes, etc.)
    • this means that users should expect to see no formatting changes with minor/patch rustfmt version bumps when using only default stable config options
  • as rustfmt follows semantic versioning, any breaking changes to rustfmt lib API will require a major version bump
  • any removal or modification of existing CLI flags/options/subcommands/etc. (both rustfmt and cargo fmt) will require a major version bump
  • any removal or modification of existing stable configuration options will require a major version bump
    • modification includes changing the default value, changing the option name, changing the allowed values, etc.
  • unstable configuration options can be changed or removed at any time, without a major version bump

Some questions I have:

  • does the guarantee apply only to rustfmt on stable, or all channels?
  • do we need to enumerate which types of changes will be accompanied by a minor version bump?

@topecongiro - Anything I missed and/or got wrong? Do you agree it'd be worthwhile to document information on the guarantee or does an easily consumable version exist elsewhere that we could link to?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions