Skip to content

Remove stdlib213 from community build tests #18801

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

Conversation

nicolasstucki
Copy link
Contributor

This test exists for historical reasons. Now we compile the Scala 2 library in the scala2-library-bootstrapped project. This one checks that it compiles (with -Ycheck:all) and is used to package the TASTy files in the scala2-library-tasty project. Furthermore, now there is a scala/scala test that checks that the library can be compiled with Scala 3.

This test is fundamentally broken but we have not noticed it because we do not use -Ycheck:all. The reason is that when we compile scala.Predef we get a conflict with scala.runtime.stdLibPatches.Predef when we patch the symbols. This also surfaced in #18738.

This test exists for historical reasons. Now we compile the Scala 2
library in the `scala2-library-bootstrapped` project. This one checks
that it compiles (with `-Ycheck:all`) and is used to package the TASTy
files in the `scala2-library-tasty` project. Furthermore, now there is
a `scala/scala` test that checks that the library can be compiled with
Scala 3.

This test is fundamentally broken but we have not noticed it because we
do not use `-Ycheck:all`. The reason is that when we compile `scala.Predef`
we get a conflict with `scala.runtime.stdLibPatches.Predef` when we patch
the symbols. This also surfaced in scala#18738.
@sjrd
Copy link
Member

sjrd commented Oct 31, 2023

@nicolasstucki
Copy link
Contributor Author

We still need this project for the benchmarks.

I need to dig deeper into benchmarks to know how to handle that case. Ideally, we want to benchmark against the same version of the sources every time. But as it is right not it seems that when someone updated the stdlib213 for the tests we also changed it for the benchmarks. This was not an ideal situation.

@mbovel @liufengyun do you have some extra insight on this?

@nicolasstucki nicolasstucki marked this pull request as ready for review October 31, 2023 09:54
@nicolasstucki nicolasstucki requested a review from smarter October 31, 2023 09:54
@liufengyun
Copy link
Contributor

For the benchmarks, the stdlib is used in the following files:

Ideally, we want to benchmark against the same version of the sources every time. But as it is right not it seems that when someone updated the stdlib213 for the tests we also changed it for the benchmarks. This was not an ideal situation.

The compiler is already an exception to that. Maybe the stdlib can be an exception as well to avoid maintenance overhead.

@nicolasstucki nicolasstucki merged commit 699ed87 into scala:main Nov 1, 2023
@nicolasstucki nicolasstucki deleted the remove-stdlib213-community-build-test branch November 1, 2023 08:51
@michelou
Copy link
Contributor

michelou commented Nov 1, 2023

@nicolasstucki Good job, thanks !

@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Dec 2, 2024
Backports #18801 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants