tonic
tonic copied to clipboard
Generated code is not formatted with nightly compiler
Version
pascal@pascal-G533QM ~/L/D/q/c/quickwit-proto (conf_sort)> cargo tree | grep tonic └── tonic v0.5.2 └── tonic-build v0.5.2
Platform
Linux pascal-G533QM 5.12.0-051200-generic #202104252130 SMP Sun Apr 25 21:33:13 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Description
In our project quickwit https://github.com/quickwit-inc/quickwit, the code is not formatted or formatted differently when I run the build_script https://github.com/quickwit-inc/quickwit/blob/main/quickwit-proto/build.rs.
cd quickwit-proto;cargo build
These are the generated files on my machine: cluster.txt quickwit.txt
tonic-build's rustfmt feature should format the code.
Can I check somehow why it doesn't?
Read the code in tonic build 🤷♂️😂
Can you provide a reproduction script?
Can you provide a reproduction script?
No, it happens only on my machine :)
Then I’m not sure what could be going on. Maybe something is wrong with your rustfmt
installation 🤷♂️
The issue only occurs with the nightly compiler, stable works
Does your nightly toolchain have rustfmt installed?
Does your nightly toolchain have rustfmt installed?
Yes, e.g. this command completes cargo +nightly fmt --all -- --check
Do you use rustup override set nightly
in the directory?
I have no overrides
rustup override list
no overrides
Did you try to reproduce the issue?
formatting does not work (files changed)
git clone https://github.com/quickwit-inc/quickwit
cd quickwit;cd quickwit-proto;cargo +nightly build
formatting works (files unchanged)
git clone https://github.com/quickwit-inc/quickwit
cd quickwit;cd quickwit-proto;cargo +stable build