Skip to content
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

support rails 7.1.0 #382

Merged
merged 4 commits into from Oct 6, 2023
Merged

support rails 7.1.0 #382

merged 4 commits into from Oct 6, 2023

Conversation

seuros
Copy link
Contributor

@seuros seuros commented Sep 17, 2023

This add support to rails 7.1.0

@keithdoggett
Copy link
Member

Thank you for working on this @seuros! @BuonOmo are you going to have a chance to look at this or would you rather I work on it?

@seuros
Copy link
Contributor Author

seuros commented Sep 30, 2023

There are more changes to do. I will open prs in the other repos.

@BuonOmo
Copy link
Member

BuonOmo commented Sep 30, 2023

Just looked at the code now. I am really unsure about adding rails dotenv for all developers. Is it necessary for rails 7.1 dev or is it for your comfort?

I personally use a global dotenv tool that is agnostic to language or project!

A solution could be like they do in rails gemfile: load a gemfile.local if it exists, then you could use this without having this for everyone!

Besides that, I'm curious about what change you are mentioning @seuros and definitely down for other PRs if they're necessary.

@seuros
Copy link
Contributor Author

seuros commented Sep 30, 2023

@BuonOmo the dot env is added to this gem testing, it not a requirement in runtime.

It only activate if you have a .env in the gem folder . (i use it to connect to remote databases by setting PG*)

@BuonOmo
Copy link
Member

BuonOmo commented Sep 30, 2023

Yes I know this gem no worries. I just think that if it is for your own comfort it shouldn't be part of that PR :)

FYI I use https://direnv.net/ to avoid having this per project setting.

@seuros
Copy link
Contributor Author

seuros commented Sep 30, 2023

I will remove it.

I did not want to ship a green pr that was falling in AR behaviors, the new ar has change in the api signature.

Thanks for the direnv. I started using zsh dotenv plugin.

@seuros seuros marked this pull request as ready for review October 1, 2023 13:03
@seuros
Copy link
Contributor Author

seuros commented Oct 1, 2023

@BuonOmo Ready !

.gitignore Outdated Show resolved Hide resolved
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.7.0"

spec.add_dependency "activerecord", "~> 7.0.0"
spec.add_dependency "activerecord", "~> 7.1.beta1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
spec.add_dependency "activerecord", "~> 7.1.beta1"
spec.add_dependency "activerecord", ">= 7.0", "< 7.2"

we still do support AR 7.0.8 don't we? @keithdoggett I don't know how we handled that in the past but it seems to me that we are quite strict, aren't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We bumped major version at every AR major version. It on the readme.

Also API are not compatible fully.

Copy link
Member

@BuonOmo BuonOmo Oct 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things though:

  • this is not a major version
  • shouldn't we care about compatibility for our users ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In rails, that a major version .
7.0 to 7.1 is major since it has breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user api in this adapter is unchanged.

Users can updated it freely and the others small changes were just throwing warnings in ruby 3.2

@BuonOmo
Copy link
Member

BuonOmo commented Oct 1, 2023

Hi @seuros sorry for the abundancy of reviews, but TBH I feel like the PR could be way simpler, focusing on the actual goal of supporting the 7.1... These other changes are making it quite confusing to me.

Anyway, I think we shouldn't be so far from merging. Although I'd love your opinion @keithdoggett as you have done these kind of changes in the past!

@keithdoggett
Copy link
Member

Thanks for the review @BuonOmo! Even though this is a minor version bump in Rails/ActiveRecord since it introduces breaking changes to the internals we need to have a separate major version of this gem to support it. I can't remember the last time we were able to support a minor bump in rails with just a minor bump in this gem (it may predate my time maintaining it), but it's been a while.

@seuros I need to create a few other branches for old version but will be able to merge this soon. Thanks for all the work on this!

@BuonOmo
Copy link
Member

BuonOmo commented Oct 5, 2023

Gotcha, thanks for the explanation. Shouldn't we wait for the stable 7.1 then ? Or name ours 9.0.0.beta (or rc2 as the rails rc2 is out). Just to be sure we won't need another major for that !

@seuros
Copy link
Contributor Author

seuros commented Oct 5, 2023

7.1 is out today. It works.

@keithdoggett
Copy link
Member

@BuonOmo if it's ok with you I'll merge this and get ready for 9.0. I released 8.0.3 earlier that incorporates the changes from #383.

@BuonOmo
Copy link
Member

BuonOmo commented Oct 5, 2023

Don't you want to merge it with the latest AR release candidate? Otherwise lgtm

@seuros seuros changed the title support rails 7.1.beta1 support rails 7.1.0 Oct 6, 2023
@keithdoggett keithdoggett merged commit 8fb63ee into rgeo:master Oct 6, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants