Closed mikebaldry closed 9 years ago
really @brightbits? I'm not very good (any good?) at keeping up with these issues.
does annotate deliberately load
the file again?
The only way to solve this would be to avoid raising the AlreadyMemoizedError
and instead just log to warn
.
Not sure if that would cause issues for any existing users.
I have seen that error with annotate as well, but have been able to work around it by fixing other things. I don't remember what specifically I had to upgrade or change, but I still use both and with no problems.
@matthewrudy This error is preventing me from using the guard
gem with my test suite as well.
Exception encountered: #<Memoist::AlreadyMemoizedError: Already memoized valid?>
backtrace:
/Users/pboling/.rvm/gems/ruby-2.1.2@archer/gems/memoist-0.11.0/lib/memoist.rb:99:in `block (2 levels) in memoize'
/Users/pboling/.rvm/gems/ruby-2.1.2@archer/gems/memoist-0.11.0/lib/memoist.rb:27:in `class_eval'
/Users/pboling/.rvm/gems/ruby-2.1.2@archer/gems/memoist-0.11.0/lib/memoist.rb:27:in `memoist_eval'
/Users/pboling/.rvm/gems/ruby-2.1.2@archer/gems/memoist-0.11.0/lib/memoist.rb:95:in `block in memoize'
/Users/pboling/.rvm/gems/ruby-2.1.2@archer/gems/memoist-0.11.0/lib/memoist.rb:91:in `each'
/Users/pboling/.rvm/gems/ruby-2.1.2@archer/gems/memoist-0.11.0/lib/memoist.rb:91:in `memoize'
/Users/pboling/Documents/trumaker/archer/app/api/trumaker_api/authentication/strategies/form_strategy.rb:24:in `<class:FormStrategy>'
When running annotate, it causes the model not to be annotated when it includes Memoizable and uses it on a method.
In the output:
Unable to annotate user.rb: The method source_uris is already memoized