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

Pessimistic version constraint operator misused #386

Closed
ellnix opened this issue Jan 14, 2025 · 0 comments · Fixed by #387
Closed

Pessimistic version constraint operator misused #386

ellnix opened this issue Jan 14, 2025 · 0 comments · Fixed by #387

Comments

@ellnix
Copy link
Collaborator

ellnix commented Jan 14, 2025

In the gemspec, we specify the dependency on the meilisearch-ruby gem as:

  s.add_dependency 'meilisearch', '~> 0.28'

However, the twiddle-wakka (~>) operator is not meant only for minor versions, its behavior depends on how you specify the version. ~> 0.28 will grab anything >= 0.28 and < 1, while ~> 0.28.0 will grab >= 0.28.0 to < 0.29.
Source

This essentially means that our constraint does not prevent old versions of the meilisearch-rails gem from grabbing newer versions of meilisearch-ruby.

This has already caused issues with our communication failure in shipping meilisearch-ruby 0.30 with the renamed top level module, I wrongly believed that wouldn't be an issue since this rails gem would be frozen in place. See #347 (comment) .

ellnix added a commit to ellnix/meilisearch-rails that referenced this issue Jan 14, 2025
twiddle-wakka (~>) operator is not meant only for minor versions, its behavior depends on how you specify the version. ~> 0.28 will grab anything >= 0.28 and < 1, while ~> 0.28.0 will grab >= 0.28.0 to < 0.29.

For more information, see meilisearch#386 .
@meili-bors meili-bors bot closed this as completed in 0086588 Jan 14, 2025
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 a pull request may close this issue.

1 participant