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

Ruby 3.0 syntax introduced from v2.0.8 while gem still claims to support Ruby 2.6.0 #681

Closed
dentarg opened this issue Sep 18, 2024 · 6 comments · Fixed by #682
Closed

Ruby 3.0 syntax introduced from v2.0.8 while gem still claims to support Ruby 2.6.0 #681

dentarg opened this issue Sep 18, 2024 · 6 comments · Fixed by #682

Comments

@dentarg
Copy link
Contributor

dentarg commented Sep 18, 2024

Happened with 5038ed8#diff-45934cb0c9b4dc0fdd1aa4e780742e07541f16cb60835e1b1330a56d1b0f18f1R9

s.required_ruby_version = ">= 2.6.0"

$ chruby-exec 2.7 -- ruby -v -e 'def foo() = (@bar)'
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin21]
-e:1: syntax error, unexpected '='
def foo() = (@bar)
-e:1: syntax error, unexpected end-of-input, expecting `end'

$ chruby-exec 3.0.7 -- ruby -v -e 'def foo() = (@bar)'
ruby 3.0.7p220 (2024-04-23 revision 724a071175) [arm64-darwin21]
@dentarg
Copy link
Contributor Author

dentarg commented Sep 18, 2024

What is the intention, bump required_ruby_version? Or was this an accident?

@dhh
Copy link
Member

dhh commented Sep 18, 2024

We should bump that minimum version, but also, it shouldn't have happened in a tiny version increment. That was a mistake. cc @seanpdoyle

@seanpdoyle
Copy link
Contributor

This is a test-only change, and can be converted harm-free.

If 2.6 is the target version, we must add 2.6 and 2.7 to the CI matrix. That can be undone in a follow up release.

seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 18, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 19, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Sep 19, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
@seanpdoyle
Copy link
Contributor

seanpdoyle commented Sep 19, 2024

While 5038ed8#diff-45934cb0c9b4dc0fdd1aa4e780742e07541f16cb60835e1b1330a56d1b0f18f1R9 is a commit that adds newer 3.0 and 3.1 syntax, reverting those changes alone is not sufficient for executing the test suite for [email protected] and [email protected] in CI.

There are a variety of gem version incompatibilities and other syntactical incompatibilities. The gem has not been [email protected] compatible for some time, and there are likely numerous patch and minor versions released since that time.

Cutting a release to solidify working support for 2.6 would be complicated (evidenced by the #682 CI failures). The only version of rails that [email protected] is bundle-compatible with is [email protected], and that test suite has an importmap-rails compatibility issue. Furthermore, there are several methods throughout the gem that rely on **options merging, and reverting those implementations to use options = {} isn't a mechanical one-to-one replacement.

I think the best course of action is to admit defeat and cut a release that drops support for 2.6 (and maybe even 2.7 and 3.0, since those versions are EOL).

@dhh
Copy link
Member

dhh commented Sep 19, 2024

We should probably just cut a major version then that raises the floor to Ruby 3.1, to match Rails 8.

dentarg added a commit to puma/puma that referenced this issue Sep 19, 2024
mshibuya added a commit to railsadminteam/rails_admin that referenced this issue Oct 6, 2024
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Oct 30, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Oct 30, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Oct 30, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Oct 30, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Oct 30, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
seanpdoyle added a commit to seanpdoyle/turbo-rails that referenced this issue Oct 30, 2024
Closes [hotwired#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[hotwired#681]: hotwired#681
@seanpdoyle
Copy link
Contributor

#682 now has a passing CI. I've opened #698 as a follow-up to drop support once #682 is merged.

jorgemanrubia pushed a commit that referenced this issue Nov 4, 2024
Closes [#681][]

First, remove `[email protected]` syntax including `...` arguments and end-less
method definitions.

Next, add `[email protected]` and `[email protected]` to the CI matrix along with
`[email protected]`.

[#681]: #681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants