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

Fix typecheck CI job #2773

Closed
wants to merge 3 commits into from
Closed

Fix typecheck CI job #2773

wants to merge 3 commits into from

Conversation

eregon
Copy link
Member

@eregon eregon commented May 5, 2024

  • Update typecheck/Gemfile.lock to use the Bundler shipped with Ruby 3.3.1.

Previous failure: https://github.com/ruby/prism/actions/runs/8943853950/job/24569472569
which I guess it the reason for 926c2bc

* Update typecheck/Gemfile.lock to use the Bundler shipped with Ruby 3.3.1.
@eregon eregon force-pushed the ci-fix-typecheck branch from 0d1a5ee to 9296ccb Compare May 5, 2024 09:56
@eregon
Copy link
Member Author

eregon commented May 5, 2024

Mmh https://github.com/ruby/prism/actions/runs/8957377538/job/24600406961?pr=2773 still gives:

/opt/hostedtoolcache/Ruby/3.3.1/x64/bin/bundle install --jobs 4
Your lockfile does not satisfy dependencies of "rbi", but the lockfile can't be
updated because frozen mode is set

And looking at the Gemfile lock there is:

specs:
prism (0.28.0)

rbi (0.1.12)
prism (>= 0.18.0, < 0.28)

I wonder where that constraint comes from.

@eregon
Copy link
Member Author

eregon commented May 5, 2024

Removing the Gemfile.lock allows it to get to the next step:
https://github.com/ruby/prism/actions/runs/8957414293/job/24600490815?pr=2773

* Otherwise:
rake aborted!
TypeError: superclass mismatch for class Prism::ParseResult (Prism::Result is given but was Object) (TypeError)

        kernel_class.send(:no_warning_require, name)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
/home/runner/work/prism/prism/lib/prism.rb:82:in `<top (required)>'
/home/runner/work/prism/prism/vendor/bundle/ruby/3.3.0/gems/spoom-1.3.2/lib/spoom/deadcode.rb:5:in `<top (required)>'
/home/runner/work/prism/prism/vendor/bundle/ruby/3.3.0/gems/spoom-1.3.2/lib/spoom.rb:18:in `<top (required)>'
/home/runner/work/prism/prism/vendor/bundle/ruby/3.3.0/gems/tapioca-0.13.3/lib/tapioca/internal.rb:22:in `<top (required)>'
/home/runner/work/prism/prism/rakelib/typecheck.rake:19:in `block (2 levels) in <top (required)>'
/home/runner/work/prism/prism/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/opt/hostedtoolcache/Ruby/3.3.1/x64/bin/bundle:25:in `load'
/opt/hostedtoolcache/Ruby/3.3.1/x64/bin/bundle:25:in `<main>'
Tasks: TOP => typecheck:tapioca
@eregon
Copy link
Member Author

eregon commented May 5, 2024

Shopify/rbi#298 / Shopify/rbi#297 / Shopify/rbi#266 might solve that constraint issue.

@eregon
Copy link
Member Author

eregon commented May 5, 2024

It passed now: https://github.com/ruby/prism/actions/runs/8957490030/job/24600645943?pr=2773
So I think this is worth merging.

@eregon eregon requested a review from kddnewton May 5, 2024 10:21
@kddnewton
Copy link
Collaborator

I'm waiting on a new release of RBI, which is used by spoom, which is used by tapioca, which uses prism. I don't want to delete the Gemfile.lock because I'm trying to use the latest versions of these things because we rely on it internally in Shopify. I'll ping the team again today, hopefully this should be done soon.

@eregon
Copy link
Member Author

eregon commented May 6, 2024

I don't want to delete the Gemfile.lock because I'm trying to use the latest versions of these things because we rely on it internally in Shopify.

Doesn't deleting the Gemfile.lock actually ensures the latest versions are used?

@eregon
Copy link
Member Author

eregon commented May 6, 2024

Given the change in rakelib/typecheck.rake I wonder if the Prism from the repo was actually used with the checked-in Gemfile.lock, or maybe some other version was used (maybe the default gem since this runs on 3.3?).
In my local Gemfile.lock I have:

PATH
  remote: ../..
  specs:
    prism (0.28.0)
...
    rbi (0.1.12)
      prism (>= 0.18.0, < 0.28)

Which is kind of fun that Bundler/RubyGems doesn't complain about it.

@kddnewton
Copy link
Collaborator

They've relaxed the version requirements on these things now, which is nice. There's still an RBI failure, but I'm re-enabling the other checks in CI.

@kddnewton kddnewton closed this May 10, 2024
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.

2 participants