JuPfu / chelona

A Parboiled2 based Parser for the W3C RDF 1.1 TriG-, Turtle-, N-Triples- and Quad-Languages for Scala, Java and JavaScript
9 stars 2 forks source link

scalajs support #3

Closed antonkulaga closed 8 years ago

antonkulaga commented 8 years ago

It would be nice to crosscompile it to scala/scalajs

JuPfu commented 8 years ago

Hi, I will go for it. First, step will be to set an appropriate baseline as I did some experiments with parallelization, which might lead to problems in case of syntactic errors encountered in input data. Next step is to cross compile to scala/scalajs. Kind regards, Jürgen

antonkulaga commented 8 years ago

I made a PR #4 to add scalajs support. Tests on scalajs part fail but it is because of parallelization that is not fully supported in scalajs. I do not have time now to deal with it

JuPfu commented 8 years ago

I am considering to create a branch in which the parallelization parts will be removed, at least temporarily. This branch should be used for cross-compiling to scalajs.

JuPfu commented 8 years ago

Merged your changes in branch scalajs. Next step is to have a look at the parallelization to make all tests pass. As I am not a Git-professional, my proceedings might not match the standards. If you like to have write access to the project, I gladly will assign them to you. Kind regards, Jürgen

antonkulaga commented 8 years ago

I am ok with just sending PRs. Unfortunately, I have very little free time - not enough to delete parallelization that does not work in scalajs For me editing parboiled rules takes a lot of time because (unlike with FastParse) Intellij IDEA error highlighting is totally wrong with parboiled2, so I have to work almost blindly with it.

antonkulaga commented 8 years ago

any progress on separating async stuff from the parser?

JuPfu commented 8 years ago

Hi Anton, yes, I removed the multi-threading from the parser and compiled it successfully. I could run some tests manually (see chelona/js/src/main/scala/org/chelona/MainJS.scala on the scalajs branch).

At the moment I am looking for a way to modify the test modules (see chelona/jvm/src/test/scala/org/chelona/) to get them compiled and run with scalajs. Each test case reads the test data from file. Any suggestions how to do adapt it for scalajs (besides to embed each file data in the test module and to use a StringReader) ?

Is there a best practise how to publish the scala-js version of a project ? Any hints, links, support is welcome!

Kind regards Jürgen

JuPfu commented 8 years ago

Preparing for publishing scala-js version. Any comments, remarks or known problems ?

JuPfu commented 8 years ago

@antonkulaga May I add you as developer to the project as you started the scalajs support ?

JuPfu commented 8 years ago

@antonkulaga chelona_sjs0.6_2.11-1.2.0.jar published on Sonatype.

Update of documentation is in progress. I will open a separate issue for it.

antonkulaga commented 8 years ago

Great news, @JuPfu , I will try to integrate it to banana-rdf. Sorry for being not responsive - I was in the conference last week.