darkfrog26 on scribe-3.5.1
darkfrog26 on master
Update scribe to 3.5.1 Merge pull request #115 from ou… (compare)
darkfrog26 on undertow-core-2.2.7.Final
darkfrog26 on master
Update undertow-core to 2.2.7.F… Merge pull request #116 from ou… (compare)
darkfrog26 on sbt-scalajs-1.5.1
darkfrog26 on master
Update sbt-scalajs, scalajs-com… Merge pull request #117 from ou… (compare)
darkfrog26 on scala-collection-compat-2.4.3
darkfrog26 on master
Update scala-collection-compat … Merge branch 'master' into upda… Merge pull request #118 from ou… (compare)
darkfrog26 on scala-collection-compat-2.4.3
Update scala-xml to 2.0.0-RC1 Update scalatest to 3.2.7 Merge pull request #120 from ou… and 2 more (compare)
darkfrog26 on scala-xml-2.0.0-RC1
darkfrog26 on master
Update scala-xml to 2.0.0-RC1 Merge pull request #119 from ou… (compare)
darkfrog26 on scalatest-3.2.7
darkfrog26 on master
Update scalatest to 3.2.7 Merge pull request #120 from ou… (compare)
HttpClient
though
Hi all! I started to look for new web app building tools while picking up interest in scala again after a long time. I've been mostly doing stuff with Liftweb previously. YouI seems very interesting tool, so I'm trying it out next!
I'm building the example, I pulled the latest from GitHub and I'm getting some XNIO runtime exception, but it doesn't seem to be fatal, I still get "Hello world" to my browser. But is there something I should change perhaps?
[info] 2020.06.05 21:42:03 [XNIO-1 I/O-3] ERROR io.youi.ErrorSupport.defaultHandler:28:38 - java.lang.RuntimeException: Invalid reference to recursive state with no previous value for Some(Set()). This should only happen if the function doesn't always expose a reference to itself.
I'm using openjdk version "11.0.7" 2020-04-14 on Xubuntu 20.04
sbt
>project exampleJVM
>;appJS/fastOptJS;reStart
sbt exampleJS/fastOptJS exampleJVM/run
. Copied that from the github page.
sbt:exampleJVM> ;exampleJS/fastOptJS;reStart
[success] Total time: 4 s, completed Jun 6, 2020, 11:01:45 AM
[info] Application exampleJVM not yet started
[info] Starting application exampleJVM in the background ...
exampleJVM Starting io.youi.example.ServerExampleApplication.main()
[success] Total time: 1 s, completed Jun 6, 2020, 11:01:46 AM
sbt:exampleJVM> exampleJVM 2020.06.06 11:01:50 [main] INFO io.youi.server.Server.implementation:34:20 - Using server implementation: io.youi.server.UndertowServerImplementation...
exampleJVM[ERROR] Jun 06, 2020 11:01:53 AM org.xnio.Xnio <clinit>
exampleJVM[ERROR] INFO: XNIO version 3.3.8.Final
exampleJVM[ERROR] Jun 06, 2020 11:01:53 AM org.xnio.nio.NioXnio <clinit>
exampleJVM[ERROR] INFO: XNIO NIO Implementation Version 3.3.8.Final
exampleJVM[ERROR] WARNING: An illegal reflective access operation has occurred
exampleJVM[ERROR] WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/home/henrik/.ivy2/cache/org.jboss.xnio/xnio-nio/jars/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.EPollSelectorProvider()
exampleJVM[ERROR] WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
exampleJVM[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
exampleJVM[ERROR] WARNING: All illegal access operations will be denied in a future release
exampleJVM 2020.06.06 11:01:54 [main] INFO io.youi.server.Server.start:68:16 - Server started on HTTP 127.0.0.1:8080
exampleJVM 2020.06.06 11:02:29 [XNIO-1 I/O-3] ERROR io.youi.ErrorSupport.defaultHandler:28:38 - java.lang.RuntimeException: Invalid reference to recursive state with no previous value for Some(Set()). This should only happen if the function doesn't always expose a reference to itself.
;appJS/fastOptJS;reStart
localhost:8080
in firefox, it redirects to localhost:8080/ui-examples.html
but seems it's not found, says console:exampleJVM[ERROR] 2020.06.06 16:19:14 [ERROR] io.youi.ErrorSupport.defaultHandler:30:38 - java.lang.RuntimeException: Invalid URL or not found in class-loader: app/application-fastopt.js.youi.
localhost:8080/session.html
to address bar
@darkfrog26 I think I can now follow many things that is going on in the examples, but I have one critical question that I don't yet understand. It relates to the filter DSL: I think serving for example a simple json, like in the example, is pretty self explainatory, but how about the JS app part?
I mean what is the 'binding factor' which triggers the build to compile the JS app and include it to the html part, so that browser will load it?
For example, what actually happens here:
combined.any(
path.exact(path"/courio.html"),
path.matches("/examples/.*[.]html"),
path.exact("/ui-examples.html")
) / Application / ServerApplication.AppTemplate
more specifically in the last line? How does it know that ClientExampleApplication.scala
needs now a build etc? Is it convetion based on the file naming, or how?
Sorry this might seem a silly question with an obvious answer, but... :-D
exampleJVM
resources
directory so that the server can serve it up.
Application
and ServerApplication.AppTemplate
have more to do with setting up the HTML to reference that Scala.js so that it will run the application in the client.