-
Notifications
You must be signed in to change notification settings - Fork 108
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
Possible problem upgrading 2.2.0 -> 2.2.1 #139
Comments
Can you please paste a representer that uses coercion? |
@jrmhaig I looked into that. I'm guessing you use virus coercion manually in Can you make sure you're not using coercion in a representer (the |
We are in the process of open sourcing things so, although it is fairly useless by itself, I am able to make our hive-messages repository public so you can see how what the Job class looks like: |
I have reduced this to what I believe is a minimal test that works with 2.2.0 and fails with 2.2.1. require 'rubygems'
#gem 'representable', '=2.2.0'
gem 'representable', '=2.2.1'
gem 'virtus'
gem 'roar'
require 'virtus'
require 'roar/json'
require 'roar/client'
module Representers
module JobRepresenter
include Roar::JSON
property :command
end
end
module Messages
class Base
include Virtus.model
include Roar::JSON
include Roar::Client
end
end
module Messages
class Job < Messages::Base
include Representers::JobRepresenter
attribute :command, String
end
end |
I have further reduced it to: require 'rubygems'
#gem 'representable', '=2.2.0'
gem 'representable', '=2.2.1'
gem 'virtus'
require 'virtus'
require 'representable/json'
class Base
include Virtus.model
include Representable
end
class Job < Base
property :command
attribute :command, String
end Interestingly, this works: require 'rubygems'
#gem 'representable', '=2.2.0'
gem 'representable', '=2.2.1'
gem 'virtus'
require 'virtus'
require 'representable/json'
class Job
include Virtus.model
include Representable
property :command
attribute :command, String
end so it looks like it is to do with the class inheritance. |
I found the bug, I am a stupid idiot, please laugh at me: v2.2.0...v2.2.1#diff-de25bf89e18d9382cf8e24d22abce389R92 When "cleaning up" the Releasing 2.2.2 now. |
We are still investigating this problem but we started getting errors recently and the only change has been representable gem upgrading from 2.2.0 to 2.2.1.
Representable isn't explicitly mentioned in the stack trace but 'hive-messages', one of our own gems, uses roar, which in turn uses representable, and the problem goes away when we fix the version of representable to 2.2.0.
We are still not clear where the problem lies but I thought it would be useful to raise here in case anyone else is seeing anything similar.
The text was updated successfully, but these errors were encountered: