Skip to content

Commit a374c1d

Browse files
authored
fix: do not add scala.util.Properties as the Main-Class in the Manifest (#24540)
When checking the `MANIFEST.MF` file of the stdlib 3.8.0-RC1, I observed that we list `Main-Class: scala.util.Properties` ``` Manifest-Version: 1.0 Specification-Title: scala-library-bootstrapped Specification-Version: 3.8.0-RC1 Specification-Vendor: LAMP/EPFL Implementation-Title: scala-library-bootstrapped Implementation-Version: 3.8.0-RC1 Implementation-Vendor: LAMP/EPFL Implementation-Vendor-Id: org.scala-lang Implementation-URL: https://scala-lang.org/ Main-Class: scala.util.Properties ``` In this PR, we make sure to not list any `Main-Class` for the stdlib since it is a library, not an application.
2 parents 48f6cca + 33eac65 commit a374c1d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

project/Build.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,8 @@ object Build {
12621262
// Should we also patch .sjsir files
12631263
keepSJSIR := false,
12641264
// Generate library.properties, used by scala.util.Properties
1265-
Compile / resourceGenerators += generateLibraryProperties.taskValue
1265+
Compile / resourceGenerators += generateLibraryProperties.taskValue,
1266+
mainClass := None,
12661267
)
12671268

12681269
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-nonbootstrapped project */
@@ -1304,6 +1305,7 @@ object Build {
13041305
publish / skip := false,
13051306
// Project specific target folder. sbt doesn't like having two projects using the same target folder
13061307
target := target.value / "scala3-library-nonbootstrapped",
1308+
mainClass := None,
13071309
)
13081310

13091311
/* Configuration of the org.scala-lang:scala-library:*.**.**-bootstrapped project */
@@ -1383,6 +1385,7 @@ object Build {
13831385
// Generate Scala 3 runtime properties overlay
13841386
Compile / resourceGenerators += generateLibraryProperties.taskValue,
13851387
bspEnabled := enableBspAllProjects,
1388+
mainClass := None,
13861389
)
13871390

13881391
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
@@ -1427,6 +1430,7 @@ object Build {
14271430
// Project specific target folder. sbt doesn't like having two projects using the same target folder
14281431
target := target.value / "scala3-library-bootstrapped",
14291432
bspEnabled := enableBspAllProjects,
1433+
mainClass := None,
14301434
)
14311435

14321436
/* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -1557,6 +1561,7 @@ object Build {
15571561
// Should we also patch .sjsir files
15581562
keepSJSIR := true,
15591563
bspEnabled := false,
1564+
mainClass := None,
15601565
)
15611566

15621567
/* Configuration of the org.scala-lang:scala3-library_sjs1_3:*.**.**-bootstrapped project */
@@ -1599,6 +1604,7 @@ object Build {
15991604
// Project specific target folder. sbt doesn't like having two projects using the same target folder
16001605
target := target.value / "scala3-library",
16011606
bspEnabled := false,
1607+
mainClass := None,
16021608
)
16031609

16041610
// ==============================================================================================

0 commit comments

Comments
 (0)