Skip to content

Backport "Omit more prefixes in non-package module printing" to LTS #18973

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
Nov 21, 2023

Conversation

Kordyjan
Copy link
Contributor

Backports #17758 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

When we pretty-print a type in a module class, we end up printing the
module class's symbol.  For instance in a reduction failure of
Tuple.Union, we end up printing Tuple.Fold, with Tuple being an internal
(ThisType) reference to the Tuple module class.  I tweaked the logic in
fullNameString so that we omit more prefixes, if the module is
non-package (and make it consistent across -Ytest-pickler).  The package
part is important, because we want to continue to get "import
scala.concurrent.duration..." instead of "import concurrent.duration..".

[Cherry-picked fbb08f7]
If you refer to a package by name, e.g. `scala.quoted.Quotes`, the type
may have a "quoted" prefix that is a TermRef.  Rather than unravel the
rest of the prefixes, we print the fully package name.

[Cherry-picked c04bb4f]
Base automatically changed from lts-17787 to release-3.3.2 November 21, 2023 10:59
@Kordyjan
Copy link
Contributor Author

@Kordyjan Kordyjan merged commit 5d06f7d into release-3.3.2 Nov 21, 2023
@Kordyjan Kordyjan deleted the lts-17758 branch November 21, 2023 11: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.

2 participants