Skip to content
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

Closed
wants to merge 1 commit into from
Closed

rmtrash 0.0.1 #66734

wants to merge 1 commit into from

Conversation

changkun
Copy link

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew 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 of rmtrash).

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 the rmtrash command back to the core.

cc @waldyrious @SMillerDev

@BrewTestBot BrewTestBot added go Go use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels Dec 11, 2020
end

test do
system "#{bin}/rmtrash", "-v"
Copy link
Member

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
system "go", "build", "-o", "#{bin}/rmtrash"
system "go", "build", *std_go_args

@bayandin
Copy link
Member

Error: 1 problem in 1 formula detected
rmtrash:
  * GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)

@SMillerDev
Copy link
Member

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

@SMillerDev SMillerDev closed this Dec 11, 2020
@changkun
Copy link
Author

@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.

@bayandin
Copy link
Member

Unless it's a successor of original rmtrash (which should be acknowledged by the author of the original version) notability is applicable here as well.
Thanks for understanding!

@SMillerDev
Copy link
Member

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.

@changkun
Copy link
Author

changkun commented Dec 11, 2020

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.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 11, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 11, 2021
@chenrui333 chenrui333 added the notability Project is not notable enough for inclusion label Jan 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
go Go use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core notability Project is not notable enough for inclusion outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants