Skip to content

Conversation

@hamzaremmal
Copy link
Member

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.

@hamzaremmal hamzaremmal added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Nov 25, 2025
@WojciechMazur WojciechMazur added this to the 3.8.0 milestone Nov 25, 2025
@som-snytt
Copy link
Contributor

The explanatory comment is

// provide a main method so version info can be obtained by running this

@hamzaremmal
Copy link
Member Author

They should be able to run that method by specifying it manually, not automatically.
Even in Scala 2.13, if we have:

java -jar scala-library-2.13.18.jar 
no main manifest attribute, in scala-library-2.13.18.jar

I don't see why we should have Scala 3 behave differently.

java -jar scala-library-3.8.0-RC2.jar 
Scala library version 3.8.0-RC2 -- Copyright 2002-2025, LAMP/EPFL

The way I see things is: this is a library, not an application. It doesn't make a lot of sense to me to have an entry point available when we try to execute the JAR.

@hamzaremmal hamzaremmal merged commit a374c1d into scala:main Nov 25, 2025
45 checks passed
@hamzaremmal hamzaremmal deleted the no-main-in-stdlib branch November 25, 2025 14:25
@WojciechMazur WojciechMazur added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Dec 1, 2025
WojciechMazur added a commit that referenced this pull request Dec 2, 2025
…n the Manifest" to 3.8.0 (#24608)

Backports #24540 to the 3.8.0-RC3.

PR submitted by the release tooling.
[skip ci]
@WojciechMazur WojciechMazur added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:done This PR was successfully backported.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants