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

pagy v9 compatibility, backwards compatible #3046

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

yshmarov
Copy link
Contributor

@yshmarov yshmarov commented Jul 23, 2024

Copy link

codeclimate bot commented Jul 23, 2024

Code Climate has analyzed commit 9180256 and detected 0 issues on this pull request.

View more on Code Climate.

Gemfile Outdated
@@ -185,6 +185,6 @@ gem "avo-money_field"
gem "avo-record_link_field"

# gem "pagy", "< 8.0.0"
gem "pagy", "> 8"
gem "pagy", "> 9"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't have to commit the Gemfile changes right now, to ensure that we don't break other apps.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's ok, this Gemfiles does not reflect on avo's dependencies, those are specified in avo.gemspec

@adrianthedev
Copy link
Collaborator

Thank you @yshmarov!
We appreciate your contribution ❤️

@Paul-Bob Paul-Bob added dependencies Pull requests that update a dependency file Fix and removed dependencies Pull requests that update a dependency file labels Jul 24, 2024
Copy link
Contributor

@Paul-Bob Paul-Bob left a comment

Choose a reason for hiding this comment

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

Thank you @yshmarov!

@@ -1,5 +1,6 @@
require "pagy/extras/trim"
require "pagy/extras/countless"
require "pagy/extras/size"
Copy link
Contributor

@Paul-Bob Paul-Bob Jul 24, 2024

Choose a reason for hiding this comment

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

Let's keep this for now.

I created this issue to use integer sizes in favor of using the array legacy API.

@Paul-Bob Paul-Bob merged commit 6af4f0e into avo-hq:main Jul 24, 2024
22 checks passed
@yshmarov yshmarov deleted the pagy-9-compatibility branch July 24, 2024 08:38
@iainbeeston
Copy link
Contributor

iainbeeston commented Jul 24, 2024

This has actually broken my rails application that uses avo. On app startup I get a cannot load such file -- pagy/extras/size error from line 3 of config/initializers/pagy.rbin avo. Looking at pagy on GitHub, it looks like pagy/extras/size was only added a week ago in pagy 9.0 and older versions of page don't have this file (and will crash). I'm using 7.0.11.

I can see #3049 there's a change scheduled that removes the need for this PR, can that get prioritised or this PR reverted please?

@adrianthedev
Copy link
Collaborator

yup. On it @iainbeeston

@adrianthedev adrianthedev mentioned this pull request Jul 24, 2024
4 tasks
@Paul-Bob
Copy link
Contributor

Fixed on 3.10.9

@simi
Copy link
Contributor

simi commented Aug 28, 2024

Any chance to backport to 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagy 9.0.0 not compatible with Avo 3.10.6
5 participants