-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Compatibility of Rails 5 API-only mode and AMS 0.9x #1923
Comments
It's undesirable, but not entirely unexpected. This is a symptom of development efforts shifting to 0.10.x and support for 0.9.x being reduced and deprecated. Problems like these will become more frequent as 0.9 ages. I'd recommend migrating to 0.10.x and would be interested to hear why you're currently unable to do so. |
@remear Thanks for the response! While I totally understand not wanting to invest more on the 0.9x and 0.8x versions, I am hoping that atleast having them compatible with Rails-5 would be worth the effort and fits under 'reduced support'. For our case, I'd love to upgrade to 0.10x but #1845 is a blocker which I know @bf4 is mulling over and working on. (In general, and please correct me if I'm wrong, 0.10x doesn't have the same feature compatibility with 0.8/0.9 especially in terms of supporting Rails |
Even fixing all known issues with 0.9 and Rails 5 would bring an increased support burden because issues will continue to come up. The expectation would then become that AMS support 0.9.x on Rails 5.x. Support has to end at some point. I know that's a bummer. With that being said, if this is the only issue to get 0.9 working with Rails 5, we could probably consider a PR that fixes the issue. I think it unlikely any of the team will have time to focus on this or any other non-0.10 issue. Therefore, someone still on 0.9 experiencing this issue would need to do the research and propose a PR with the fix. Is that something that interests you? |
@remear I'd be happy to give it a shot if I can get some guidance on the right direction. Given that you all have a plethora of knowledge, if you can help point me to the right direction, I can report back with the PR/steps/solution.
I hear you. Maybe putting a big disclaimer on the README? :) I just think that the AMS change is the hardest on those on 0.9x and this disconnects upgrading AMS from upgrading Rails. But also it is easier for me to say, since you guys end up maintaining the library. |
Great, thanks for your willingness to contribute! I suspect a good place to start would be comparing the differences between the generators: 0.9 - https://github.com/rails-api/active_model_serializers/tree/0-9-stable/lib/active_model/serializer/generators It could be something like https://github.com/rails-api/active_model_serializers/blob/0-9-stable/lib/active_model/serializer/generators/serializer/scaffold_controller_generator.rb is no longer necessary. |
@remear Sorry for the long silence, I have been wanting to come back to this whenever I had a moment. Anyways, an update:
Not sure if that is helpful, but thought I'd post it here incase anyone else who is in the Rails 5 + AMS 0.9 predicament comes to this issue. I'll keep digging but it seems challenging never having been exposed to the internals of rail generators before. Any tips on other possible problems - if the test suite result was helpful? Thanks! |
@remear Any thoughts based on the update in the previous comment? |
@oyeanuj Do you have your AMS changes pushed to a fork and branch somewhere myself and others could check out? |
Hi @remear! Apologies for the delay, for some reason, I didn't see the notification. Only saw this message checking in today. I've published a test project, AMS fork with a few of the more relevant changes and given you collaborator access as well.
Please keep me posted, I'll remember to check this everyday now and not rely on notifications! Thank you! |
@remear Just checking in to see if you've had a chance to look over the above links? Thank you! |
@remear I know you are probably busy but in case you have a few minutes to look at the above links. Would appreciate any help here! Thank you! |
Hi folks, I was trying to upgrade my current project to Rails 5, API-only mode while continuing to use AMS 0.9 (due to pending #1845 being blocker for us) and ran into the following issue which goes away on upgrading to 0.10x (which unfortunately, I can't do for my project).
While generating scaffolds with a Rails 5 API project, the project complains about
api_controller.rb
:Is this expected behavior and is there any workaround for this? Are there any other issues that I should expect to encounter in this process? I'd love to be a part of the Rails 5 party :)
The only issue related to Rails 5 and AMS 0.9 that I found was #600, but that is slightly unconnected to this one (and I've added their fix for the other problem).
Thank you!
The text was updated successfully, but these errors were encountered: