Skip to content

Fix issue 8558 expose AlreadyLoaded via Reflection #8559

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 1 commit into from
Mar 19, 2020
Merged

Fix issue 8558 expose AlreadyLoaded via Reflection #8559

merged 1 commit into from
Mar 19, 2020

Conversation

gzoller
Copy link
Contributor

@gzoller gzoller commented Mar 17, 2020

Today ReadTasty (Tasty inspection) just emits a warning message to the console when you attempt to inspect a class that's already loaded, e.g. Option or Scala primitive. The message is not useful to the end-user and there's nothing pushed upstream to tell the caller that something unexpected happened. This fix implements a change that returns an AlreadyLoadedCompilationUnit from ReadTasty, which callers can either respond to or ignore--but at least they know something happened. This information is exposed via the Reflection API according to established pattern.

Fixes #8558

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

@nicolasstucki nicolasstucki merged commit b80319c into scala:master Mar 19, 2020
@nicolasstucki
Copy link
Contributor

LGTM. But I may do some refactoring later.

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.

Replace meaningless warning in ReadTasty with something actionable for already-loaded classes
3 participants