scs / substrate-api-client

Library for connecting to substrate API over WebSockets
Apache License 2.0
260 stars 122 forks source link

Fix taplo issue in nightly build #795

Closed Niederb closed 2 months ago

Niederb commented 2 months ago

The nightly build is currently failing due to a regression in taplo. Taplo is re-ordering keys alphabetically. Error message:

2024-07-30T00:11:48.6950177Z  INFO taplo:format_files:load_config: found configuration file path="/__w/substrate-api-client/substrate-api-client/.taplo.toml"
2024-07-30T00:11:48.6985816Z  INFO taplo:format_files:collect_files: found files total=11 excluded=0 cwd="/__w/substrate-api-client/substrate-api-client"
2024-07-30T00:11:48.7139599Z ERROR taplo:format_files: the file is not properly formatted path="/__w/substrate-api-client/substrate-api-client/Cargo.toml"
2024-07-30T00:11:48.7179071Z ERROR taplo:format_files: the file is not properly formatted path="/__w/substrate-api-client/substrate-api-client/compose-macros/Cargo.toml"
2024-07-30T00:11:48.7314803Z ERROR taplo:format_files: the file is not properly formatted path="/__w/substrate-api-client/substrate-api-client/keystore/Cargo.toml"
2024-07-30T00:11:48.7441290Z ERROR taplo:format_files: the file is not properly formatted path="/__w/substrate-api-client/substrate-api-client/node-api/Cargo.toml"
2024-07-30T00:11:48.7547775Z ERROR taplo:format_files: the file is not properly formatted path="/__w/substrate-api-client/substrate-api-client/primitives/Cargo.toml"
2024-07-30T00:11:48.7686516Z ERROR taplo:format_files: the file is not properly formatted path="/__w/substrate-api-client/substrate-api-client/test-no-std/Cargo.toml"
2024-07-30T00:11:48.7776693Z ERROR operation failed error=some files were not properly formatted
2024-07-30T00:11:48.7820420Z ##[error]Process completed with exit code 1.

Solution: Prevent taplo from re-ordering keys in the package section. Taken from https://github.com/tamasfe/taplo/issues/634#issuecomment-2253070697