Skip to content

[FSSDK-11723] fix: rubocop failing on ruby 3.0.0 #371

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

Conversation

FarhanAnjum-opti
Copy link
Contributor

Summary

Running rubocop via Bundler is currently failing due to a version conflict between the tsort gem and Ruby 3.0.0.

Test plan

The existing unit tests has to pass.

Issues

FSSDK-11723

@FarhanAnjum-opti FarhanAnjum-opti force-pushed the farhan-anjum/FSSDK-11723-fix-rubocop-failure-on-ruby-3.0.0 branch from 81b951a to bfd609b Compare July 29, 2025 18:38
Copy link
Contributor

@Mat001 Mat001 left a comment

Choose a reason for hiding this comment

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

Approved.

Adding comment:
We downgraded Rubocop to a version compatible with Ruby 3.0.0 to avoid runtime errors caused by newer Rubocop releases requiring tsort version 0.2.0, which is not available in Ruby 3.0.0’s bundled standard library. This ensures stable linting support and maintains guaranteed correctness for Ruby 3.0.0 users.

The reason we cannot pin tsort in our Gemfile is that tsort is a default (standard library) gem whose version is tightly coupled to the Ruby version installed and cannot be independently upgraded or overridden by Bundler. Unlike external gems (such as Rubocop), standard gems like tsort come fixed with Ruby itself, so managing their version means managing the Ruby version.

Therefore, the only viable solution to resolve conflicts involving tsort is to downgrade Rubocop to a version that is compatible with the tsort version bundled in Ruby 3.0.0, rather than trying to pin or upgrade tsort itself.

@FarhanAnjum-opti FarhanAnjum-opti merged commit a3e6b06 into master Jul 29, 2025
10 checks passed
@FarhanAnjum-opti FarhanAnjum-opti deleted the farhan-anjum/FSSDK-11723-fix-rubocop-failure-on-ruby-3.0.0 branch July 29, 2025 19:18
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