-
-
Notifications
You must be signed in to change notification settings - Fork 10.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
livecheck migration: add strategies #8255
livecheck migration: add strategies #8255
Conversation
Well CI is failing, for
It all works fine locally, not sure why there's a problem. Even tried changing the Edit: I removed that particular test and it seems to pass now. |
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.
These are just a couple things that I wanted to comment on for the moment. I'll take a pass at the tests after I've finished updating the strategies and those changes are integrated here.
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.
A bunch of comments but I don't consider many of them blocking considering this code has been tested and has a decent amount of new tests too.
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.
I'm hoping to have a PR up within the next day or two for the aforementioned work to make the strategies more clear (turning regexes into multiline constants with comments, adding explanatory comments in general, etc.). I've finished the technical changes (relating to code clarity) and I just need to finish adding explanatory comments.
The forthcoming PR should address most of the feedback here in the process, so I'll request Mike's review on that PR once it's up.
With the latest push, changes from Homebrew/homebrew-livecheck#1329 have been integrated here. There are hardly any differences except the absence here of a I've also removed the test for Other than that, just need to add tests if required I think (maybe for the |
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.
I added a couple suggestions related to changes that I made to the Apache
and Git
strategies' #match?
methods after reviewing the strategy tests here. These changes are in homebrew-livecheck and simply need to be integrated here.
There's one issue in the Gnu
strategy where some code didn't get copied over correctly and that needs to be brought in line with the relevant code in homebrew-livecheck.
Regarding the tests, I added some suggested URLs that are a little closer to real URLs for each strategy. As documented in the explanatory comments in the strategies, there are often multiple URL formats that we want to test but I didn't go so far as to add alternative URLs to the tests yet. It's technically possible to handle some of it here but our time is limited and this is something that I plan to address in a PR sometime after GSoC is over, so I'm not overly concerned about getting it done in this PR.
I'll defer to Mike as to whether we should add tests for all the #find_versions
methods. If we do go this route, then we would just replace the test URLs with real URLs, so there wouldn't be any need to integrate my suggested URL changes. With that in mind, I would hold off on those particular changes until Mike reviews this.
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.
Ideally this would have more tests but it's looking good enough to me now that I'm happy to see it merged whenever @samford is happy with it. I'd err on merging on the earlier side given that we can continue to make updates once it's in Homebrew/brew and we're coming towards the end of GSoC.
Please also mark all modules and classes with |
I agree. The only remaining areas that need to be addressed at this point are:
Once these are resolved, I'm good with this being merged. |
Agreed 👍🏻 |
The test has been dropped for now but I'm doing some research on what the problem could be. The documentation request has also been completed as follows:
|
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com> Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com> Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com> Co-authored-by: Issy Long <me@issyl0.co.uk> Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> Co-authored-by: Seeker <meaningseeking@protonmail.com>
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.
I can't comment on the @api private
and @api public
additions but outside of that this looks good to me. Anything else that we've discussed here but haven't addressed (e.g., the Strategy#strategies
situation) can simply be handled after GSoC.
Merging, thanks @nandahkrishna and @samford! |
brew style
with your changes locally?brew tests
with your changes locally?This PR adds livecheck's strategies to Homebrew/brew. The original PR #8180 was split up to make code review easier, and the changes here will have to be merged before that PR can be merged.
Changes yet to work on: