Rubocop: Upgrading 0.64.0 to 0.65.0 causes 'TypeError: superclass mismatch for class Mark'

Created on 20 Feb 2019  Â·  11Comments  Â·  Source: rubocop-hq/rubocop

Seems to be related to psych – please see https://github.com/ruby/psych/issues/386 for details.

Most helpful comment

We're having a similar issue. We are using Ruby 2.3.7 currently and Psych 3.1.0 conflicts on Ruby load. We can't fix it by adding it to our Gemfile.

I'm going to advise to work around this for now.

gem 'rubocop', '<= 0.64.0'`

Psych is tightly integrated to Ruby core, so it is dangerous for Rubocop to spec it without a higher ruby version requirement.

Note:

  • Ruby 2.6.1 depends on psych 3.1.0
  • Ruby 2.6.0 made the switch to psych 3.1.0
  • Ruby 2.5.0 made the switch to psych 3.0.0
  • Ruby 2.3.7 depends on psych 2.1.0.1

All 11 comments

Hi, @henrik!

Good to see that you’re staying on top of dependency updates. 🙂

We’ve seen some other problems with Psych on Windows and Ruby 2.6. (https://github.com/ruby/psych/issues/385) What platform and Ruby version are you on?

Hi; thanks :)

This is Ruby 2.5.3 and I believe the VMs in CircleCI run on some Linux distro. Let me know if you want the exact one!

@henrik Facing the same problem. Have you had any luck finding a solution?

Hey. Nupe, haven’t done much sleuthing I’m afraid, just locked down Rubocop to an earlier version for now.

Best,
Henrik
On 4 Mar 2019, 18:15 +0000, Jatkins1995 notifications@github.com, wrote:

@henrik Facing the same problem. Have you had any luck finding a solution?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Same issue here. Using ruby 2.5.3, ubuntu 18.04. I've locked Rubocop to 0.64.0 to workaround the issue for now.

@Jatkins1995, @hirowatari Are you both experiencing this problem in CircleCI? Or in your local environment? I have no problem in neither. 😞

@Drenmi No I'm not using CircleCI. I'm using a local development environment.

We also have this issue on our CI. Ruby 2.5.3. It is a docker container based on Ruby which builds on Debian Stretch. I think it is because of this change: https://github.com/rubocop-hq/rubocop/pull/6766/files#diff-458bc38d82061cdac508dfb1be2b918bR41

Is adding psych as a runtime dependency necessary?

We're having a similar issue. We are using Ruby 2.3.7 currently and Psych 3.1.0 conflicts on Ruby load. We can't fix it by adding it to our Gemfile.

I'm going to advise to work around this for now.

gem 'rubocop', '<= 0.64.0'`

Psych is tightly integrated to Ruby core, so it is dangerous for Rubocop to spec it without a higher ruby version requirement.

Note:

  • Ruby 2.6.1 depends on psych 3.1.0
  • Ruby 2.6.0 made the switch to psych 3.1.0
  • Ruby 2.5.0 made the switch to psych 3.0.0
  • Ruby 2.3.7 depends on psych 2.1.0.1

Thanks for fixing this!

Is somebody tracking this issue? This is also causing us some headaches using jruby because now it pulls in a maven environment to be able to install psych from source.

Until this gets reverted to use the psych version packaged in the standard lib we cannot update rubocop any longer which is a shame.

~If needed I can open a PR which reverts the relevant bits from https://github.com/rubocop-hq/rubocop/pull/6766~ just created a PR

Was this page helpful?
0 / 5 - 0 ratings