Skip to content

Commit 037314c

Browse files
committed
Disambiguate --source command line option between CLI and compiler, favouring scalac meaning
1 parent dfd06b9 commit 037314c

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

modules/cli/src/main/scala/scala/cli/commands/package0/PackageOptions.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ final case class PackageOptions(
5151
@Name("sourcesJar")
5252
@Name("jarSources")
5353
@Name("sources")
54-
@Name("source")
55-
@Tag(tags.deprecated("source")) // alias to be removed in 1.6.x
5654
@Tag(tags.restricted)
5755
@Tag(tags.inShortHelp)
5856
src: Boolean = false,

modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
17121712
"--power",
17131713
"package",
17141714
jarSources,
1715-
"--source",
1715+
"--src",
17161716
"-o",
17171717
sourceJarPath,
17181718
extraOptions

modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -859,16 +859,11 @@ abstract class PackageTestDefinitions extends ScalaCliSuite with TestScalaVersio
859859
test("source JAR") {
860860
val dest = os.rel / "sources.jar"
861861
simpleInputWithScalaAndSc.fromRoot { root =>
862-
val r =
863-
os.proc(TestUtil.cli, "--power", "package", extraOptions, ".", "-o", dest, "--source").call(
864-
cwd = root,
865-
stdin = os.Inherit,
866-
stdout = os.Inherit,
867-
stderr = os.Pipe
868-
)
869-
expect(r.err.trim().contains(
870-
"The --source option alias has been deprecated and may be removed in a future version"
871-
))
862+
os.proc(TestUtil.cli, "--power", "package", extraOptions, ".", "-o", dest, "--src").call(
863+
cwd = root,
864+
stdin = os.Inherit,
865+
stdout = os.Inherit
866+
)
872867

873868
expect(os.isFile(root / dest))
874869

website/docs/reference/cli-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ Generate a library JAR rather than an executable JAR
751751

752752
### `--src`
753753

754-
Aliases: `--jar-sources`, [deprecated] `--source`, `--sources`, `--sources-jar`
754+
Aliases: `--jar-sources`, `--sources`, `--sources-jar`
755755

756756
Generate a source JAR rather than an executable JAR
757757

0 commit comments

Comments
 (0)