Skip to content

Crate imports_granularity requires nightly #395

@maspe36

Description

@maspe36

This was identified by @luca-della-vedova here.

Currently, our CI doesn't actually check that our imports are formatted with crate level import granularity. Additionally, this functionality is an unstable feature (rust-lang/rustfmt#4991) so it's only supported in nightly.

Running locally without a nightly toolchain

ros2_rust/rclrs$ cargo fmt
Warning: can't set `imports_granularity = Crate`, unstable features are only available in nightly channel.

The way I see it, we have two options.

  1. We manually check imports and try to catch this in PRs
  2. We start using a nightly toolchain in our CI. We can mitigate some of the churn for nightly here by selecting a version ourselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions