Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

scalajs 0.6 #9

Open
sLite opened this issue Jul 4, 2015 · 18 comments
Open

scalajs 0.6 #9

sLite opened this issue Jul 4, 2015 · 18 comments

Comments

@sLite
Copy link

sLite commented Jul 4, 2015

Hi,

Can you update to scalajs 0.6 and republish the artifacts?

Cheers

@EECOLOR
Copy link
Owner

EECOLOR commented Jul 6, 2015

It's a bit more involved than I thought. They have changed the complete structure of how testing is implemented. Theoretically it should be possible to now use the sbt for both jvm and scala.js, I however have no experience with that.

In the upcoming release I will most likely drop support for Scala.js since I am not using it myself anymore.

If anyone is interested in first creating / converting and later maintaining the Scala.js version I'm willing to keep it as part of the library.

Sorry for this disappointing message.

@frgomes
Copy link

frgomes commented Jul 6, 2015

I've evaluated some time ago some 4 or 5 simple test frameworks for ScalaJS.

I really liked little-spec but I've decided to use another framework exacly because little-spec is not integrated with SBT. In practice it means that it cannot integrate with IntelliJ as well.

With the upcoming release, I think this difficulty will be solved and I will give another try on little-spec.

I don't really see any need for special support for ScalaJS. Given that SBT and IDEs will support it, I don't see where special support for ScalaJS would be beneficial. Unless I'm very wrong about this matter...

Thanks

@frgomes
Copy link

frgomes commented Jul 6, 2015

Well... I've just found that I've already visited this subject before.
See: #3

I'm now confused. Anyway... when you release a new version I will give another go.

@EECOLOR
Copy link
Owner

EECOLOR commented Jul 6, 2015

because little-spec is not integrated with SBT

I don't fully understand, do you mean it's not in the list of default test frameworks?

@frgomes
Copy link

frgomes commented Jul 6, 2015

I'm deeply sorry for the confusion... but I'm not sure about my statements. (ashamed face)

As far as I remember, sort of one year ago I've tried to use little-spec via SBT but I couldn't possibly because little-spec didn't implement TestFramework SBT (as far as I remember!).

If you'd like to see what I mean, I'm currently using http://github.com/cgta/otest which does.
This way, I can simply do sbt test and it works with OTest as it would with ScalaTest, for example.

You can find one project of mine which employs OTest at
https://github.com/frgomes/poc-scala-datanucleus/blob/master/build.sbt

I've created definitions for some small test frameworks, for example:

val littleSpecFramework : Seq[Setting[_]] =
  Seq(
    libraryDependencies += "org.qirx" %%% "little-spec" % Versions.`little-spec` % "test",
    testFrameworks += new TestFramework("org.qirx.littlespec.scalajs.TestFramework")
  )

val otestFramework : Seq[Setting[_]] =
  Seq(
    libraryDependencies += "biz.cgta" %% "otest-jvm" % "0.2.0" % "test",
    testFrameworks := Seq(new TestFramework("cgta.otest.runner.OtestSbtFramework"))
  )

@EECOLOR
Copy link
Owner

EECOLOR commented Jul 6, 2015

because little-spec didn't implement TestFramework SBT

It did from the first version

Note that in your example you have %%% instead of %% (where the last one should be used for the jvm (sbt) version)

@sLite
Copy link
Author

sLite commented Jul 6, 2015

I thing keeping little-spec for ScalaJS would be really nice.
The testing landscape for ScalaJS is quite sparse and most of the existing (up to date) frameworks don't have matchers out of the box.
I'm currently collaborating to get matchete to cross-compile to ScalaJS, which could pair up with utest or other assert driven frameworks. But there is still a bunch of reflection stuff that needs to be kicked out.

I think it would be a pity to drop ScalaJS support for a test framwork that has matcher support already built in and already is cross-compiling without reflection issues.
I'm going to take a deeper look into little-spec when i got some time at hand and decide if i will take the duty to converting and maintaining the ScalaJS parts.

Any plans on when you going to continue working on the next version?

@frgomes
Copy link

frgomes commented Jul 6, 2015

Great! I think i've messed the SBT configuration with ScalaJS configuration back then. At that time I was focusing on ScalaJS, which is not the case at the moment. I've just changed my build.sbt and my test cases and it is working fine now under SBT. Thanks a lot! :-)

@sLite
Copy link
Author

sLite commented Jul 9, 2015

I've got the time to look into porting over to ScalaJS 0.6 today, and while i'm still a good chunk away from completing, i got the main parts cross-compiling. I left out extras-documentation so far and the Framework, Runner and Task needs some more loving too.
I don't know how fast i can finish everything, but i'm pretty confident that i will succeed.

I'll keep you updated.

@sLite
Copy link
Author

sLite commented Jul 12, 2015

Hi,

I'm pretty much done with porting. Only 2 more tests are failing due to different Stacktraces on the JVM vs ScalaJS. Should be easy to fix.

Maybe you wanna take a look and tell me what you think so far:
https://github.com/sourcy/little-spec/tree/scalajs-0_6-port

@sLite
Copy link
Author

sLite commented Jul 18, 2015

How is it going, do you have any feedback for me? :)

@EECOLOR
Copy link
Owner

EECOLOR commented Jul 18, 2015

I'm sorry, I did not have a chance to look at it

@EECOLOR
Copy link
Owner

EECOLOR commented Jul 18, 2015

That looks pretty awesome! It seems that the new scalajs approach allows for more compatibility.

I am going on vacation for the next few weeks, but after that I want to look at it in detail. There might be some subtleties regarding the build but I'm sure we can overcome those.

It looks very promising so far. Once you have a version that you think is good enough we should sit down for a chat and figure out how we can work together (coding guidelines, branching, pull-request, ...). I think we then can combine your version with some changes I need to make (see some of the issues) and release a new version.

Good job!

@sLite
Copy link
Author

sLite commented Jul 19, 2015

No problem :)

I'm pretty new to ScalaJS and Scala/SBT in general, so i'm happy for any input.
I'll fix the remaining tests and try to do some cleanup when i have some time to spare, just drop a line when you are back.

Happy holidays! :)

@sLite
Copy link
Author

sLite commented Sep 3, 2015

Forgot to update you here, i got everything compiling and all tests running for JVM/JS on 2.10+2.11

If you want, please take a look. I messed up the distribution a bit, because i didn't know any better.
The artifacts depend on the macro module which isn't distributed as it stands now.

But all the code is working now. If you want check out https://github.com/sourcy/little-spec/tree/scalajs-0_6-port

@EECOLOR
Copy link
Owner

EECOLOR commented Sep 4, 2015

I'll check it out as soon as I can, problem is that I the upcoming weekend and week are stuffed.

At first glance it seems like you did a great job! I hope I can find the time soon to integrate it.

In preparation for that, you could compare your changes with master and see if you can minimize the differences.

@EECOLOR
Copy link
Owner

EECOLOR commented Sep 20, 2015

I have started to work on it. To keep track of the progress I opened #11 which is based on your work. I will also try to integrate the other open issues into that one.

@sLite
Copy link
Author

sLite commented Sep 21, 2015

Hi, i'm sorry but im currently very busy with two other projects and didn't have any time to do any preparations... But if you have any questions please come back at me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants