Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Update readme and drop Ruby 1.8 support #30

Merged
merged 2 commits into from
Mar 23, 2015

Conversation

lucasallan
Copy link
Member

No description provided.

@lucasallan lucasallan changed the title Update readme removes support to mri19 and mri18 Update readme and drop support to Ruby 1.8 Mar 19, 2015
@lucasallan lucasallan force-pushed the update-readme-removes-support-to-mri19-and-mri18 branch from c4b9e49 to 53fa6fe Compare March 19, 2015 19:31
@lucasallan lucasallan changed the title Update readme and drop support to Ruby 1.8 Update readme and drop Ruby 1.8 support Mar 19, 2015
require 'ref/weak_reference/weak_ref'
elsif defined?(::ObjectSpace._id2ref)
# If ObjectSpace can lookup objects from their object_id, then use the pure ruby implementation.
require 'ref/weak_reference/pure_ruby'
Copy link
Member

Choose a reason for hiding this comment

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

Why are we getting rid of the pure Ruby implementation?

Copy link
Member Author

Choose a reason for hiding this comment

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

pure_ruby was being used only when running it on MRI 1.8 and we're dropping 1.8 support.

Copy link
Member

Choose a reason for hiding this comment

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

Ah. Got it. I missed that in my cursory scan of the PR. Thank you!

@lucasallan lucasallan force-pushed the update-readme-removes-support-to-mri19-and-mri18 branch from 53fa6fe to 9f8b831 Compare March 22, 2015 13:37
lucasallan added a commit that referenced this pull request Mar 23, 2015
…pport-to-mri19-and-mri18

Update readme and drop Ruby 1.8 support
@lucasallan lucasallan merged commit 29de448 into master Mar 23, 2015
@lucasallan lucasallan deleted the update-readme-removes-support-to-mri19-and-mri18 branch March 23, 2015 05:39
@@ -35,12 +35,6 @@ This library also includes tools for some common uses of weak and soft reference

Ruby does come with the `WeakRef` class in the standard library. However, there are [issues with this class](https://bugs.ruby-lang.org/issues/4168) across several different Ruby runtimes. This gem provides a common interface to weak references that works across MRI, Ruby Enterprise Edition, YARV, JRuby and Rubinius.

1. MRI and REE 1.8 - `WeakRef` extends from Delegator which is a very heavy weight class under Ruby 1.8. Creating a `WeakRef` object will allocate thousands of other objects and use up hundreds of kilobytes of memory. This makes `WeakRef` all but unusable even if you only need several hundred of them.
2. YARV 1.9 - `WeakRef` is unsafe to use because the garbage collector can run in a different system thread than a thread allocating memory. This exposes a bug where a `WeakRef` may end up pointing to a completely different object than it originally referenced.
Copy link
Member

Choose a reason for hiding this comment

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

We are dropping 1.9 too?

Copy link
Member Author

Choose a reason for hiding this comment

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

@pitr-ch Yes, I believe there is no reason to support Ruby 1.9 in the next releases because MRI 1.9 is officially dead: https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/

Copy link
Member

Choose a reason for hiding this comment

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

Support for MRI 1.9 has ended, but I've never seen any data indicating that people aren't still using it in production. So I would hesitate to say it's actually dead. For this gem and this release I think dropping 1.9 support is OK. We aren't adding any new features or fixing bugs. The main goal of this release is to drop support for old versions of Ruby (mainly MRI 1.8 and IronRuby). MRI 1.9 users will still be able to use the 1.x release so we won't be disenfranchising any users. I would argue against dropping support for MRI 1.9 in any of our other gems, however.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't this gem our (concurrent-ruby) dependency? It would force concurrent-ruby to 2.0 too, or am I mistaken? Also, We (Dynflow -> Foreman -> Katello) need 1.9 MRI still supported, since MRI 1.9 RPMs are supported. cc @iNecas

Copy link
Member

Choose a reason for hiding this comment

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

@pitr-ch Yes, you are correct. I completely lost sight of that when I post my previous response. The original suggestion in #22 was to drop support for MRI 1.8 and Iron Ruby and I think we should stick with that. My previous comment was in error. We should retain support for MRI in 1.9 until we are ready to remove MRI 1.9 support from concurrent-ruby. Thanks for catching that!

Copy link
Member Author

Choose a reason for hiding this comment

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

#33

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

Successfully merging this pull request may close these issues.

3 participants