-
Notifications
You must be signed in to change notification settings - Fork 48
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
Sbt clean after adding a function to share Api #39
Comments
Can you give more detailed instructions of how to reproduce the issue? |
git clone https://github.com/ochrons/scalajs-spa-tutorial.git
cd scalajs-spa-tutorial
sbt
~re-start add this to shared/Api: def dumbCall(s:String) add this to jvm/ApiServices override def dumbCall(s:String):Unit ={
println(s)
} add this to client/component.Motad.scala in AjaxClient[Api].dumbCall("mooo").call()
.foreach(message => "mooo") now open http://localhost:8080/ and hit Update button
now do this: re-stop
clean
re-start and it will work |
Cool, thanks =) |
@lihaoyi thank you for all awesome libs |
re-start comes from the sbt-revolver plugin if I am not mistaken |
I've been getting a similar error in my multi module sbt project too (the MatchError: Request). I don't have a stack trace right now. Unfortunately I haven't got around to creating something to consistently reproduce the problem. Things to note though is that it is possible to get into a state where I have to do a clean and full rebuild. I've noticed that I can also fix the problem by adding a newline to a trait which contains my def routes = route[MyApi](implementation) Seems to trigger the macro to do its stuff. I don't know much about sbt but I found some scary looking stuff related to macros not really working with incremental compilation? https://groups.google.com/forum/#!topic/scala-user/GsFU0KddVaY No idea if that is related to this though. |
Seems to be due to sbt/sbt#1729. I can also reproduce this issue on scalajs-spa-tutorial's Play version by adding a new method (rename works) in the shared API and hitting refresh. My current work-around is to rename the Router every time I change the shared API (sbt clean also works, but that takes too long). |
I have a work-around in ochrons/scalajs-spa-tutorial#25. |
I encountered this as well. |
In the middle of development on ~re-start mode, if you add a function to the shared trait and override it in the server then you would get weird errors in the test time. To compile it correctly you have to do:
The code that I am using is SPA tutorial (https://github.com/ochrons/scalajs-spa-tutorial)
The text was updated successfully, but these errors were encountered: