[
https://issues.apache.org/jira/browse/BUILDR-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14568094#comment-14568094
]
r6p edited comment on BUILDR-705 at 6/1/15 10:00 PM:
-----------------------------------------------------
This doesn't work completely.
NameError: uninitialized constant RSpec
const_missing at org/jruby/RubyModule.java:2726
const_missing at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/rspec-core-3.2.3/lib/rspec/core/formatters/base_formatter.rb:1
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr/java/test_result.rb:1
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr/java/test_result.rb:19
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr.rb:1
load at org/jruby/RubyKernel.java:1087
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr.rb:81
eval at org/jruby/RubyKernel.java:1107
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/bin/buildr:1
The code below is being triggered, but causes a failure because rspec hasn't
been loaded prior. This happens when there is a version of rspec in the gem
home/gem path that is to be used outside of buildr. But buildr gets tripped-up
on it's presence and triggers a NameError instead.
~/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr/java/test_result.rb
Line:19
16 # It is necessary to require these files here as the bdd plugin directly
includes this file
17 require 'yaml'
18 begin
19 require 'rspec/core/formatters/base_formatter'
20 rescue LoadError
21 # If Rspec is not present then assume we do no need Yaml formatter
22 end
was (Author: rbpandey):
````
NameError: uninitialized constant RSpec
const_missing at org/jruby/RubyModule.java:2726
const_missing at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/rspec-core-3.2.3/lib/rspec/core/formatters/base_formatter.rb:1
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr/java/test_result.rb:1
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr/java/test_result.rb:19
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr.rb:1
load at org/jruby/RubyKernel.java:1087
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr.rb:81
eval at org/jruby/RubyKernel.java:1107
(root) at
/Users/me/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/bin/buildr:1
````
The code below is being triggered, but causes a failure because rspec hasn't
been loaded prior. This happens when there is a version of rspec in the gem
home/gem path that is to be used outside of buildr. But buildr gets tripped-up
on it's presence and triggers a NameError instead.
~/.rvm/gems/jruby-1.7.19@foo/gems/buildr-1.4.22-java/lib/buildr/java/test_result.rb
Line:19
16 # It is necessary to require these files here as the bdd plugin directly
includes this file
17 require 'yaml'
18 begin
19 require 'rspec/core/formatters/base_formatter'
20 rescue LoadError
21 # If Rspec is not present then assume we do no need Yaml formatter
22 end
> Remove runtime dependency on rspec
> ----------------------------------
>
> Key: BUILDR-705
> URL: https://issues.apache.org/jira/browse/BUILDR-705
> Project: Buildr
> Issue Type: Bug
> Components: Dependency management
> Affects Versions: 1.4.20
> Environment: OS X 10.10
> Reporter: r6p
> Assignee: Peter Donald
> Fix For: 1.4.22
>
> Attachments: 0001-Removing-runtime-dependency-on-rspec.patch
>
>
> Having rspec as a "runtime dependency" for buildr is blocking us from
> updating rspec. Since using buildr's rspec support is optional and we don't
> use it, but use rspec directly ourselves this prevents us from upgrading
> rspec in our codebase due to version conflicts since we include buildr in our
> Gemfile.
> I think it makes sense to ask users to include rspec separately in their
> Gemfile and control the correct version required to make use of buildr's
> rspec support if that want to use that feature of buildr. But this shouldn't
> block those of us who don't use buildr from upgrading our independent rspec
> dependencies.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)