You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm a new contributor here and thought of picking this as my first issue. From what I understand, a new crate (something like triagebot.rs) needs to be made for this issue right? Where we can parse the toml and see if it is valid.
Hi, sorry for the late response, I was out traveling. I'm currently confused about a certain thing. Currently what I am trying to do is manually check the file for valid syntax, by going over it line by line. Is this the correct method to do this, or should I be using an already existing crate like toml? I would assume that extra crate dependencies aren't probably wanted.
Also, I was wondering something about Path in the check function. For this module, would I need to check/filter any paths like some other modules do? I was assuming that I will simply open path + 'tiragebot.toml' and read that file.
I personally would prefer to see this implemented in triagebot itself instead of tidy. That would make it work for all repositories. It should be fairly trivial to add a handler that checks for a PR that modifies triagebot.toml and to validate it, and post a comment if it is not correct. It can even use the Config type to verify that the actual structure matches. Bonus points would to also use serde-ignored to enforce that unknown fields aren't included.
I personally would prefer to see this implemented in triagebot itself instead of tidy. That would make it work for all repositories. It should be fairly trivial to add a handler that checks for a PR that modifies triagebot.toml and to validate it, and post a comment if it is not correct. It can even use the Config type to verify that the actual structure matches. Bonus points would to also use serde-ignored to enforce that unknown fields aren't included.
Sorry for being slow with the issue, but along with being busy, I've been kinda stuck, and was unsure if I should ask for help. I am currently unsure if I should be doing work in tidy or the triagebot repository. Should I first try to get the tidy check working and then maybe open an issue on the triagebot repo?
I personally would prefer to see this implemented in triagebot itself instead of tidy. That would make it work for all repositories. It should be fairly trivial to add a handler that checks for a PR that modifies triagebot.toml and to validate it, and post a comment if it is not correct. It can even use the Config type to verify that the actual structure matches. Bonus points would to also use serde-ignored to enforce that unknown fields aren't included.
Ah, that wouldn't have been caught actually - the toml syntax was valid, the file just didn't exist in the repository. Checking if the glob has at least one match seems possible.
Activity
jyn514 commentedon Dec 24, 2022
Mentoring instructions: Add a new check to tidy around here that parses
triagebot.tomlto make sure it's valid toml:rust/src/tools/tidy/src/lib.rs
Lines 41 to 58 in 17395b4
See the existing tidy files for an example of how to write a tidy check.
aadityadhruv commentedon Dec 24, 2022
Hi, I'm a new contributor here and thought of picking this as my first issue. From what I understand, a new crate (something like
triagebot.rs) needs to be made for this issue right? Where we can parse the toml and see if it is valid.jyn514 commentedon Dec 24, 2022
@aadityadhruv a new module, not a new crate. The module should be part of
tidyso check runs onx test tidy.aadityadhruv commentedon Dec 24, 2022
Right, that makes sense. Thank you!
aadityadhruv commentedon Dec 28, 2022
Hi, sorry for the late response, I was out traveling. I'm currently confused about a certain thing. Currently what I am trying to do is manually check the file for valid syntax, by going over it line by line. Is this the correct method to do this, or should I be using an already existing crate like
toml? I would assume that extra crate dependencies aren't probably wanted.Also, I was wondering something about Path in the check function. For this module, would I need to check/filter any paths like some other modules do? I was assuming that I will simply open path +
'tiragebot.toml'and read that file.Any help is appreciated!
jyn514 commentedon Dec 28, 2022
Yes, please use toml, don't use regex or anything like that.
ehuss commentedon Dec 29, 2022
I personally would prefer to see this implemented in triagebot itself instead of tidy. That would make it work for all repositories. It should be fairly trivial to add a handler that checks for a PR that modifies triagebot.toml and to validate it, and post a comment if it is not correct. It can even use the
Configtype to verify that the actual structure matches. Bonus points would to also use serde-ignored to enforce that unknown fields aren't included.dotdot0 commentedon Jan 2, 2023
@aadityadhruv are you still working on this?
aadityadhruv commentedon Jan 2, 2023
Hi, yeah I'm sorry, I'm still working on it. I've been pretty busy the last couple of days, I'll get it done this week itself. Hope that's ok!
dotdot0 commentedon Jan 2, 2023
Yeah! it's alright
aadityadhruv commentedon Jan 5, 2023
Sorry for being slow with the issue, but along with being busy, I've been kinda stuck, and was unsure if I should ask for help. I am currently unsure if I should be doing work in
tidyor thetriagebotrepository. Should I first try to get thetidycheck working and then maybe open an issue on thetriagebotrepo?aadityadhruv commentedon Jan 5, 2023
Here is the code I had written (it does not work since I do not know what the configuration of the toml is):
I am unsure what would be the right next step here.
2 remaining items
aadityadhruv commentedon Jan 7, 2023
Here is a PR for the same: #106559
jyn514 commentedon Jan 10, 2023
👍 #106559 (comment)
BoxyUwU commentedon Jan 14, 2023
Just thought I'd drop by and say that this would have been nice to avoid #106848 😅
jyn514 commentedon Jan 14, 2023
Ah, that wouldn't have been caught actually - the toml syntax was valid, the file just didn't exist in the repository. Checking if the glob has at least one match seems possible.
0xJepsen commentedon Jan 15, 2023
I see the PR up but not sure if anyone is still working on the requested changes?
aadityadhruv commentedon Jan 15, 2023
Yeah I'm currently working on it in the triagebot repo, I haven't opened a PR/Issue yet for it.
meysam81 commentedon Oct 7, 2023
@rustbot claim
feat: valdiate proposed change in triagetoml for PRs ✨
meysam81 commentedon Oct 8, 2023
Can someone please review this change: rust-lang/triagebot#1730
feat: valdiate proposed change in triagetoml for PRs ✨
feat: valdiate proposed change in triagetoml for PRs ✨