-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix scala #154
Comments
@dwskoog - is this something you can help us fix? |
Working on it now. Btw, the cucumber-java pom has a deep hate for Windows thanks to that antrun task. Oh how I wish I had something other than my windows laptop right now... |
Okay, my Groovy-fu is a bit weak, but for posterity: /{$basedir}\subdirectory\another/ is how you make a string literal safe for ant-run's groovy task under windows... which of course breaks it horrible on every OS without retarded file separators. I'll make sure not to taint the check-in with that evil. |
…ls ClasspathResourceLoader().instantiateSubclasses which didn't check if the class had a valid constructor given the arguments. ScalaDslTest.scala holds multiple internal ScalaDsl instances which are compiled to classes implementing ScalaDsl but with no valid constructor. These were being picked up by the ClasspathResourceLoader causing the RunCukesTest to fail at load time
@teigen is dead on with his answer. The problem is that nested objects/classes don't have nullary constructors because of how Scala handles the scoping details at the jvm level. There is still a bit of an issue about how the ScalaDsl derivatives are loaded though. It's fairly odd from a Scala POV to have the StepDefs in a class, but the current loading scheme requires it since we're reflecting into public nullary constructors. Given an |
#154. Fixed the issue causing scala to break
@dwskoog are you saying there might be a more idiomatic way to declare step definitions in Scala? Something more similar to Ruby/Groovy/JavaScript/Python? If so, would you be interested in adding support for it? |
I wouldn't say its odd to to have step defs in classes, but I agree its odd not to allow them in objects. |
@aslakhellesoy It's fairly weird to me that The whole issue about making the DSL truly fluent is way out of scope for the 1.0 release. Best to get some explicit feedback from the scala community to figure out where to take that issue. |
@teigen I get a feeling of impedance mismatch between the declarative feel of the DSL and having steps in classes. When I write out a |
@dwskoog the classes are instances in a world. But like I said, I completely agree that object should be supported and the current behavior with objects is very far from what one would expect |
@teigen ah, I see why now. Definitely better than the gross reflection abuse you'd need to pull off to hide all of that away from end users. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
APIs were refactored again, so the code broke since neither of us know enough Scala to fix it.
The text was updated successfully, but these errors were encountered: