-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
livecheck: CPAN strategy #9510
livecheck: CPAN strategy #9510
Conversation
0435e9f
to
2a7ac36
Compare
Hey, @vladimyr! Thanks for the PR. What package can I test it with? |
Hi @maxim-belkin 👋 I'm AFK, going after typo later on and in the meantime, you can test it using the following packages:
Be aware that this is not an exhaustive list, just some examples I recalled from my testing spree. |
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.
Couple of general comments, but, in general a 👍🏻 from me.
I didn't comment on the part below package_path
as I'm sure this is something that @samford and @nandahkrishna have to carefully review and approve.
But all in all, this is fantastic! It once again shows me that modular approach works great and it's easy to extend livecheck's support for specific sites on a rolling basis.
Thanks, @vladimyr!
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.
There are currently five formulae in homebrew/core that have a stable
URL using an archive file from CPAN:
- btparse
- carton
- cpm
- rex
- sql-translator
I've tested a modified version of this strategy with my suggestions incorporated and this works as expected.
Testing this with the 255 unique cpan.metacpan.org
URLs in homebrew/core formulae (out of 340 URLs and not just the five stable
URLs), there were only two that didn't work. These were https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz and https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz.
The reason is because https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/ isn't a directory listing page. Instead, page's title is "HAR DI HAR" and the body content is "HARR!". It seems like authors may be able to upload their own index.html
file that prevents the directory listing from appearing.
Since this is the only outlier, I feel comfortable with my modified approach here. All the other URLs worked as expected without any additional modifications to the strategy beyond my suggestions here.
There were a few where the directory contained versions we wouldn't want (e.g., a mix of versions like 1.2.3
and date-based versions like 20201211
) but we would simply address those using a livecheck
block with a more specific regex
, like we do with other strategies.
For what it's worth, if you agree with my suggested changes above, I can simply push my local changes to this branch and save you the trouble of incorporating them. |
af9c9fc
to
9ab05bf
Compare
@samford I believe we are now on the same page? I think I addressed all your points, let me know if I accidentally missed something. And I believe it goes without saying but still. Thank you for your patient and extensive guidance! |
Co-authored-by: Dario Vladovic <d.vladimyr@gmail.com>
9ab05bf
to
5b770e9
Compare
I'm good with where this is now and I don't see any other areas that could be improved. It's customary to not merge a Homebrew/brew PR until at least 24 hours have passed since it was opened (not sure what happened to our usual restriction here), so I'll merge this in a few hours. Thanks, @vladimyr! |
brew style
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?This adds a new livecheck strategy for software obtained from CPAN.