wicketstuff / core

Wicketstuff-core projects are bundled user contributions for use with Apache Wicket (https://wicket.apache.org/). They are released in step with Wicket releases to make them easy to use.
342 stars 298 forks source link

Fix wicket-scala-sample in master branch due to upstream change #10

Closed mocleiri closed 13 years ago

mocleiri commented 13 years ago

In recent builds on the master branch the wicket-scala-sample module is failing. The problem is:

[ERROR] /home/hudson/work/workspace/Wicket Stuff Core Java5 (wicket   1.5-SNAPSHOT)/jdk-1.5-parent/scala-extensions-parent/wicket-scala-sample/src/main/scala/org/wicketstuff/scala/sample/HelloWicketWorld.scala:71: error: ambiguous reference to overloaded definition,
[INFO] both method add in class FormComponent of type    (org.apache.wicket.validation.IValidator[_ >: T])org.apache.wicket.markup.html.form.FormComponent[T]
[INFO] and  method add in class Component of type 
(org.apache.wicket.behavior.Behavior*)org.apache.wicket.Component

[INFO] match argument types (org.apache.wicket.validation.validator.EmailAddressValidator)
[INFO]       add(new TextField("email").add(EmailAddressValidator.getInstance))
[INFO]                                  ^
[ERROR] one error found

Could someone who knows Scala remove the ambiguity so that the file will compile properly?

The full build log is here: http://wicketstuff.org/hudson/job/Wicket%20Stuff%20Core%20Java5%20%28wicket%201.5-SNAPSHOT%29/86/org.wicketstuff.scala$sample/console

martin-g commented 13 years ago

With https://github.com/wicketstuff/core/commit/fa34e5d4f1280a958f1b7b500d50a714b29f6c37 I upgraded the code to use latest Scala (2.8.1) and the respective versions for the testing libraries. Now the compilation passes locally but the tests don't work. I'll investigate further.

akiraly commented 13 years ago

With commit b8e94ce8e90093659202bcecf6f2c175efd7d86b I made a small change to the scala tests. Now all modules and its tests in "jdk-1.5-parent" compile, run and pass on my computer. Can someone review that this was the correct way to fix the scala tests?

martin-g commented 13 years ago

Yes, this solves the problem. I simplified it a bit by removing the usage of JUnit trait.