feat: -d option to fosgen now enables nailgun diagnostics

This commit is contained in:
Glen Whitney 2021-03-01 10:06:44 -08:00
parent 87a6fbc642
commit b1f87428f5
3 changed files with 24 additions and 6 deletions

View File

@ -41,7 +41,7 @@ steps:
- cd ../bin
- ln -s ../nailgun/nailgun-client/target/ng .
- cd ..
- bin/fosgen tests/emit_sum.fos
- bin/fosgen -d tests/emit_sum.fos
- name: extract_tests
image: xonsh/xonsh
commands:

View File

@ -74,8 +74,13 @@ then
fi
if [[ $USE_NAILGUN ]]
then
if [[ $SUPPRESS_ERR ]]
then
$BINDIR/let_sun_shine
else
$BINDIR/let_sun_shine noisy
fi
$BINDIR/ng sunshine transform -p $PROJDIR -n $LANGUAGE -i $PROGRAM
exit $?
fi

View File

@ -1,13 +1,21 @@
#!/bin/bash
# Helper for fosgen, not intended to be used directly
# With an argument, print diagnostic output
BINDIR=$(dirname $BASH_SOURCE)
if $BINDIR/ng sunshine --help
then
# echo "sun already shining."
:
if [[ $1 ]]
then
echo "sun already shining."
fi
else
# echo "disperse the clouds."
if [[ $1 ]]
then
echo "disperse the clouds."
fi
SUNJAR="$BINDIR/../lib/sunshine.jar"
PROJDIR="$BINDIR/.."
if [[ ! $MVN_REPO ]]; then
@ -21,7 +29,12 @@ else
echo "MVN_REPO to its full path and re-run."
exit 1
fi
if [[ $1 ]]
then
java -jar $SUNJAR server &
else
java -jar $SUNJAR server >/dev/null 2>&1 &
fi
sleep 5
$BINDIR/ng sunshine load -l $PROJDIR -l $MVN_REPO
fi