Skip to content

Backport "Fix undercompilation upon ctor change" to LTS #20994

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 4, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #19911 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

eed3si9n and others added 2 commits July 4, 2024 00:14
**Problem**
Scala 3 compiler registers special `zincMangledName` for
constructors for the purpose of incremental compilation.
Currently the `zincMangledName` contains the package name,
which does not match the use site tracking,
thereby causing undercompilation during incremental compilation
after a ctor change, like adding a parameter.

There is an existing scripted test, but coincidentally
the test class does NOT include packages, so the test ends up passing.

**Solution**
This PR reproduces the issue by adding package name to the test.
This also fixes the problem by changing the `zincMangedName`
to `sym.owner.name ++ ";init;"`.

[Cherry-picked 157ed43]
Instead of avoiding fully qualified names,
use a different separator in zincMangledName.

[Cherry-picked 0f7de67]
Base automatically changed from lts-19886 to lts-3.3 July 4, 2024 09:59
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-19986.

Reference

@WojciechMazur WojciechMazur merged commit e48cbe7 into lts-3.3 Jul 4, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the lts-19911 branch July 4, 2024 10:00
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