Depends on D4379
Something's wrong, cargo fmt should be fired up in git pre commit hooks, this should be fixed.
Details
Details
- Reviewers
varun ashoat - Commits
- rCOMM68aa78321a3c: [services] Tests - run cargo fmt
-
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
@varun, any idea why cargo fmt isn't being triggered properly in pre-commit hooks?
Here's a theory... lint-staged requires yarn to set things up. Maybe Rust devs aren't running yarn (or yarn cleaninstall) when setting up their repo?
Comment Actions
lint-staged is definitely running when I run git commit. I think it has to do with the code being dead, or perhaps the atypical way we're importing modules rn... I tried arc patch-ing the previous diff in the stack to check what's happening, but it failed:
varun@varuns-MacBook-Pro comm % arc patch D4379 INFO Base commit is not in local repository; trying to fetch. Created and checked out branch arcpatch-D4379. Created and checked out branch arcpatch-D4161. Checking patch services/commtest/src/main.rs... Checking patch services/commtest/rustfmt.toml... Checking patch services/commtest/build.rs... Checking patch services/commtest/Cargo.toml... Checking patch services/commtest/Cargo.lock... Checking patch services/commtest/.gitignore... Checking patch scripts/rust_pre_commit.sh... Checking patch package.json... Checking patch .lintstagedrc.js... Applied patch services/commtest/src/main.rs cleanly. Applied patch services/commtest/rustfmt.toml cleanly. Applied patch services/commtest/build.rs cleanly. Applied patch services/commtest/Cargo.toml cleanly. Applied patch services/commtest/Cargo.lock cleanly. Applied patch services/commtest/.gitignore cleanly. Applied patch scripts/rust_pre_commit.sh cleanly. Applied patch package.json cleanly. Applied patch .lintstagedrc.js cleanly. COMMITTED Successfully committed patch. Cherry Pick Failed! Exception Command failed with error #1! COMMAND git cherry-pick -- arcpatch-D4161 STDOUT CONFLICT (add/add): Merge conflict in services/commtest/Cargo.toml Auto-merging services/commtest/Cargo.toml CONFLICT (add/add): Merge conflict in services/commtest/Cargo.lock Auto-merging services/commtest/Cargo.lock STDERR error: could not apply a58da4505... [services] Tests - Initialize project hint: after resolving the conflicts, mark the corrected paths hint: with 'git add <paths>' or 'git rm <paths>' hint: and commit the result with 'git commit' (Run with `--trace` for a full exception trace.)
@karol-bisztyga once your stack is easier for me to cherry pick I can resolve the cargo fmt issues