-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a command to clean all txtar output #143
Comments
You mean something like this
|
that looks plausible to me - did you just have that ready, lol? or maybe chatgpt spat it out 😉 |
Yeah, I already had it ready before you wrote the issue because I used it for #144 -- as I changed multiple times the path of the output files, I thought about a programmatic way to do such clean ups. Honestly, I'm not going to negate I interacted with ChatGPT more than once at this point, but sincerely this time I felt like it was almost easier to write these lines than asking to it, plus the potential risk of having to waste time on fixing minor issues from its output. It's not the first time that I do similar things with Indeed, the fun fact is that I initially wrote the |
So, do you want me to open a PR? If so, should we think about somehow documenting/reflecting the use of Mage (use of Bingo or similar, and/or leaving a comment in the README), or would be fine to just leave the |
Our txtar test framework leaves garbage behind. If a test that produces some output (anything
out/*
) goes away, the output still remains. I think everything onmain
is clean now, but with the already large and increasing volume of tests our txtar corpus produces, it's really hard to tell if there's garbage in there or not.I mistakenly tried to fix this as part of the original txtar testing framework,
internal/txtartest
; it can error if there are outputs in the txtar that aren't produced by the test. But that makes it impossible to reuse the same txtar from multiple tests in different packages all across the project - exactly the use pattern we want to enable.So instead, we should have a command we can call - i'd be fine with introducing something like mage - that can walk over all our txtar corpus(es) and remove all
output
. Once cleaned, runningTHEMA_UPDATE_GOLDEN=1 go test ./...
should be sufficient to repopulate all txtar files correctly.The text was updated successfully, but these errors were encountered: