Skip to content

Commit 315c088

Browse files
authored
Fix reporting XML parse errors in AoT builds (#218)
Closes #217 Surprisingly, there is no appreciable difference in the binary size. I'm not complaining!
1 parent c6aff42 commit 315c088

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/aot-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ jobs:
5858
target/graalvm-native-image/jelly-cli rdf to-jelly --in-format "rdfxml" > rdfxml.jelly && \
5959
[ -s rdfxml.jelly ]
6060
61+
# Invalid RDF/XMl input test
62+
# Regression test for: https://github.com/Jelly-RDF/cli/issues/217
63+
echo 'invalidxml' | \
64+
( ! target/graalvm-native-image/jelly-cli rdf to-jelly --in-format "rdfxml" &> error.txt ) && \
65+
grep 'Content is not allowed in prolog' error.txt
66+
6167
# Test rdf validate
6268
target/graalvm-native-image/jelly-cli \
6369
rdf validate out.jelly --compare-to-rdf-file in.nt

build.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ lazy val graalOptions = Seq(
3636
"-H:+UsePredicates", // SkipFlow optimization -- will be default in GraalVM 25
3737
// Make sure we don't include stuff that should be unreachable in the native image
3838
"-H:AbortOnMethodReachable=*UUID.randomUUID*",
39+
// Include XML error messages
40+
// Issue: https://github.com/Jelly-RDF/cli/issues/217
41+
"-H:IncludeResourceBundles=com.sun.org.apache.xerces.internal.impl.msg.XMLMessages",
3942
)
4043

4144
lazy val TestSerial = config("test-serial") extend Test

0 commit comments

Comments
 (0)