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

Add explicit dependency to prime #140

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

renchap
Copy link
Contributor

@renchap renchap commented May 20, 2024

The prime gem has been extracted from Ruby core into a gem.

Starting with Ruby 3.4.0, it will no longer be bundled with Ruby, so it requires an explicit dependency. Ruby 3.3.0+ display a warning due to this:

/usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27: warning: prime was loaded from the standard library, but is not part of the default gems since Ruby 3.1.0. Add prime to your Gemfile or
gemspec. Also contact author of fast_gettext-2.3.0 to add prime into its gemspec.

I also removed the fallback that uses mathn, as mathn is deprecated and not recommended to use. The prime gem supports Ruby 2.5.0+, same as this gem, so it should not break compatibility.

The `prime` gem has been extracted from Ruby core into a gem.

Starting with Ruby 3.4.0, it will no longer be bundled with Ruby, so it requires an explicit dependency. Ruby 3.3.0+ display a warning due to this:

```
/usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27: warning: prime was loaded from the standard library, but is not part of the default gems since Ruby 3.1.0. Add prime to your Gemfile or
gemspec. Also contact author of fast_gettext-2.3.0 to add prime into its gemspec.
```

I also removed the fallback that uses `mathn`, as `mathn` is deprecated and not recommended to use. The `prime` gem supports Ruby 2.5.0+, same as this gem, so it should not break compatibility.
@grosser
Copy link
Owner

grosser commented May 20, 2024

thx!
... ideally we'd rip this out and just hardcode the first n prime numbers, but good enough as is :D

CI is failing, can you try bumping bundler or ruby version ?

@renchap renchap force-pushed the prime-dependency branch from a185849 to 8ffea39 Compare May 20, 2024 16:42
@renchap
Copy link
Contributor Author

renchap commented May 20, 2024

Updated bundler to the latest 2.3 version (Bundler 2.4 requires Ruby 2.6).

That would probably be a good idea to have a big pass at bumping the minimum supported versions, as I am having trouble running the tests locally with such an old Ruby version.

@renchap renchap force-pushed the prime-dependency branch from 8ffea39 to 6bd95ff Compare May 20, 2024 16:43
@renchap renchap force-pushed the prime-dependency branch from 6bd95ff to 555e8a4 Compare May 20, 2024 16:56
@grosser grosser merged commit abc4bbe into grosser:master May 20, 2024
6 checks passed
@grosser
Copy link
Owner

grosser commented May 20, 2024

let's try dropping some old rubies ... #141

@grosser
Copy link
Owner

grosser commented May 20, 2024

released as 2.4.0

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

Successfully merging this pull request may close these issues.

2 participants