Add a triagebot warning for rust-analyzer's generated files#158834
Add a triagebot warning for rust-analyzer's generated files#158834ShoyuVanilla wants to merge 1 commit into
rust-analyzer's generated files#158834Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
@bors squash |
This comment has been minimized.
This comment has been minimized.
|
🔨 2 commits were squashed into b8c1997. |
1d7e5f2 to
b8c1997
Compare
This comment has been minimized.
This comment has been minimized.
| """ | ||
| cc = ["@rust-lang/rust-analyzer"] | ||
|
|
||
| [mentions."src/tools/rust-analyzer/**/generated{,.rs}"] |
There was a problem hiding this comment.
We also have some files in generated/ directories.
There was a problem hiding this comment.
Yeah, this pattern catches both generated/ and generated.rs, though it is currently blocked in CI by tidy's false positive error
… r=jieyouxu tidy: Use `empty_alternate = true` for triagebot mention glob check In accordance with triagebot's following line: https://github.com/rust-lang/triagebot/blob/8fe35ac13efb881598a4f1d7768d5dee5a3fff09/src/handlers/mentions.rs#L217 Fixes a false positive tidy failure in rust-lang#158834 (comment)
* Add a triagebot warning for `rust-analyzer`'s generated files * Fix unmatched quotes
b8c1997 to
201ce96
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Cool, with #158838, tidy doesn't fail anymore |
Rollup merge of #158838 - ShoyuVanilla:triagebot-glob-fixup, r=jieyouxu tidy: Use `empty_alternate = true` for triagebot mention glob check In accordance with triagebot's following line: https://github.com/rust-lang/triagebot/blob/8fe35ac13efb881598a4f1d7768d5dee5a3fff09/src/handlers/mentions.rs#L217 Fixes a false positive tidy failure in rust-lang/rust#158834 (comment)
| message = """ | ||
| ⚠️ This PR modifies files generated by a `rust-analyzer` codegen command \ | ||
| or CI job. If these changes were made manually, consider removing them from \ | ||
| this PR by editing the relevant commit, if possible. |
There was a problem hiding this comment.
Shouldn't this say something about how to make them "intentionally"? Maybe we can reference some kind of documentation, e.g., link [codegen command](...) somewhere?
There was a problem hiding this comment.
This is different for each file. For some we have a CI job once per some time and you should never update them directly. For others you do need to manually update (although CI will fail if you do not), but the changes that require updating them are unlikely to be needed in r-l/r.
There was a problem hiding this comment.
Yeah, I was a bit hesitant to go for full details as it would be verbose for the reasons Chayim said. But I think perhaps I could add a comprehensive chapter for the generated files in rust-analyzer's docs and refer its link here
There was a problem hiding this comment.
We could also ensure that the generated files have a comment at the top pointing to the source, and then mention that in the message
tidy: Use `empty_alternate = true` for triagebot mention glob check In accordance with triagebot's following line: https://github.com/rust-lang/triagebot/blob/8fe35ac13efb881598a4f1d7768d5dee5a3fff09/src/handlers/mentions.rs#L217 Fixes a false positive tidy failure in rust-lang/rust#158834 (comment)
Warns whenever a contributor touches either
src/tools/rust-analyzer/**/generated.rsorsrc/tools/rust-analyzer/**/generated/foo.rsfiles.cc @rust-lang/rust-analyzer