cucumber-attic / cuke4duke

Cucumber support for the JVM: Java, Scala, Groovy, Clojure, Ioke, Javascript, Spring, Guice, PicoContainer, WebDriver, Ant and Maven
http://wiki.github.com/aslakhellesoy/cuke4duke
MIT License
256 stars 72 forks source link

Cucuber 1.0.1 breaks cuke4duke #118

Closed josephks closed 13 years ago

josephks commented 13 years ago

See my comment at https://github.com/josephks/cuke4duke/commit/acd2326f94330ca49529bc7e5881b51b39836bb6

I changed the gemspec to require cucuber 1.0.0 but when I did I got this error:

[INFO] --- maven-source-plugin:2.1.2:jar (bind-sources) @ cuke4duke-ejb3-example ---
[INFO] Building jar: /tmp/t/cuke4duke/examples/java-ejb3/target/cuke4duke-ejb3-example-0.4.4-sources.jar
[INFO] 
[INFO] --- cuke4duke-maven-plugin:0.4.4:cucumber (run-features) @ cuke4duke-ejb3-example ---
[INFO] Bundler::GemNotFound: Could not find cucumber-1.0.0 in any of the sources
[INFO]       materialize at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/spec_set.rb:87
[INFO]              map! at org/jruby/RubyArray.java:2376
[INFO]       materialize at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/spec_set.rb:81
[INFO]             specs at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/definition.rb:90
[INFO]         specs_for at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/definition.rb:135
[INFO]   requested_specs at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/definition.rb:124
[INFO]   requested_specs at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/environment.rb:23
[INFO]             setup at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/runtime.rb:11
[INFO]             setup at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler.rb:107
[INFO]            (root) at /home/jks/.m3-todel/repository/.jruby/gems/bundler-1.0.15/lib/bundler/setup.rb:17
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Cuke4Duke: Parent ................................. SUCCESS [1.752s]
[INFO] Cuke4Duke: Core ................................... SUCCESS [1:51.309s]
[INFO] Cuke4Duke: Maven Plugin ........................... SUCCESS [4.867s]
[INFO] Cuke4Duke: EJB3 Example ........................... FAILURE [19.746s]
[INFO] Cuke4Duke: Java Example ........................... SKIPPED
[INFO] Cuke4Duke: Scala Example .......................... SKIPPED
[INFO] Cuke4Duke: Guice Example .......................... SKIPPED
[INFO] Cuke4Duke: Java WebDriver Example ................. SKIPPED
[INFO] Cuke4Duke: Groovy Webdriver Example ............... SKIPPED
[INFO] Cuke4Duke: Groovy Example ......................... SKIPPED
[INFO] Cuke4Duke: Clojure Example ........................ SKIPPED
[INFO] Cuke4Duke: Ioke Example ........................... SKIPPED
[INFO] Cuke4Duke: Spring Example ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:18.891s
[INFO] Finished at: Tue Jul 12 17:47:23 EDT 2011
[INFO] Final Memory: 55M/477M
josephks commented 13 years ago

Note that BACKTRACE_FILTER_PATTERNS is referenced from more than one place:

 [jks@jks-desktop ~/cuke4duke/lib/cucumber]{f13}$ grep BACKTRACE_FILTER_PATTERNS */*
groovy_support/backtrace_filter.rb:Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS << /org\/codehaus\/groovy|groovy\/lang/
js_support/backtrace_filter.rb:Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS << /org\/mozilla\/javascript/
scala_support/backtrace_filter.rb:Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS << /^\s*scala/
aslakhellesoy commented 13 years ago

Doh. I had completely forgotten that. I need to put a comment in the source so I remember not to refactor (break) it again. Not sure what your "Could not find cucumber-1.0.0" error is - it's definitely out there: http://rubygems.org/gems/cucumber/versions/1.0.0

aslakhellesoy commented 13 years ago

I'm closing this since it's a Cucumber bug, not a Cuke4Duke bug.

https://github.com/cucumber/cucumber/issues/104

josephks commented 13 years ago

cucumber 1.0.0 was downloaded but I still got that error from bundler. If you update the spec file to require cucumber 1.0.0 does it work for you?

aslakhellesoy commented 13 years ago

You have to remove the 1.0.1 version too. What do you mean by "spec file"?

josephks commented 13 years ago

I put this in cuke4duke.gemspec:

s.add_dependency 'cucumber', '= 1.0.0'

and I did remove 1.0.1.

In the java examples subdirectory I modified the build.xml to explicitly install the cucumber 1.0.0 gem and it works perfectly:

https://github.com/josephks/cuke4duke/commit/a2584d665e7b80897c5feb93eb8f9c6f39952d19

restagner commented 13 years ago

Hi Joseph,

We ran into a similar issue when one our testers installed cuke4duke for the first time. It went ahead and downloaded cucumber-1.0.1. And, when we tried to run our tests we encountered the following error: "uninitialized constant Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS". Reading through your previous post, it would appear you fixed the problem. The solution is not all too clear to me and I was wondering if you could possibly help me out by answering the questions below:

josephks commented 13 years ago

The cuke4duke.gemspec is in the root directory of the cuke4duke git repository. Edit the line

s.add_dependency 'cucumber', '>= 0.10.2'

to be

s.add_dependency 'cucumber', '>= 1.0.0'

The build.xml I modified is the one in the examples/java directory. I modified it so using ivy to download isn't as confusing as it was, and also to explicitly install cucumber 1.0.0. If I didn't do that 1.0.1 would have been downloaded.

I was able to run the examples with my modified build.xml, but I still can'tjruby -S rake build_all in the root directory. Even though cucumber 1.0.0 was downloaded it seems couldn't bundler find it after it was downloaded. However you don't need to do that to use cuke4duke. Just look at the java example directory. If you use that build.xml and those ivy xml files it will download a prebuilt cuke4duke for you.

josephks commented 13 years ago

Actually it seems as if bundler got over whatever problem it was having yesterday. jruby -S rake build_all does work for me now. Just check out my version of cuke4duke that has the modifications in cuke4duke.gemspec

restagner commented 13 years ago

I appreciate the feedback !!! I'm not too savy with github and building from source (I'm part of the QA team at our company), but I'll go ahead and check out your version and give it a go. Thanks a bunch.