Skip to content

Test against released Rails #224

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

Merged
merged 4 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
gemfile:
- Gemfile
- gemfiles/Gemfile-rails-main
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the same naming as in tapioca.

ruby: ["3.0", "3.1", "3.2", "3.3", "head"]
include:
- ruby: "head"
experimental: true
- gemfile: "gemfiles/Gemfile-rails-main"
experimental: true
exclude:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To avoid the headache of Bundler platform changes.

- os: "windows-latest"
ruby: "3.0"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ !!matrix.experimental }}
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }} with ${{matrix.gemfile}}
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ gem "rdoc", require: false
gem "sorbet-static-and-runtime", platforms: :ruby
gem "tapioca", "~> 0.11", require: false, platforms: :ruby
gem "psych", "~> 5.1", require: false
gem "rails", github: "rails/rails", branch: "main"
gem "rails"
gem "tzinfo-data", platforms: :windows
171 changes: 83 additions & 88 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,120 +1,93 @@
GIT
remote: https://github.com/rails/rails.git
revision: 757f4896417f86b58303e416f4040a2b434abdd6
branch: main
PATH
remote: .
specs:
ruby-lsp-rails (0.2.8)
actionpack (>= 6.0)
activerecord (>= 6.0)
railties (>= 6.0)
ruby-lsp (>= 0.13.0, < 0.14.0)
sorbet-runtime (>= 0.5.9897)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.0.alpha)
actionpack (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
actioncable (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.0.alpha)
actionpack (= 7.2.0.alpha)
activejob (= 7.2.0.alpha)
activerecord (= 7.2.0.alpha)
activestorage (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
actionmailbox (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.2.0.alpha)
actionpack (= 7.2.0.alpha)
actionview (= 7.2.0.alpha)
activejob (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
actionmailer (7.1.2)
actionpack (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activesupport (= 7.1.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.2.0.alpha)
actionview (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
actionpack (7.1.2)
actionview (= 7.1.2)
activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.2.0.alpha)
actionpack (= 7.2.0.alpha)
activerecord (= 7.2.0.alpha)
activestorage (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
actiontext (7.1.2)
actionpack (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.0.alpha)
activesupport (= 7.2.0.alpha)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.0.alpha)
activesupport (= 7.2.0.alpha)
activejob (7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.3.6)
activemodel (7.2.0.alpha)
activesupport (= 7.2.0.alpha)
activerecord (7.2.0.alpha)
activemodel (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
activemodel (7.1.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
timeout (>= 0.4.0)
activestorage (7.2.0.alpha)
actionpack (= 7.2.0.alpha)
activejob (= 7.2.0.alpha)
activerecord (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
activestorage (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activesupport (= 7.1.2)
marcel (~> 1.0)
activesupport (7.2.0.alpha)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0, >= 2.0.5)
rails (7.2.0.alpha)
actioncable (= 7.2.0.alpha)
actionmailbox (= 7.2.0.alpha)
actionmailer (= 7.2.0.alpha)
actionpack (= 7.2.0.alpha)
actiontext (= 7.2.0.alpha)
actionview (= 7.2.0.alpha)
activejob (= 7.2.0.alpha)
activemodel (= 7.2.0.alpha)
activerecord (= 7.2.0.alpha)
activestorage (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
bundler (>= 1.15.0)
railties (= 7.2.0.alpha)
railties (7.2.0.alpha)
actionpack (= 7.2.0.alpha)
activesupport (= 7.2.0.alpha)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)

PATH
remote: .
specs:
ruby-lsp-rails (0.2.8)
actionpack (>= 6.0)
activerecord (>= 6.0)
railties (>= 6.0)
ruby-lsp (>= 0.13.0, < 0.14.0)
sorbet-runtime (>= 0.5.9897)

GEM
remote: https://rubygems.org/
specs:
mutex_m
tzinfo (~> 2.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.4)
bigdecimal (3.1.5)
builder (3.2.4)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
Expand All @@ -131,12 +104,12 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.7.1)
irb (1.11.0)
irb (1.11.1)
rdoc
reline (>= 0.3.8)
reline (>= 0.4.2)
json (2.7.1)
language_server-protocol (3.17.0.3)
loofah (2.21.4)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -149,17 +122,18 @@ GEM
minitest (5.20.0)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
net-imap (0.4.5)
mutex_m (0.2.0)
net-imap (0.4.9.1)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0)
net-smtp (0.4.0.1)
net-protocol
netrc (0.11.0)
nio4r (2.5.9)
nio4r (2.7.0)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.0-x64-mingw-ucrt)
Expand Down Expand Up @@ -187,13 +161,35 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.2)
actioncable (= 7.1.2)
actionmailbox (= 7.1.2)
actionmailer (= 7.1.2)
actionpack (= 7.1.2)
actiontext (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activemodel (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
bundler (>= 1.15.0)
railties (= 7.1.2)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.1.0)
rbi (0.1.6)
Expand All @@ -202,7 +198,7 @@ GEM
rdoc (6.6.2)
psych (>= 4.0.0)
regexp_parser (2.8.3)
reline (0.4.1)
reline (0.4.2)
io-console (~> 0.5)
rexml (3.2.6)
rubocop (1.59.0)
Expand Down Expand Up @@ -281,7 +277,6 @@ GEM

PLATFORMS
arm64-darwin
x64-mingw32
x64-mingw-ucrt
x86_64-darwin
x86_64-linux
Expand All @@ -291,7 +286,7 @@ DEPENDENCIES
mocha
psych (~> 5.1)
puma
rails!
rails
rdoc
rubocop-minitest (~> 0.34.3)
rubocop-rake (~> 0.6.0)
Expand Down
22 changes: 22 additions & 0 deletions gemfiles/Gemfile-rails-main
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

source "https://rubygems.org"
Copy link
Member

Choose a reason for hiding this comment

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

Would it work if we used eval_gemfile to keep this one in sync with the top level? Or does it complain about rails appearing twice?

eval_gemfile("../Gemfile")
gem "rails", github: "rails/rails", branch: "main"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's complains:

There was an error parsing `Gemfile-rails-main`: You cannot specify the same gem twice coming from different sources.

but we could extract out the commonality, and call eval_gemfile from each?

(@Morriar do you have some approach for keeping these in sync on Tapioca?)

Copy link
Member

Choose a reason for hiding this comment

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

In that case, I think it should probably be fine. We can always re-evaluate if it becomes difficult to maintain.

Another option would be using an environment variable to decide only the rails dependency.

if ENV["USE_RAILS_MAIN"]
  gem "rails", github: "rails/rails", branch: "main"
else
  gem "rails"
end

git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Specify your gem's dependencies in ruby_lsp_rails.gemspec.
gemspec

gem "puma"
gem "sqlite3"
gem "debug", ">= 1.7.0"
gem "mocha"
gem "rubocop-shopify", "~> 2.14", require: false
gem "rubocop-minitest", "~> 0.34.3", require: false
gem "rubocop-rake", "~> 0.6.0", require: false
gem "rubocop-sorbet", "~> 0.7", require: false
gem "rdoc", require: false
gem "sorbet-static-and-runtime", platforms: :ruby
gem "tapioca", "~> 0.11", require: false, platforms: :ruby
gem "psych", "~> 5.1", require: false
gem "rails", github: "rails/rails", branch: "main"
gem "tzinfo-data", platforms: :windows
Loading