-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
rmtrash 0.0.1 #66734
rmtrash 0.0.1 #66734
Conversation
end | ||
|
||
test do | ||
system "#{bin}/rmtrash", "-v" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook.
In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.
- Then you can check that the output is as expected (with assert_equal or assert_match on the output of shell_output)
- You can also check that an output file was created, if that is expected: assert_predicate testpath/"output.txt", :exist?
Some advice for specific cases:
- If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
- If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
- If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
- Same if the software requires a virtual machine, docker instance, etc. to be running.
depends_on "go" => :build | ||
|
||
def install | ||
system "go", "build", "-o", "#{bin}/rmtrash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system "go", "build", "-o", "#{bin}/rmtrash" | |
system "go", "build", *std_go_args |
|
Hi, this seems like a nice software, but not notable enough for us to package in Homebrew for now. This is not a decision on the merits of the software, but we cannot distribute every single piece of software and have to draw a line on “notability” somewhere. Of course, we would be happy to reconsider in the future. Please consider hosting it in a personal tap, which is very easy to do: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap |
@bayandin @SMillerDev Hi, thanks for your review. As mentioned in the beginning, this is intended to replace the old version which was unmaintained. Therefore I think the notability is not applicable here. |
Unless it's a successor of original |
The notability still applies because that gives us a certain threshold of people who find it worth it to maintain and use. Otherwise someone could make a script today that they need once, add it to brew and stop all maintenance, with nobody using it and brew testing/maintaining it all this time. |
Thank you for the further explanation, I understand your difficulty. Note that acknowledgment by the original author is not a valid reason because we cannot reach the original author anymore. I think the priority is to keep the compatibility other than removing it without any notice (well, as developers we know where to seek what was removed, but ordinary users don't). Furthermore, I still hope these reasons about the notability of replacing old unmaintained software could be somehow be added to a document in the future, which saves people a lot of time from reading the contribution guideline and send a PR that is likely to be rejected. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?As discussed in #65438, the old
rmtrash
was removed recently (because of lack of response and unclear licensing), but this breaks my current workflow from setting up the environment (as a user ofrmtrash
).To address the issue, I wrote a new version that is released under the MIT license and does the same job as the old
rmtrash
, hopefully this can bring thermtrash
command back to the core.cc @waldyrious @SMillerDev