Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Lorenzo Gabriele
@lolgab
Now I have only a failing test on a xml string because a regex scala native bug. Can I use another xml string as test?
def e1 = "<li><p>hello\ndear\nworld</p></li>".
           replaceAll("<p>((.|\n)*)</p>", (s: String) => s.replace("\n", "<br/>")) ===
           "<li><p>hello<br/>dear<br/>world</p></li>"
Eric Torreborre
@etorreborre
@lolgab yes you can. I suspect that I was also trying that specific regex while implementing something else but if that’s the case it should have been tested elsewhere
@Mohamedali10 I think this needs to be changed to ${"Replies to HTTP requests “ ~ new ReplySpec} are handled uniformly
Lorenzo Gabriele
@lolgab
Hey @etorreborre, I finished my PR for Scala Native support!! All tests pass on every subproject!
I leaved out cats because it doesn't support yet Scala Native officially. When it does, I'll do another PR for cats.
Eric Torreborre
@etorreborre
@lolgab yes I’ve been following your progress, that’s fantastic! In the meantime I wrote a blog post on where I would like to move specs2 in the next months to make it more accessible for maintainers (including myself!): https://medium.com/@etorreborre_99063/becoming-reasonable-361d7f674ee0. Please @/all voice your opinion and concerns, no answer will be taken for an approval!
Mohamedali10
@Mohamedali10
@etorreborre , thanks
Bruno Bonanno
@bbonanno
@etorreborre the thing is that I'm crosscompiling to 2.12 and 2.13 as well and this error only happens in 2.11
Eric Torreborre
@etorreborre
We are using the latest version of that jar which is 1.1.2 can you check which version you get for Scala 2.11?
Bruno Bonanno
@bbonanno

@etorreborre that's the one I'm getting

[info]   +-org.specs2:specs2-core_2.11:4.6.0 [S]
[info]     +-org.scala-sbt:test-interface:1.0
[info]     +-org.specs2:specs2-matcher_2.11:4.6.0 [S]
[info]       +-org.specs2:specs2-common_2.11:4.6.0 [S]
[info]         +-org.scala-lang.modules:scala-parser-combinators_2.11:1.1.2 [S]
[info]         +-org.scala-lang.modules:scala-xml_2.11:1.2.0 [S]
[info]         +-org.scala-lang:scala-reflect:2.11.12 [S]
[info]         +-org.specs2:specs2-fp_2.11:4.6.0 [S]

Now even weirder, I only get the error running on sbt, when I run on the IDE it works...
I'll keep digging I guess

Eric Torreborre
@etorreborre
:thinking:
Damn no emoticon
Lorenzo Gabriele
@lolgab
@etorreborre Can you send me the sbt trace you get? even in PM.. I tried to publishLocal a toy project and it should exclude 2.12 versions for native target
Mohamedali10
@Mohamedali10
Hi, I have an issue between two version of specs, if someone could help: https://stackoverflow.com/questions/57289919/sbt-dependency-conflict-between-two-specs2s-versions-jars
Eric Torreborre
@etorreborre
@Mohamedali10 I don’t have more ideas than the ones in the comments of your question but I saw something intriguing in the code you mentioned Specification with Forms. Are you using specs2-forms? I’m asking because I’m planning to remove this module from the project as announced in https://medium.com/@etorreborre_99063/becoming-reasonable-361d7f674ee0
Mohamedali10
@Mohamedali10
@etorreborre yes I am using specs-forms
I did not understand why you will remove it, is there something better will be implemented?
and what do you mean by implementing a Fitnesse on steroids using specs2 , can you please explain more?
Eric Torreborre
@etorreborre
I am glad to know that you are using specs2-forms! That’s exactly why I asked for feedback on my blog post, to know what’s out there. I would like to remove things which are not used and make maintenance harder than it should be. By “Fitnesse” I’m referring to http://fitnesse.org. My original vision was to be able to display HTML tables representing “business entities” and “actions” but also to allow non-coders to easily add new rows for new examples and re-run the page to execute the underlying Specification on a live system. The first part is more or less done but I never did find the time (and real-life opportunity) to do the second one. Note that there are now commercial offerings in that space like https://hiptest.com. So what I propose here is to extract specs2-form to its own project, with a README explaining the current status + vision and see where we can go from there
Lorenzo Gabriele
@lolgab
etorreborre/specs2#759
I couldn't find a good way of having two different aggregate projects without ruining the build file completely. To publish Scala Native artifacts you have to use a looong command :-D
Eric Torreborre
@etorreborre
That’s ok, it will only get better once 2.12 and 2.13 are supported. I’ll try to publish today. Thanks!
Lorenzo Gabriele
@lolgab
You're welcome :)
Mohamedali10
@Mohamedali10
@etorreborre very good vision, I hope you will succeed
Lorenzo Gabriele
@lolgab
Is there a reason why specs2-form is not a ScalaJS project?
Eric Torreborre
@etorreborre
Reason 1: I’m pretty much ignorant about ScalaJS, Reason 2: I don’t know maybe something was in the way but I don’t remember what
Lorenzo Gabriele
@lolgab
So can I try to make it a crossProject like the others?
To add it on Native too?
Eric Torreborre
@etorreborre
yes please do
Lorenzo Gabriele
@lolgab
Ok I try
Eric Torreborre
@etorreborre
if something does not work at least we can document it
Lorenzo Gabriele
@lolgab
I'm changing the PR to [WIP]
Eric Torreborre
@etorreborre
ok
Mohamedali10
@Mohamedali10
@etorreborre is there a big difference between specs2 version 2.4.11 and 3.6.6 and 4.3.8,
Eric Torreborre
@etorreborre
Lorenzo Gabriele
@lolgab
Maybe I ended my fight with specs2 build.sbt :-D
I made some other cleanups and maybe fixed all typos :) Now I'm waiting for the CI, when it's green I'm ready for review.
Eric Torreborre
@etorreborre
Hey @lolgab specs2 4.7.0is now published with your changes!
Lorenzo Gabriele
@lolgab
Thank you :-)
I have to say you are one of the library maintainers I know that cares most about his libraries. Very happy to see this!
I'm very glad to have helped a bit :)
Eric Torreborre
@etorreborre
You totally helped because Scala Native is not something I thought I had time to go into (especially these days where I spend most of my life in Haskell-land)
Andreas Flierl
@asflierl
@etorreborre I use forms quite heavily, mostly as a way to visualize matching on deeply nested data structures
Andreas Flierl
@asflierl
I think of them kind of as nested data tables, so in that way forms are the only way for me to get the actual data displayed in a very concise and structured way in a HTML test report
sad to hear not many people seem to use them, it's one of your most innovative features imho
Eric Torreborre
@etorreborre
Thanks for the feedback @asflierl maybe that means that they deserve to be better known then :-). I will extract them to their own project so they will not die! In order to do this I need a slight bit of surgery because they are currently coupled to the Html reporter but that should not be a problem.
Bruno Bonanno
@bbonanno
@etorreborre FYI, updating from SBT 1.2.8 to 1.3.0-RC3 solved it...
Eric Torreborre
@etorreborre
ok, good to know
Philipp Dörfler
@phdoerfler
@etorreborre I had not know about forms before you announced you were gonna get rid of them but now I miss them :)
Eric Torreborre
@etorreborre
Excellent :-). I actually had a closer look at them and decided they will stay for now. Why? Because:
  • HTML reporting is part of specs2
  • data tables are a nice feature of specs2
  • forms are being used to represent datatables in HTML reports
  • they haven’t created much trouble in terms of maintenance
  • some users like them
    It might be a good idea though to extract them to their own project to add new features (I would like to make them interactive) but for now this is more trouble than worth
Antoine
@whisust

Hello, I just upgraded to Intellij 2019.2 (and it cleared all my run confs yay) and now I'm unable to launch my tests as I got the error
Error: Debug: there are no runners for Specs2: Specs2 in 'scala' in my new test run configuration.

I couldn't find how to fix that as the integration is supposed to be (and was before) fluent, so all I could find was "Cmd+Maj+F10 and it runs". Do anyone have this problem too?

Antoine
@whisust

The resulting command line is :

/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java \
    -javaagent:/Users/antoinel/Library/Caches/IntelliJIdea2019.2/captureAgent/debugger-agent.jar \
    -Dfile.encoding=UTF-8 \
    -classpath "$classpath" \
    org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner \
    -s com.company.MySpec \
    -C org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Notifier \
    -showProgressMessages true

And I end up with this in stdout:

java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
  java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  org.specs2.reflect.Classes.$anonfun$loadClassEither$1(Classes.scala:102)
  org.specs2.fp.Need$$anon$2.value0$lzycompute(Name.scala:30)
  org.specs2.fp.Need$$anon$2.value0(Name.scala:30)
  org.specs2.fp.Need$$anon$2.value(Name.scala:31)
  org.specs2.control.eff.ErrorInterpretation$$anon$1.$anonfun$applicative$3(ErrorEffect.scala:83)
  [...]
  org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner.runWithNotifierRunner(JavaSpecs2Runner.java:109)
  org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner.runSpecs2_new(JavaSpecs2Runner.java:196)
  org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner.runTests(JavaSpecs2Runner.java:222)
  org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner.main(JavaSpecs2Runner.java:96)

STACKTRACE

java.lang.ClassNotFoundException: com.company.MySpec

This looks like a specs2 exception...
Please report it with the preceding stacktrace at http://github.com/etorreborre/specs2/issues
Besides, my bloop and sbt test commands run everything normally
Antoine
@whisust
I solved it by re-importing the sbt version of the project, compiling, then re-using bsp as build tool.