Skip to content

Remove scalaShadowing from the compiler #10708

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
Dec 9, 2020

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Dec 8, 2020

This is the first step towards fixing #10707

@nicolasstucki nicolasstucki force-pushed the remove-scala-shadowing branch from 1a4e9e3 to 3a02ac2 Compare December 8, 2020 19:59
@nicolasstucki nicolasstucki marked this pull request as ready for review December 8, 2020 21:09
@nicolasstucki nicolasstucki requested a review from smarter December 8, 2020 21:09
Comment on lines 1231 to 1232
// if the scala.compiletime package is missing, the dotty library must be missing
(prefix.symbol.owner == defn.RootClass && prefix.name == nme.scala && selector == nme.compiletime)
Copy link
Member

Choose a reason for hiding this comment

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

This isn't really useful, the point of checking for scalaShadowing before is that we explicitly force it when starting the compiler, but the same isn't true for scala.compiletime, so there is no reason to special-case it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we force something in the dotty library to be able to detect if it is not on the classpath. Or should we drop the check and just fail with a random non existent symbol error?

Copy link
Member

Choose a reason for hiding this comment

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

I would drop the check for now, we want to avoid cascade of errors when symbols are missing, but this should be achievable without special casing dotty-library

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 dropped the check

@nicolasstucki nicolasstucki force-pushed the remove-scala-shadowing branch from 3a02ac2 to 24eb6cf Compare December 9, 2020 08:21
@nicolasstucki nicolasstucki requested a review from smarter December 9, 2020 09:32
@@ -16,7 +16,9 @@ class MissingCoreLibTests {
val reporter = Main.process(options)
assertEquals(1, reporter.errorCount)
val errorMessage = reporter.allErrors.head.message
assertTrue(errorMessage.contains("Make sure the compiler core libraries are on the classpath"))
// FIXME: We currently only detect if the scala library is missing but not the dotty library.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will open an issue referencing this once it is merged

@nicolasstucki nicolasstucki linked an issue Dec 9, 2020 that may be closed by this pull request
@nicolasstucki nicolasstucki merged commit a9bd274 into scala:master Dec 9, 2020
@nicolasstucki nicolasstucki deleted the remove-scala-shadowing branch December 9, 2020 12:16
@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.

Remove D_u_m_m_y.scala from the stdlib
3 participants