cable_ready icon indicating copy to clipboard operation
cable_ready copied to clipboard

ActiveRecord dependency breaks rspec on non AR Rails implementations

Open javierg opened this issue 2 years ago • 4 comments

I have an app running with StimulusReflex ~4.x~ 3.4 fine, this app have no AR whatsoever, as we use other DB which AR do not support. The migration to 5.0pre is making RSpec tests crash because AR is being required for the new identifiable feature.

I think this only happens with RSpec on test environment, as when setting eager load to true in my dev env the app works fine.

Thanks for the awesome work!

javierg avatar May 26 '22 15:05 javierg

Hi, thanks for reporting.

Can you please fill in that x so we know what version of SR we're talking about?

It's fair to say that 100% of SR users are using 3.x. 😉

leastbad avatar May 26 '22 17:05 leastbad

Thanks for the reply, yeah there is atypo in the version number sorry about that:

The versions are:

StimulusReflex: v3.5.0.pre9 Cable Ready: 5.0.0pre9

I am testing upgrading because it was the only way to make SR work with esbuild and newer rails versions.

javierg avatar May 26 '22 19:05 javierg

Hey Javier, I almost replied that I thought that this issue had been fixed on master, but I realize now that @marcoroth has a branch that seems to address this but hasn't been merged.

https://github.com/stimulusreflex/cable_ready/tree/dependency-cleanup

Marco, what's the scoop on this branch?

leastbad avatar May 26 '22 21:05 leastbad

That somehow got lost. I will bring it in a mergable state and then open a PR.

marcoroth avatar May 28 '22 04:05 marcoroth

@marcoroth Any update on this one? Thanks

javierg avatar Oct 21 '22 00:10 javierg

I took the changes that @marcoroth made and stuck them into a PR in the hopes of getting this resolved quickly.

There's two open questions on the PR readme and also standardrb is currently failing in a weird way I don't fully grok. If you have any idea what's up there, please lmk!

leastbad avatar Oct 21 '22 04:10 leastbad