Skip to content

Commit b38bdea

Browse files
committed
Update check exampels and using directice message
1 parent fd15311 commit b38bdea

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.github/scripts/check_examples.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ val failed = toParse.filter { path =>
1313

1414

1515
println(s"Running $path")
16-
os.proc(os.pwd / "scala-cli-src", "--jvm", "temurin:17", args, path)
16+
os.proc(os.pwd / "scala-cli", "--jvm", "temurin:17", args, path)
1717
.call(check = false).exitCode != 0
1818
}
1919

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ jobs:
202202
run: .github/scripts/check_docs.sh
203203
- name: Test gifs
204204
run: gifs/generate_gifs.sh $(ls gifs/scenarios/)
205+
- name: Build binary
206+
run: ./mill copyTo cli.nativeImage ./scala-cli
205207
- name: Check examples
206-
run: ./scala-cli-src --jvm temurin:17 .github/scripts/check_examples.sc
208+
run: ./scala-cli --jvm temurin:17 .github/scripts/check_examples.sc
207209

208210
checks:
209211
timeout-minutes: 15

modules/build/src/main/scala/scala/build/preprocessing/ScalaPreprocessor.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ case object ScalaPreprocessor extends Preprocessor {
338338

339339
case class ExtractedDirectives(offset: Int, directives: Seq[StrictDirective])
340340

341+
val changeToSpecialCommentMsg =
342+
"Using directive using plain comments are deprecated. Please use a special comment syntax: '//> ...' or '/*> ... */'"
343+
341344
def extractUsingDirectives(
342345
contentChars: Array[Char],
343346
path: Either[String, os.Path],
@@ -389,14 +392,12 @@ case object ScalaPreprocessor extends Preprocessor {
389392
}
390393
else if (!specialCommentDirectives.getFlattenedMap().isEmpty()) {
391394
val msg =
392-
s"This using directive is ignored. Using directive from plain comments are deprecated, please add `>` to each comment."
395+
s"This using directive is ignored. $changeToSpecialCommentMsg"
393396
reportWarning(msg, getDirectives(plainCommentDirectives))
394397
specialCommentDirectives
395398
}
396399
else {
397-
val msg =
398-
s"Using directive using plain comments are deprecated, please add `>` to each comment."
399-
reportWarning(msg, getDirectives(plainCommentDirectives))
400+
reportWarning(changeToSpecialCommentMsg, getDirectives(plainCommentDirectives))
400401
plainCommentDirectives
401402
}
402403

scala-cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [ ! -x "$LAUNCHER_DIR/scala-cli" ]; then
1717
echo "native-image launcher not built yet." 1>&2
1818
echo "In order to build it, go in $DIR, and run" 1>&2
1919
echo 1>&2
20-
echo " ./mill copyTo cli.nativeImage" 1>&2
20+
echo " ./mill cli.nativeImage" 1>&2
2121
exit 1
2222
fi
2323

0 commit comments

Comments
 (0)