Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

rails 5 support #412

Open
kylekermgard opened this issue Jan 28, 2016 · 18 comments
Open

rails 5 support #412

kylekermgard opened this issue Jan 28, 2016 · 18 comments

Comments

@kylekermgard
Copy link

Rails 5 will be coming out soon, is there any plan to support this?

@mckinnsb
Copy link

Hopefully, I'd be glad to help out to get that to happen.

@ernie
Copy link
Contributor

ernie commented Feb 26, 2016

I have no plans to update the gem, but that's not news. I leave it in the hands of @bigxiang.

@bmulholland
Copy link

@bigxiang appears to be inactive for the last year :(. I'll take a stab at this myself, I guess.

@ernie
Copy link
Contributor

ernie commented Mar 11, 2016

Deep integration with ActiveRecord has broken better men and women than me. Godspeed and good luck, @bmulholland.

@bmulholland
Copy link

@ernie :| Thanks!

@mckinnsb If you want to help out, I'm slowly chipping away in https://github.com/bmulholland/squeel on the master branch

@bigxiang
Copy link
Contributor

@ernie @bmulholland , I'm sorry that I'm not active recently. I also really want to update it, I know there are many issues in it. But Rails 5 changes a lot of things, I still have not enough time to go through it. If you can provide some helps, that would be appreciated!

@bmulholland
Copy link

@bigxiang Not at all :). If you've got some time, feel free to chip away on my fork. I'm basically just running the tests and fixing error one-by-one, so any help is appreciated and it's not a big time commitment.

@rzane
Copy link

rzane commented Mar 16, 2016

I just started working on a library similar to squeel. It doesn't have feature parity yet, but I'm working on that. It's fully compatible with Rails 5, but I haven't gotten to use it in the real world yet.

https://github.com/rzane/baby_squeel

@gamov
Copy link

gamov commented Mar 16, 2016

@rzane That sounds like an excellent idea! I'll keep a look.

@mckinnsb
Copy link

@bmuholland I'll give it a look when I get a chance. Definitely interested
in helping out.

On Wed, Mar 16, 2016 at 1:04 AM, gamov notifications@github.com wrote:

@rzane https://github.com/rzane That sounds like an excellent idea!
I'll keep a look.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#412 (comment)

@rzane
Copy link

rzane commented May 25, 2016

Just wanted to give an update. Baby Squeel should have feature parity with Squeel, aside from a few minor features:

  • No hash-like syntax (ex. Person.where{{name => 'Joe Blow'}}). Instead, just use Person.where { name == 'Joe Blow' }
  • No backticks for sql literals. Instead, Baby Squeel has a #sql method.
  • No core exts (nor are there any monkey patches at all, aside from adding new methods to ActiveRecord::Relation).

It supports both AR 4 and 5.

@gamov
Copy link

gamov commented May 25, 2016

@rzane Do you confirm that Baby Squeel doesn't interfere in any way with AR unless you don't invoke it via its call methods?

@ernie
Copy link
Contributor

ernie commented May 25, 2016

@gamov looking at the sample queries I'm gonna guess it just monkey-patches the (ill-advised) WhereChain class to add has.

Back when I built Squeel, the intent (as had been indicated by a core team member) was to roll a popular query gem into Rails core. This is why Squeel was implemented as it was. I'm not terribly keen on you using my project's name in yours and then deriding it as "evil", @rzane. I put years of work into building its predecessor, refactoring it to remove the monkeypatches I could and introduce the DSL, and maintain compatibility with ActiveRecord across multiple versions.

Maybe I am being a bit sensitive, but if you knew the months of actual effort that building and maintaining this project took me, you might understand why things like this only reinforce my decision to step away from these libraries. :/

@rzane
Copy link

rzane commented May 25, 2016

@ernie, I'm really, really sorry. I didn't mean to insult you or this incredible project in any way. The inclusion of Squeel in the name was an effort to pay homage to all of the work you've done.

Regarding the usage of the term evil, it's no secret that squeel does some categorically evil things in order to provide it's query interface. There's even a method called Squeel.evil_things. There are multiple comments that describe evil functionality, which, by the way, I laughed out loud while reading them and learning from what you've done on this project.

So again, I'm really sorry. I would sincerely appreciate any of your help/review on the project. I am also happy to change the name of the project if you would prefer.

@gamov
Copy link

gamov commented May 26, 2016

@ernie Was the reason not to include Squeel in Rails ever stated by Rails core?
I still believe a library like Squeel would unleash the power of arel and really bring Active Record to the next level. What a pity!

@mnoack
Copy link

mnoack commented Jul 13, 2016

@ernie and others. We're now upgrading to rails 5 like others here.

Firstly thanks for squeel, it's been a great tool for our team for years.

If this gem isn't planning on being maintained and it seems like @bmulholland hasn't committed for 4 months (like this projects), then this project is effectively dead.

Would it be a positive move to give @rzane access to this project and gem so he can either direct people to his gem in the README or project or even let him release his gem under the name 'squeel' so the upgrade path for people is easier? Effectively he is continuing this gem unofficially and people like us are now planning on moving to his gem as part of our rails 5 upgrade.

Thanks again for your work with squeel.

@ernie
Copy link
Contributor

ernie commented Jul 13, 2016

@mnoack I'm happy (depending on the current maintainers' feelings) to place a reference to @rzane's project, if other maintainers don't wish to continue to maintain it.

As for me, I fairly publicly stepped away from these projects a while back: https://ernie.io/2013/11/17/anyone-interested-in-activerecord-hackery/

@prusswan
Copy link

The root cause is still the design of Rails and ActiveRecord that prevents.. a more natural way to extend its behavior without trying too hard to fight Rails. Has the situation improved since the problems with WhereChain?

Schwad added a commit to Schwad/squeel that referenced this issue Apr 26, 2018
…er or migration option.

Ernie mentioned in mid 2016 that he was happy to put a reference to baby_squeel in the project if the maintainers were no longer willing to maintain this project activerecord-hackery#412. It's been three years and no new commits. I think this will be helpful to invite more maintainers as well as give information for those upgrading past 4.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants