feat: -d option to fosgen now enables nailgun diagnostics
Some checks failed
continuous-integration/drone/push Build is failing

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 - cd ../bin
- ln -s ../nailgun/nailgun-client/target/ng . - ln -s ../nailgun/nailgun-client/target/ng .
- cd .. - cd ..
- bin/fosgen tests/emit_sum.fos - bin/fosgen -d tests/emit_sum.fos
- name: extract_tests - name: extract_tests
image: xonsh/xonsh image: xonsh/xonsh
commands: commands:

View File

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

View File

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