Skip to content
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

Disallow naming the root package, except for selections #18187

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Jul 11, 2023

References #18020, didn't actually fix that, because it addressed aspects of using _root_ in definitions. Adding more details to that ticket.
Fixes #17757
Fixes #18050
Includes the code in scala/bug#12508

Also eliminate allowRoot and rawTermIdent, and fix 12508 reference.
@som-snytt
Copy link
Contributor

Just to note that Scala 3 is so great with soft modifiers, that I don't see why _root_ isn't handled as in Scala 2, where _root_ is special only in a selection, and you also get a warning if _root_ does not mean _root_-ed path. That avoids both making it a keyword and accidental self-injury by users.

@dwijnand
Copy link
Member Author

Because I feel like it's entirely unnecessary - I think Scala 2 is trying too hard for no real reason.

@dwijnand dwijnand marked this pull request as ready for review July 14, 2023 15:45
@dwijnand dwijnand requested a review from smarter July 14, 2023 15:45
@dwijnand dwijnand assigned smarter and unassigned dwijnand Jul 14, 2023
@smarter smarter merged commit ca29cdc into scala:main Jul 14, 2023
17 checks passed
@dwijnand dwijnand deleted the disallow-root-name branch July 14, 2023 16:22
@Kordyjan Kordyjan added this to the 3.4.0 milestone Aug 1, 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.

Hygiene of _root_ in user definitions REPL crashing on standalone _root_ reference
4 participants