-
Notifications
You must be signed in to change notification settings - Fork 49
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
Remove activerecord from runtime dependencies #64
Remove activerecord from runtime dependencies #64
Conversation
e4f24cf
to
258277b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments from me here. Nice work!
Oh and in response to your last comments above:
Okay, that's fine. I'll look more closely at what you did to see if there's another way.
That's fine with me.
Yes, I tried to get Actions working when I first set up CI, but was unsuccessful. There's something about the cache action that didn't seem to be working for me, I don't know if it's a bug or what. I also don't know (or remember at the moment) how concurrency works with Actions. I've used Travis for previous projects and the matrix there makes sense to me. That said, I wouldn't mind getting Actions working eventually. There'd be one fewer place to look. |
@mcmire GH actions now have matrix too, it's basically the same as it was on Travis. Here's a sample working config https://github.com/dry-rb/dry-types/blob/master/.github/workflows/ci.yml |
This removes activerecord from runtime dependencies and runs tests in an AR-free environment to make sure activesupport doesn't interfere with the gem (I removed one `.blank?` usage along the way). Side note: ruby 2.7 changed the meaning of `.object_id`, it's not related to memory address anymore. Since I locally tested on 2.7, I added a hacky helper to get an object address on the newest ruby version.
258277b
to
190aa37
Compare
@mcmire I addressed your comments |
@flash-gordon Thanks so much! |
v0.4.0 is now out with this change! |
Awesome! 🎉 |
This seems to have broken our build.
Do we need to change some of the setup code? |
@Mange to me it's unlikely changes in this PR are related. However, I think |
#65 this is related |
Thanks. I opened #68 to track this issue. |
Hey @mcmire!
It took a while but I came back.
This PR removes activerecord from runtime dependencies and runs tests in an AR-free environment to make sure activesupport doesn't interfere with the gem (I removed one
.blank?
usage along the way).I didn't move code, just tagged specs and added a filter. I think you know better if tests require re-organization.
Side note: ruby 2.7 changed the meaning of
.object_id
, it's not related to memory address anymore. Since I locally tested on 2.7, I added a hacky helper to get an object address on the newest ruby version. Read https://bugs.ruby-lang.org/issues/15408 and https://bugs.ruby-lang.org/issues/15626#Object-ID for details. There's still one more usage ofobject_id
in the sources, you probably want to update it too. My nasty approach works for testing, but for gem's code it can be less desirable.I didn't add 2.7 to the matrix, I think it should be done separately. Did you think about migrating to GH actions btw?