-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
very cool! #6
Comments
Thanks for reaching out! Glad you think it's cool. You might also be interested in treereduce, which can be used to minimize the bugs that get found.
I was thinking of doing this 😄 I would appreciate it if you could add a shout-out in the README and/or notes when you find bugs using it! But no worries either way, I don't really care that much. I think it would be so cool if we could get an integrated, end-to-end solution with icemaker, tree-splicer, and treereduce 🚀 Maybe it would even write the bug description for you?
This is a bit tricky... I want to share references between the
I'm not surprised, haha. Keep me posted if you're able to track it down! |
Added a small section to the readme, let me know what you think :) rust-lang/rust#109071 Filling out a bug template with input code, used compiler flags, stacktrace and compiler version should be pretty easy as I already have all this information available (icemaker produces a logfile which looks somewhat like this: https://github.com/matthiaskrgr/arctICE/blob/main/errors.json Automatic testcase reduction is definitely something I have been thinking about a lot already but it would require some kind of directory to dump the reduced files to. Maybe I will get to that in the upcoming weeks... |
Thanks :)
That's one of the great tihngs about tree-sitter - it can deal with partially-invalid code!
Awesome!! I'll add them to the README.
Feel free to ping me if I can be helpful on this front, with API adjustments to treereduce or anything else. |
I also had a look at treereduce now, but it took me a while until I had the flags figured out.. from the --help output It might also be nice if we could pass a regex like Oh and it could run rustfmt on the final file (before making sure that does not "fix" the crash of course) |
Yeah, it's a little confusing, sorry! The docs have an example: https://langston-barrett.github.io/treereduce/usage.html
My thoughts exactly! langston-barrett/treereduce#6 langston-barrett/treereduce#45 For now, you can give it a shell script that uses
I think this would be great in a combined tool. |
@matthiaskrgr Here's a wrapper around This weekend, I'll improve it so that it avoids introducing spurrious syntax/type/scope/borrow errors. |
Oh that's interesting, I'll check it out :)
|
It now avoids introducing spurrious errors, at the cost of sometimes not being able to reduce a problem at all. |
|
@matthiaskrgr A few updates:
|
Hey, just wanted to say hi! :D
Very cool crate!
I have hooked this up into icemaker to automatically generate code from a set of input which then can be checked (I already tried something similar previously by feeding everything into a markov chain (lol) and looking what pops out.
Two small things I noticed:
It might be nice if the
splice
function would not take the hashmap by reference so that it is possible to have a function that takes a path, creates the hashmap, feeds it intosplice
and then returns anIterator
, right now I think the iterator would outlive the ref to the HashMap and thus it would not work (I've worked around with aVec
right now, meh...)I have not gotten to debug this in detail but when I processed rustc
tests/ui/issues/issue-74564-if-expr-stack-overflow.rs
I ran into a stack overflow. (yay, for fuzzing the fuzzer!), but I could not reproduce this when running the splicer binary directly on it so far...The text was updated successfully, but these errors were encountered: