Skip to content

simplecov triggers load error when running coverage on jruby-9.0.0.0.pre1 #2587

@bigsur0

Description

@bigsur0

Originally filed under: simplecov-ruby/simplecov#368

The call to Coverage.start on line 31 triggers the load error below by way of SimpleCov.start {}

 25     def start(profile=nil, &block)
 26       if SimpleCov.usable?
 27         load_profile(profile) if profile
 28         configure(&block) if block_given?
 29         @result = nil
 30         self.running = true
 31         Coverage.start
 32       else
 33         warn "WARNING: SimpleCov is activated, but you're not running Ruby 1.9+ - no coverage analysis will happen"
 34         warn "Starting with SimpleCov 1.0.0, even no-op compatibility with Ruby <= 1.8 will be entirely dropped."
 35         false
 36       end
 37     end
$ rspec
LoadError: load error: spec_helper -- java.lang.LinkageError: loader constraint violation: loader (instance of org/jruby/util/JRubyClassLoader) previously initiated loading for a different type with name "org/jruby/ext/coverage/CoverageData"
                      require at org/jruby/RubyKernel.java:954

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions