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

Pin country_select version in README #1833

Closed
wants to merge 1 commit into from

Conversation

DanielPechersky
Copy link

The latest release of Simple Form breaks with country_select 9.0.0

Simple Form breaks with `country_select` 9.0.0
@carlosantoniodasilva
Copy link
Member

Can you show what the error or incompatibility is? I'd rather try to fix that, find a way to work with all versions, if we can, but first I need to understand more. Thanks!

@DanielPechersky
Copy link
Author

I'll get you more information on the error, but you should pin the version of country_select anyways. Otherwise the user's code will break in this circumstance:

  1. A user copy pastes gem 'country_select' from your README
  2. country_select publishes a new major version
  3. The user updates all their gems, and country_select is no longer compatible with Simple Form

@carlosantoniodasilva
Copy link
Member

I appreciate the feedback. How users decide to define the gem on their gemfiles is probably not a big concern we should have though, some prefer to pin, others prefer to leave it open, in any case bundle updating multiple gems is generally not advised.

There's also the concern of it becoming an extra small burden to be updating the readme every time with new country_select versions ourselves. Plus, we wouldn't get these helpful reports when it breaks. :)

carlosantoniodasilva added a commit that referenced this pull request Mar 5, 2024
Trying to see if we get a build failure, related to report
#1833
carlosantoniodasilva added a commit that referenced this pull request Mar 5, 2024
Trying to see if we get a build failure, related to report
#1833
@DanielPechersky
Copy link
Author

This seems to be the relevant information:

#<ArgumentError: wrong number of arguments (given 4, expected 1..3)>

/Users/dannyp/.rbenv/versions/3.2.2/gemsets/foo/gems/country_select-9.0.0/lib/country_select/country_select_helper.rb:6:in `country_select'
/Users/dannyp/.rbenv/versions/3.2.2/gemsets/foo/gems/formtastic-5.0.0/lib/formtastic/inputs/country_input.rb:77:in `block in to_html'

@carlosantoniodasilva
Copy link
Member

I ran the tests with a full bundle update here, which used country_select v9.0.0, and didn't run into any errors other than the fact that they dropped support to Ruby 2.7 already apparently (as did some other gems).

@carlosantoniodasilva
Copy link
Member

@DanielPechersky it looks like you're using formtastic instead, which has a PR to add support to country_select v9.0.0.

Let me know if you run into anything with SimpleForm.

@DanielPechersky
Copy link
Author

Ah, looks like this is the fabled "user error". Apologies

@carlosantoniodasilva
Copy link
Member

No worries, glad I could help. 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants