Skip to content

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Sep 18, 2025

To be included in 3.3.7-RC2

Closes scala#21877
* removes coverage of inlined nodes (as mentioned in the accompanying
comment, those are impossible to represent in most cases)
* adds coverage for Literals (ones directly in Apply are omitted)
* removes coverage of `throw` contents
* if apply node is tagged, we do not tag it's prefix, outside of other
prefixing Apply's arguments (eg. when we tag `a+b+c` we do not
redundantly tag `a+b`)
* allows instrumenting synthetic method calls (like apply of a case

After all of these changes the statements tagged are much more similar
to Scala 2, let's look at the scala#21877 minimisation:
* Scala 2:
<img width="704" height="364" alt="Zrzut ekranu 2025-08-12 o 17 07 31"
src="https://github.com/user-attachments/assets/f647dfa5-973e-424f-9818-483b7d01d550"
/>
<img width="740" height="379" alt="Zrzut ekranu 2025-08-12 o 17 07 46"
src="https://github.com/user-attachments/assets/09eca1c0-a202-4e5e-b3e4-0947d9e8662d"
/>

* Scala 3:
<img width="623" height="360" alt="Zrzut ekranu 2025-08-12 o 17 08 48"
src="https://github.com/user-attachments/assets/efd5baaa-9f52-4ad6-9ba6-2f5bde42a470"
/>
<img width="638" height="428" alt="Zrzut ekranu 2025-08-12 o 17 08 55"
src="https://github.com/user-attachments/assets/01ff6cc6-c348-47db-8ae5-d758ca0bf302"
/>

There are some differences still remaining, most notably the tagging the
DefDefs and its default parameters, but I left them for now, as those
seem more useful than harmful.

BEcouse of those changed most of the .covergae files had to be
regenerated, however I want through each and every diff to make sure
that all of those changes there are expected.

Additionally, this PR also fixes scala#21695 (issue with certain generated
Block nodes not having assigned the correct type, causing later
undefined errors).
@tgodzik tgodzik merged commit 7fab136 into scala:release-3.3.7 Sep 19, 2025
20 checks passed
@tgodzik tgodzik deleted the add-coverage branch September 19, 2025 11:36
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