From 5e4d0bb18fe91f98970aa529c8e8b3f02960a0da Mon Sep 17 00:00:00 2001 From: Jason Steving Date: Mon, 6 Dec 2021 02:09:21 -0800 Subject: [PATCH] ClaroSupport working efficiently! And NOW.....A REPL on RIJU! This is the final push towards implementing legitimate support for Claro in Riju! I've now figured out how to package up all of the Bazel generated build resources (jars) and the Bazel generated run script and have pieced everything together so that rebuilds and initial page loads are all as efficient as I can make them so far accounting for the intermediate step of compiling to Java. The general process is to package everything needed from Bazel in a tarball and then to dynamically insert a custom script to the Bazel generated run script in bazel-bin to rebuild and update the jar file for the latest modification to the file. This allows me to canibalize Bazel's logic for determining where all the proper "runfiles" a.k.a. jars are located in that tarball. With this approach I'm also able to trivially support the Claro REPL in Riju as well!!!!! This is the greatest unexpected surprise :D. --- langs/claro.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/langs/claro.yaml b/langs/claro.yaml index a4fb577..aa4716f 100644 --- a/langs/claro.yaml +++ b/langs/claro.yaml @@ -44,6 +44,7 @@ install: # I'm not good enough with sed to figure out how to avoid this extra temporary stop in a second file. Oh well. chmod 777 conditions_compiled_claro_image cat conditions_compiled_claro_image2 > conditions_compiled_claro_image + rm conditions_compiled_claro_image2 popd > /dev/null ##################################################################################################### @@ -69,11 +70,13 @@ run: | chmod +rw claro_programs/Conditions.java java -jar claro_compiler_binary_deploy.jar --java_source --silent --classname=Conditions --package=com.claro \ < claro_programs/Conditions.claro \ - > claro_programs/Conditions.java - - pushd claro_programs/ > /dev/null - ./conditions_compiled_claro_image - popd > /dev/null + > claro_programs/Conditions.java \ + && \ + pushd claro_programs/ > /dev/null \ + && \ + ./conditions_compiled_claro_image \ + && \ + popd > /dev/null repl: | java -jar claro_compiler_binary_deploy.jar --repl --silent \ No newline at end of file