Commit 1f30678
Tamas Vajk
Fix rustfmt silently skipping symlinked sources
When transform_sources() symlinks hand-written .rs files into
bazel-out (which happens when any compile_data entry is generated),
the symlinked files are no longer is_source=True. This causes
_find_rustfmtable_srcs to filter them all out, silently skipping
formatting for the entire crate.
Fix by recovering original source files from the aspect context's
rule attributes when available. Also use crate_info.srcs directly
in rustfmt_test to include all sources.1 parent f31db8b commit 1f30678
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
219 | 231 | | |
220 | 232 | | |
221 | 233 | | |
222 | | - | |
| 234 | + | |
223 | 235 | | |
224 | 236 | | |
225 | 237 | | |
| |||
0 commit comments