activerecord-hackery / squeel

Active Record, improved. Live again :)
http://erniemiller.org/2013/11/17/anyone-interested-in-activerecord-hackery/
MIT License
2.4k stars 214 forks source link

Fix dependency/compatibility broken with latest Ransack #372

Open panyamin opened 9 years ago

oneamtu commented 9 years ago

I'm working on getting the specs to pass with the new polyamorous, PR on the way.

oneamtu commented 9 years ago

It looks like the problem is not that straightforward. No surprises there :)

@jonatack it looks like squeel is not compatible with the current version of polyamorous. I tried using the master version of polyamorous and different specs in squeel are failing. My knowledge of the internals of AR are restricted, so I tried a couple of things to fix it but to no avail. Do you have any insights into this?

Right now it means that if your project uses both squeel and ransack, you can't update ransack to the latest version (because of the polyamorous dependency).

jonatack commented 8 years ago

I'm sorry about that! I just saw this comment :(

For what it's worth, I updated Polyamorous, the polymorphic library that Squeel depends on, for Rails 5.0 today and while doing so, found a potential small regression in polymorphic joins that I mistakenly made last April.

Don't hesitate to try Polyamorous master with Squeel (add gem 'polyamorous', github: 'activerecord-hackery/polyamorous' to your Gemfile next to gem 'squeel') and let me know.

I'll see if I can find some time to look at this. It's true that since I work with Ransack but not Squeel, regressions to Squeel could have occurred while working on Polyamorous even though the Polyamorous test suite was passing. Again, my apologies for causing problems like that.

oneamtu commented 8 years ago

No worries @jonatack, the dependencies here are just complex and it can become a huge time sink to try to deal with all of them. I'm happy to see that ransack and the associated projects are making progress and are in good hands, and sometimes dependencies break and that's unfortunate for the moment, but not that important in the long run as long as the project is healthy.

It sounds like bumping to the newest polyamorous might fix the broken build if anyone wants to give it a shot. I'll add it on my TODO, but it's not high on my priority list I'm afraid.