Rails4 compatability #493

Open
IlyaDonskikh opened this Issue Jan 17, 2013 · 17 comments

Comments

Projects
None yet
9 participants
@IlyaDonskikh

Hi!
When the release version for Rails4?

  mongo_mapper (>= 0) ruby depends on
      activemodel (~> 3.0) ruby

    rails (~> 4.0.0.beta) ruby depends on
      activemodel (4.0.0.beta)
@AquaGeek

This comment has been minimized.

Show comment Hide comment
@AquaGeek

AquaGeek Mar 2, 2013

👍

AquaGeek commented Mar 2, 2013

👍

@JonKernPA

This comment has been minimized.

Show comment Hide comment
@JonKernPA

JonKernPA Apr 30, 2013

Contributor

+1

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On Mar 2, 2013, at 2:22 PM, Tyler Stromberg notifications@github.com wrote:

+1


Reply to this email directly or view it on GitHub.

Contributor

JonKernPA commented Apr 30, 2013

+1

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On Mar 2, 2013, at 2:22 PM, Tyler Stromberg notifications@github.com wrote:

+1


Reply to this email directly or view it on GitHub.

@jcaudle jcaudle closed this May 1, 2013

@jcaudle jcaudle reopened this May 1, 2013

@jcaudle

This comment has been minimized.

Show comment Hide comment
@jcaudle

jcaudle May 1, 2013

Contributor

Thanks for the suggestion @IlyaDonskikh. This is definitely something to work toward, however, my biggest concern with it is how different some of the querying methods are in ActiveRecord 4. I've just recently come on board to help out with maintenance on the project, and want to get a new release of the 0.x version of the gem out soon, but I need to get the tests passing on ruby 1.8.7 through ruby 2.0 to do that.

I think the differences between Rails 3 and 4 might justify a major version number difference between the gem supporting the two major versions of Rails, but I'm concerned about all the connotations a 1.x version of the gem brings with it, and I'm not certain that it makes sense for supporting Rails 4.

I'd like to hear from some of the members of the MongoMapper community on what their thoughts are on this.

Contributor

jcaudle commented May 1, 2013

Thanks for the suggestion @IlyaDonskikh. This is definitely something to work toward, however, my biggest concern with it is how different some of the querying methods are in ActiveRecord 4. I've just recently come on board to help out with maintenance on the project, and want to get a new release of the 0.x version of the gem out soon, but I need to get the tests passing on ruby 1.8.7 through ruby 2.0 to do that.

I think the differences between Rails 3 and 4 might justify a major version number difference between the gem supporting the two major versions of Rails, but I'm concerned about all the connotations a 1.x version of the gem brings with it, and I'm not certain that it makes sense for supporting Rails 4.

I'd like to hear from some of the members of the MongoMapper community on what their thoughts are on this.

@jnunemaker

This comment has been minimized.

Show comment Hide comment
@jnunemaker

jnunemaker May 8, 2013

Contributor

I'd be ok with a 1.0 release. I am terrible at actually releasing 1.0 projects. I don't know that I have a single one. haha.

Contributor

jnunemaker commented May 8, 2013

I'd be ok with a 1.0 release. I am terrible at actually releasing 1.0 projects. I don't know that I have a single one. haha.

@JonKernPA

This comment has been minimized.

Show comment Hide comment
@JonKernPA

JonKernPA May 14, 2013

Contributor

i think that's called modesty...

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On May 7, 2013, at 8:12 PM, John Nunemaker notifications@github.com wrote:

I'd be ok with a 1.0 release. I am terrible at actually releasing 1.0 projects. I don't know that I have a single one. haha.


Reply to this email directly or view it on GitHub.

Contributor

JonKernPA commented May 14, 2013

i think that's called modesty...

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On May 7, 2013, at 8:12 PM, John Nunemaker notifications@github.com wrote:

I'd be ok with a 1.0 release. I am terrible at actually releasing 1.0 projects. I don't know that I have a single one. haha.


Reply to this email directly or view it on GitHub.

@JonKernPA

This comment has been minimized.

Show comment Hide comment
@JonKernPA

JonKernPA May 14, 2013

Contributor

i would think that supporting Rails 4 justifies a jump in the MM major version number (it's a big jump in Rails).

Differentiation in version makes it easier for users to know which gem version to use for the Rails flavor.

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On Apr 30, 2013, at 8:09 PM, Joseph Caudle notifications@github.com wrote:

Thanks for the suggestion @IlyaDonskikh. This is definitely something to work toward, however, my biggest concern with it is how different some of the querying methods are in ActiveRecord 4. I've just recently come on board to help out with maintenance on the project, and want to get a new release of the 0.x version of the gem out soon, but I need to get the tests passing on ruby 1.8.7 through ruby 2.0 to do that.

I think the differences between Rails 3 and 4 might justify a major version number difference between the gem supporting the two major versions of Rails, but I'm concerned about all the connotations a 1.x version of the gem brings with it, and I'm not certain that it makes sense for supporting Rails 4.

I'd like to hear from some of the members of the MongoMapper community on what their thoughts are on this.


Reply to this email directly or view it on GitHub.

Contributor

JonKernPA commented May 14, 2013

i would think that supporting Rails 4 justifies a jump in the MM major version number (it's a big jump in Rails).

Differentiation in version makes it easier for users to know which gem version to use for the Rails flavor.

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On Apr 30, 2013, at 8:09 PM, Joseph Caudle notifications@github.com wrote:

Thanks for the suggestion @IlyaDonskikh. This is definitely something to work toward, however, my biggest concern with it is how different some of the querying methods are in ActiveRecord 4. I've just recently come on board to help out with maintenance on the project, and want to get a new release of the 0.x version of the gem out soon, but I need to get the tests passing on ruby 1.8.7 through ruby 2.0 to do that.

I think the differences between Rails 3 and 4 might justify a major version number difference between the gem supporting the two major versions of Rails, but I'm concerned about all the connotations a 1.x version of the gem brings with it, and I'm not certain that it makes sense for supporting Rails 4.

I'd like to hear from some of the members of the MongoMapper community on what their thoughts are on this.


Reply to this email directly or view it on GitHub.

@steveklabnik

This comment has been minimized.

Show comment Hide comment
@steveklabnik

steveklabnik Jun 17, 2013

If there's something I can do to help with this, let me know. I have a few gems that I've adapted testing to multiple versions of Rails, if the project is interested in this, I can submit a pull request.

If there's something I can do to help with this, let me know. I have a few gems that I've adapted testing to multiple versions of Rails, if the project is interested in this, I can submit a pull request.

@jcaudle

This comment has been minimized.

Show comment Hide comment
@jcaudle

jcaudle Jul 2, 2013

Contributor

@steveklabnik, thanks for the offer. There is currently configuration for testing multiple versions of Rails 3. Is there something more to it you'd suggest than adding another gemfile? Feel free to make a pull request if you'd like.

Contributor

jcaudle commented Jul 2, 2013

@steveklabnik, thanks for the offer. There is currently configuration for testing multiple versions of Rails 3. Is there something more to it you'd suggest than adding another gemfile? Feel free to make a pull request if you'd like.

@steveklabnik

This comment has been minimized.

Show comment Hide comment
@steveklabnik

steveklabnik Jul 2, 2013

Ah ha! Somehow, I missed that.

Ah ha! Somehow, I missed that.

@JonKernPA

This comment has been minimized.

Show comment Hide comment
@JonKernPA

JonKernPA Jul 6, 2013

Contributor

Steve, check out Chris Heald's stellar efforts:
https://github.com/cheald/mongomapper/tree/rails4

(from the mongomapper@googlegroups.com group)

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On Jul 2, 2013, at 8:45 AM, Steve Klabnik notifications@github.com wrote:

Ah ha! Somehow, I missed that.


Reply to this email directly or view it on GitHub.

Contributor

JonKernPA commented Jul 6, 2013

Steve, check out Chris Heald's stellar efforts:
https://github.com/cheald/mongomapper/tree/rails4

(from the mongomapper@googlegroups.com group)

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA

On Jul 2, 2013, at 8:45 AM, Steve Klabnik notifications@github.com wrote:

Ah ha! Somehow, I missed that.


Reply to this email directly or view it on GitHub.

@cheald

This comment has been minimized.

Show comment Hide comment
@cheald

cheald Jul 6, 2013

Member

I don't have my app booting on Rails 4 yet, so I can't actually test on a Rails 4 app. I did test on a skeleton app and the world didn't blow up, but I'd love for someone who has a running Rails 4 app to actually drop that branch in and give it a run through the ol' test suite or two.

I'm waiting on review of that branch by the other team members before merging it, since it does include some substantial changes.

In terms of releases, I'd like to do the following:

  1. A 0.13.0 maintenance release of things like the already-merged performance improvements and bugfixes, but which doesn't break any backwards compatibility. This is a drop-in upgrade for people who are on 0.12.0.
  2. A 1.0.0 release which includes Rails 4 support and fixes things like association saves on assignment, which is a change that breaks backwards compatibility. Any other breaking changes would go into this release, too. I feel a lot more comfortable breaking things on a major release.

There's a 1.0 milestone with a number of still-open tickets. I'd like to close as many of those issues as possible for a proper 1.0 release. Since Rails 4 is already out, it may be appropriate to go ahead and do a 1.0.0.beta1 release or something that gets Rails 4 support in the bag while we fold in the rest of the 1.0.0 milestone fixes and features.

@steveklabnik If you have any pointers as to things I should be looking at for Rails 4 compat, I'm all ears. So far it was mostly test suite refactoring to get it actually passing the suite, then I did things like making scopes and attr_protected/attr_accessible follow Rails 4's AR conventions. If there's more I should be looking for, please drop it on me!

Member

cheald commented Jul 6, 2013

I don't have my app booting on Rails 4 yet, so I can't actually test on a Rails 4 app. I did test on a skeleton app and the world didn't blow up, but I'd love for someone who has a running Rails 4 app to actually drop that branch in and give it a run through the ol' test suite or two.

I'm waiting on review of that branch by the other team members before merging it, since it does include some substantial changes.

In terms of releases, I'd like to do the following:

  1. A 0.13.0 maintenance release of things like the already-merged performance improvements and bugfixes, but which doesn't break any backwards compatibility. This is a drop-in upgrade for people who are on 0.12.0.
  2. A 1.0.0 release which includes Rails 4 support and fixes things like association saves on assignment, which is a change that breaks backwards compatibility. Any other breaking changes would go into this release, too. I feel a lot more comfortable breaking things on a major release.

There's a 1.0 milestone with a number of still-open tickets. I'd like to close as many of those issues as possible for a proper 1.0 release. Since Rails 4 is already out, it may be appropriate to go ahead and do a 1.0.0.beta1 release or something that gets Rails 4 support in the bag while we fold in the rest of the 1.0.0 milestone fixes and features.

@steveklabnik If you have any pointers as to things I should be looking at for Rails 4 compat, I'm all ears. So far it was mostly test suite refactoring to get it actually passing the suite, then I did things like making scopes and attr_protected/attr_accessible follow Rails 4's AR conventions. If there's more I should be looking for, please drop it on me!

@cheald

This comment has been minimized.

Show comment Hide comment
@cheald

cheald Jul 6, 2013

Member

Okay, so one other thing we should look at --

AR's #all in Rails 4 returns a query proxy, rather than an array of records. This is trivial to do by just aliasing all to where, but it means that we would have to then coalesce the query into an array for usage. This is another potentially breaking change. Thoughts?

Member

cheald commented Jul 6, 2013

Okay, so one other thing we should look at --

AR's #all in Rails 4 returns a query proxy, rather than an array of records. This is trivial to do by just aliasing all to where, but it means that we would have to then coalesce the query into an array for usage. This is another potentially breaking change. Thoughts?

@steveklabnik

This comment has been minimized.

Show comment Hide comment
@steveklabnik

steveklabnik Jul 7, 2013

Yes, that change is probably the biggest one.

Yes, that change is probably the biggest one.

@leifcr

This comment has been minimized.

Show comment Hide comment
@leifcr

leifcr Aug 20, 2013

Contributor

I have tested a few smaller apps I have running on Rails 3.2 + MM and moved them to @cheald's branch + Rails 4.0. Have yet to see any major issues, but since the apps have very few relations/models and most is manually tested, I cannot say 100% certain that there are no issues.

Although I think that #529 should be merged in a 1.0 / Rails 4.0 release and documented.

Or how about calling it 4.0 ? So it is easy to see that it is related with Rails 4?

Contributor

leifcr commented Aug 20, 2013

I have tested a few smaller apps I have running on Rails 3.2 + MM and moved them to @cheald's branch + Rails 4.0. Have yet to see any major issues, but since the apps have very few relations/models and most is manually tested, I cannot say 100% certain that there are no issues.

Although I think that #529 should be merged in a 1.0 / Rails 4.0 release and documented.

Or how about calling it 4.0 ? So it is easy to see that it is related with Rails 4?

@joeljunstrom

This comment has been minimized.

Show comment Hide comment
@joeljunstrom

joeljunstrom Jan 7, 2014

Contributor

@cheald is there any specific areas regarding the rails 4 that you would like assistance with?

I've been looking through issues etc but can't find any specific stuff regarding what's missing etc. If we could setup a milestone dedicated to it with specific issues etc maybe that would lower the barrier for others to contribute.

Contributor

joeljunstrom commented Jan 7, 2014

@cheald is there any specific areas regarding the rails 4 that you would like assistance with?

I've been looking through issues etc but can't find any specific stuff regarding what's missing etc. If we could setup a milestone dedicated to it with specific issues etc maybe that would lower the barrier for others to contribute.

@cheald

This comment has been minimized.

Show comment Hide comment
@cheald

cheald Jan 7, 2014

Member

The biggest stuff is the AR compatibility. In particular, the change to
finder coalescing in AR 4 should probably be mirrored. I have a rails4
branch on my private fork that implements a lot of the changes already, but
that was the big outlier.

On Tue, Jan 7, 2014 at 2:55 PM, Joel Junström notifications@github.comwrote:

@cheald https://github.com/cheald is there any specific areas regarding
the rails 4 that you would like assistance with?

I've been looking through issues etc but can't find any specific stuff
regarding what's missing etc. If we could setup a milestone dedicated to it
with specific issues etc maybe that would lower the barrier for others to
contribute.


Reply to this email directly or view it on GitHubhttps://github.com/mongomapper/mongomapper/issues/493#issuecomment-31773012
.

Member

cheald commented Jan 7, 2014

The biggest stuff is the AR compatibility. In particular, the change to
finder coalescing in AR 4 should probably be mirrored. I have a rails4
branch on my private fork that implements a lot of the changes already, but
that was the big outlier.

On Tue, Jan 7, 2014 at 2:55 PM, Joel Junström notifications@github.comwrote:

@cheald https://github.com/cheald is there any specific areas regarding
the rails 4 that you would like assistance with?

I've been looking through issues etc but can't find any specific stuff
regarding what's missing etc. If we could setup a milestone dedicated to it
with specific issues etc maybe that would lower the barrier for others to
contribute.


Reply to this email directly or view it on GitHubhttps://github.com/mongomapper/mongomapper/issues/493#issuecomment-31773012
.

@cheald

This comment has been minimized.

Show comment Hide comment
@cheald

cheald Jan 7, 2014

Member

To be clear, the milestone is a great idea. I'll see what I can do there!

Member

cheald commented Jan 7, 2014

To be clear, the milestone is a great idea. I'll see what I can do there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment