Skip to content

Add missing definitions in the stdlib (from stdLibPatches) #23562

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

Merged
merged 2 commits into from
Jul 23, 2025

Conversation

hamzaremmal
Copy link
Member

@hamzaremmal hamzaremmal commented Jul 18, 2025

Add all the definitions that we used to patch in the compiler to their actual source file. No more patching.
Since this will be merged during the 3.7.3 cycle, we cannot undo yet the logic, hence, we rely on the facts that:

  • None of the changes in this PR are visible during 3.7.3
  • Patching is disabled via -Yno-stdlib-patches

Even with all the definitions in the trees, we can still not enable back -Ycheck:all because the trees for Tuple1 and Tuple2 do not contain the definitions of the specialized functions.

Based on #23510

@hamzaremmal hamzaremmal requested a review from a team as a code owner July 18, 2025 14:14
@hamzaremmal
Copy link
Member Author

I already split this into two commits; one where we just copy-paste from the patches and the second (Predef.assert) where we do have a trick to make things work best.
Note that tasty-reader in Scala 2 might need to learn about this trick.

@hamzaremmal hamzaremmal changed the title Add missing definitions in the stdlib (from stdLibPathches) Add missing definitions in the stdlib (from stdLibPatches) Jul 18, 2025
@hamzaremmal hamzaremmal merged commit 570e840 into scala:main Jul 23, 2025
31 checks passed
@hamzaremmal hamzaremmal deleted the no-more-patches branch July 23, 2025 11:23
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.

3 participants