matthewrudy / memoist

ActiveSupport::Memoizable with a few enhancements
MIT License
920 stars 99 forks source link

Needs to be updated to support Ruby 2.7.1 #88

Open jasonperrone opened 4 years ago

jasonperrone commented 4 years ago

Specifically this: https://piechowski.io/post/last-arg-keyword-deprecated-ruby-2-7/

/home/jason/.rvm/gems/ruby-2.7.1@actioncue/gems/memoist-0.16.2/lib/memoist.rb:213: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

jasonperrone commented 3 years ago

This is broken in Ruby 3.0.1.

jasonperrone commented 3 years ago

We may need to face the fact that Matthew may have passed away. There is no activity from him for a long time. This gem may need to be adopted.

ojab commented 3 years ago

Why adopt it if alive gems with the same memoize method API already exists? There is not-null chance that your project already includes dry-core, so include Memoist -> include Dry::Core::Memoizable or Memoist = Dry::Core::Memoizable somewhere and that's it. There is not #unmemoize_all and other methods, but it's easy to add if needed and dry-rb ppl are usually pretty fast at merging stuff.

And there are other gems doing the same.

(I'm afraid that you're right and this gem wouldn't be updated)

jasonperrone commented 3 years ago

OMG, that is so sad. Ugh.

Well, I forked the gem and modified it to work as I need so I'm good here. Thanks for the info, btw.

tbsvttr commented 2 years ago

@jasonperrone I think you mean Ruby 3.0.1 and not Rails?

tbsvttr commented 2 years ago

@ojab Dry::Core::Memoizable does not really seem to be really in the user space of dry-rb. There is no documentation for it other than this, which more or less says nothing: https://rubydoc.info/gems/dry-core/Dry/Core/Memoizable

jasonperrone commented 2 years ago

@jasonperrone I think you mean Ruby 3.0.1 and not Rails?

Oops, sorry. That was clearly pre-coffee.

mvastola commented 2 years ago

Why adopt it if alive gems with the same memoize method API already exists?

Just came across this thread when trying to debug errors after upgrading to ruby3..

Does anyone know of any other drop-in (or close thereto) replacements for this gem? My only concern with dry-core is that their barely-documented memoize routines might be meant for internal use only and therefore could be subject to change without warning.

pboling commented 2 years ago

We may need to face the fact that Matthew may have passed away. There is no activity from him for a long time. This gem may need to be adopted.

@patbl @jasonperrone He died in 2019. https://brightonruby.com/2019/from-developer-to-architect-and-back-again-matthew-rudy-jacobs/

I've loved this gem for a long time, and for years was active in the issues and PRs. Would be happy to help with moving it to an org, keeping the memory of Matthew alive. Certainly feels like I worked with Matthew for a decade. Who's with me? I have no idea what the process is for handling repos of deceased developers, but surely Github has one?

patbl commented 2 years ago

It sounds as though there isn't a process:

You could create a new account (maybe one named memoisthttps://github.com/memoist currently 404's), and fork the repo there.

pboling commented 2 years ago

Seems like this one should be archived, and an org can host a fork. I'll create the org.

pboling commented 2 years ago

I realized after creating the memoist org that @sebjacobs (who is Matthew's brother) actually has been maintaining this gem since Matthew's passing (at least until the end of 2020), but Seb hasn't been very active in the issues and PRs. I invited @sebjacobs to the new org, and am very interested to hear his thoughts on what direction to go here.

Seb has not been on GitHub in several months, and it is an uncharacteristically long absence (perhaps his longest ever?). He is still running, but unclear if still coding.

patbl commented 2 years ago

@pboling Are you planning to publish any updates to https://github.com/memoist/memoist?

pboling commented 2 years ago

@patbl I am not sure how much time I'll have to work on it, though I am using the gem in production, so perhaps it could fold into my work day. But I am happy to add anyone to the org / repo that wants to work on it. I don't have rights to the gem itself, so it might need to hard-fork for a release.

Also, since creating the memoist org, I decided that I'll be moving the bulk of my FLOSS efforts to another platform that isn't so toxic to open source work and developers' rights. So if we do move forward with a hard fork, I'd suggest moving off GitHub to an entirely different platform.

patbl commented 3 months ago

For people looking to move off Memoist, MemoWise seems like a good option.

pboling commented 3 months ago

I'll check it out. I've switched to using https://github.com/AlexWayfer/alt_memery, and I'm loving it, but looking over MemoWise, it is unambiguously superior. I'll be switching to MemoWise.

pboling commented 3 months ago

I've merged the PRs over on the memoist org, including Ruby 3 compat, and posted alerts directing people toward more maintained projects.

pboling commented 3 months ago

FYI: Added this alert to the new memoist repo

[!IMPORTANT]

Recommendation

Consider using MemoWise instead, as it is maintained, fully tested, provides thread safety guarantees, and is much, much faster.

Other Alternatives

In case you need a tool with this feature set that is currently maintained, check out:

[!TIP]
Seriously though, read the important note above.

[!WARNING]
If you must continue - be aware that this is unmaintained software.