paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Format and Sort features in `Cargo.toml` files #14803

Closed ggwpez closed 1 year ago

ggwpez commented 1 year ago

Changes:

Its fine if we dont merge this before the monorepo; this MR is mostly to gather feedback on the formatting.
Are you OK with the canonical format that this introduces? Eventually we should add it to bot fmt.

My only point would be that the default feature looks slightly weird, give that it normally just contains one item. On the other hand, this creates a uniform formatting for all features... WDYT?

I asserted locally that this does not alter the sha256 of the kitchensink runtime.

The CI prints a diff on error to make debugging easier:

diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml
index 39d0148..adef632 100644
--- a/primitives/runtime/Cargo.toml
+++ b/primitives/runtime/Cargo.toml
@@ -50,13 +50,13 @@ std = [
    "log/std",
+   # hi
+   "rand",
    "sp-arithmetic/std",
-   # hi
-   "rand",
    "sp-core/std",
ggwpez commented 1 year ago

bot merge

paritytech-processbot[bot] commented 1 year ago

Waiting for commit status.