Skip to content

Fix broken script on Windows #11957

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

Merged
merged 3 commits into from
Mar 31, 2021
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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ jobs:
run: sbt ";scala3-bootstrapped/compile"
shell: cmd

- name: build binary
run: sbt "dist/pack" & bash -version
shell: cmd

- name: cygwin tests
run: '"C:\Program Files\cygwin64\bin\bash" ./project/scripts/winCmdTests'
shell: cmd

- name: msys tests
run: '"C:\Program Files\Git\bin\bash" ./project/scripts/winCmdTests'
shell: cmd

- name: Scala.js Test
run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test"
shell: cmd
Expand Down
4 changes: 2 additions & 2 deletions dist/bin/common
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# save terminal settings
saved_stty=$(stty -g 2>/dev/null)
# clear on error so we don't later try to restore them
if [[ ! $? ]]; then
if [[ ! $? ]]; then
saved_stty=""
fi

Expand Down Expand Up @@ -135,7 +135,7 @@ fi
find_lib () {
local lib=$(find $PROG_HOME/lib/ -name "$1")
if [ -n "$CYGPATHCMD" ]; then
$CYGPATHCMD -am $lib
"$CYGPATHCMD" -am $lib
elif [[ $mingw || $msys ]]; then
echo $lib | sed 's|/|\\\\|g'
else
Expand Down
3 changes: 3 additions & 0 deletions project/scripts/bootstrapCmdTests
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ echo "testing i11644"
cwd=$(pwd)
clear_out "$OUT"
(cd "$OUT" && "$cwd/bin/scalac" "$cwd/tests/pos/i11644.scala" && "$cwd/bin/scalac" "$cwd/tests/pos/i11644.scala")

# check options specified in files
./bin/scalac @project/scripts/options "$SOURCE"
2 changes: 2 additions & 0 deletions project/scripts/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-Xprint:frontend -Ylog:frontend
-Ycheck:all
10 changes: 10 additions & 0 deletions project/scripts/winCmdTests
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e
PREFIX="dist/target/pack"
SOURCE="tests/pos/HelloWorld.scala"
$PREFIX/bin/scalac @project/scripts/options "$SOURCE"
$PREFIX/bin/scalac -d out "$SOURCE"
$PREFIX/bin/scala -classpath out HelloWorld
$PREFIX/bin/scala -classpath out -J-Xmx512m HelloWorld
mkdir -p _site && $PREFIX/bin/scaladoc -d _site -project Hello "$SOURCE"