Skip to content
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

Add Scala-CLI, but do not remove Ammonite yet #1166

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ For more detailed changes see:
- New [ROBOT Version 1.9.6](https://github.com/ontodev/robot/releases/tag/v1.9.6). This came with a great number of updates and upgrades, see release notes.
- J2cli, a command-line tool to process Jinja2 templates, has been replaced by [Jinjanator](https://github.com/kpfleming/jinjanator). If your custom workflows invoke the `j2` tool, you will need to update them to use `jinjanate` instead.
- New program `dicer-cli` to manage the ID range file.
- Ammonite, the Scala interpreter, is no longer provided in the ODKLite image. If you need Ammonite, you must now use the ODKFull image.
- Ammonite, the Scala interpreter, is no longer provided in the ODKLite image. If you need Ammonite, you must now use the ODKFull image. Be warned that Ammonite is slated for complete removal in a future ODK release, you should use Scala-CLI instead.
- The Scala-CLI Scala runner has been added to the ODKFull image.

## New configuration options

Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV JENA_VERSION=4.9.0
ENV KGCL_JAVA_VERSION=0.5.1
ENV SSSOM_JAVA_VERSION=1.1.1
ENV AMMONITE_VERSION=2.5.9
ENV SCALA_CLI_VERSION=1.5.4

# Avoid repeated downloads of script dependencies by mounting the local coursier cache:
# docker run -v $HOME/.coursier/cache/v1:/tools/.coursier-cache ...
Expand Down Expand Up @@ -92,6 +93,13 @@ RUN wget -nv https://github.com/lihaoyi/Ammonite/releases/download/$AMMONITE_VER
chmod 755 /tools/amm && \
java -cp /tools/amm ammonite.AmmoniteMain /dev/null

# Install Scala-CLI
RUN wget -nv https://github.com/VirtusLab/scala-cli/releases/download/v$SCALA_CLI_VERSION/scala-cli.jar \
-O /tools/scala-cli.jar && \
echo "#!/bin/bash" > /tools/scala-cli && \
echo "java -jar /tools/scala-cli.jar \"\$@\"" >> /tools/scala-cli && \
chmod 0755 /tools/scala-cli

# Install SPARQLProg.
RUN swipl -g "pack_install(sparqlprog, [interactive(false),global(true)])" -g halt

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test_odkfull_programs: test_odklite_programs
@./tests/test-program.sh SOUFFLE souffle --version
@./tests/test-program.sh JENA jena
@./tests/test-program.sh AMMONITE sh amm --help
@./tests/test-program.sh SCALA-CLI scala-cli --version
@./tests/test-program.sh SPARQL sparql --version
@./tests/test-program.sh SPARQLPROG pl2sparql -g halt
@./tests/test-program.sh OBO-DASHBOARD obodash --help
Expand Down
4 changes: 4 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ mkdir -p /home/odkuser
chown odkuser:odkuser /home/odkuser
[ -d /home/odkuser/.data ] && chown odkuser:odkuser /home/odkuser/.data
[ -d /home/odkuser/.data/oaklib ] && chown odkuser:odkuser /home/odkuser/.data/oaklib
if [ ! -d /tools/.coursier-cache ] ; then
mkdir /tools/.coursier-cache
chown odkuser:odkuser /tools/.coursier-cache
fi
PATH=$PATH:/home/odkuser/.local/bin
[ -S /run/host-services/ssh-auth.sock ] && chown odkuser /run/host-services/ssh-auth.sock

Expand Down
Loading