Skip to content

Remove methods that detected wrong classes loaded #10260

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

Conversation

nicolasstucki
Copy link
Contributor

Now we load them from their .tasty which ensures that the class was generated by Scala 3 (not Scala 2 nor Java).

Now we load them from their .tasty which ensures that the class was generated by Scala 3 (not Scala 2 nor Java).
@nicolasstucki nicolasstucki marked this pull request as ready for review November 10, 2020 12:26
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

cls.denot.infoOrCompleter match {
case _: NoLoader => Some(Scala2CompilationUnit(cls.fullName.toString))
case _ if cls.flags.is(Flags.JavaDefined) => Some(JavaCompilationUnit(cls.fullName.toString))
case _ => Some(AlreadyLoadedCompilationUnit(cls.denot.fullName.toString))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The match is kept intentionally? Semantically, it can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should be able to remove it. But last time I tried there was a failure with some of the -from-tasty tests. As this is unrelated to the public API I left it for a second PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also left the comment above to not forget to remove this

@nicolasstucki nicolasstucki merged commit add696a into scala:master Nov 10, 2020
@nicolasstucki nicolasstucki deleted the remove-tasty-loading-workarounds branch November 10, 2020 15:09
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
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