Skip to content

Commit

Permalink
WIP: debug project/scripts/bootstrappedOnlyCmdTests
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Jun 20, 2024
1 parent 33eed71 commit e55b9b6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions project/scripts/bootstrappedOnlyCmdTests
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,35 @@ IFS=':=' read -ra versionProps < "$ROOT/$DIST_DIR/target/pack/VERSION" # tempora
[ -n ${versionProps[2]} ] || die "Expected non-empty 'version' property in $ROOT/$DIST_DIR/target/pack/VERSION"
scala_version=${versionProps[2]}

# TEMPORARY DEBUG INFO IN CI - REMOVE WHEN DONE
echo "WRITE CLASSPATHS TO OUTPUT"
SCALA_CLASSPATH_CONTENT=$(cat "$ROOT/$DIST_DIR/target/pack/etc/scala.classpath")
echo -e "> scala.classpath:\n$SCALA_CLASSPATH_CONTENT"
SCALADOC_CLASSPATH_CONTENT=$(cat "$ROOT/$DIST_DIR/target/pack/etc/scaladoc.classpath")
echo -e "> scaladoc.classpath:\n$SCALADOC_CLASSPATH_CONTENT"

load_classpath_2 () {
command="$1"
psep_pattern="$2"
__LOADED_CLASS_PATH=""
while IFS= read -r line; do
if ! [[ (-n ${conemu-} || -n ${msys-}) && "$line" == "*jna-5*" ]]; then
# jna-5 only appropriate for some combinations
__LOADED_CLASS_PATH+="$ROOT/$DIST_DIR/target/pack/maven2/$line$psep_pattern"
fi
done < "$ROOT/$DIST_DIR/target/pack/etc/$command.classpath"
echo "$__LOADED_CLASS_PATH"
}

SCALA_CLASSPATH_CONTENT_CONCAT=$(load_classpath_2 "scala" ":")

echo -e "> scala classpath concat:\n$SCALA_CLASSPATH_CONTENT_CONCAT"

SCALADOC_CLASSPATH_CONTENT_CONCAT=$(load_classpath_2 "scaladoc" ":")

echo -e "> scaladoc classpath concat:\n$SCALADOC_CLASSPATH_CONTENT_CONCAT"


# check that `scalac` compiles and `scala` runs it
echo "testing ./bin/scalac and ./bin/scala"
clear_out "$OUT"
Expand Down

0 comments on commit e55b9b6

Please sign in to comment.