-
Notifications
You must be signed in to change notification settings - Fork 21
Optionally exclude deprecated elements from root imports #11347
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
Comments
may run afoul of scala/scala-dev#430 |
Under the
but short of that syntax, a helper option would be Any such option is just shorthand for a well-placed compilation unit that hides undesired members of the standard imports and introduces new elements available on a quasi-global basis. But the language mechanics of imports and name binding are unchanged. |
I see Eugene just asked for this convenience #11317 Someone wanted to hide |
Closing this enhancement because not a lot of interest in the space of custom context or code prelude. A REPL could provide these features as a convenience. A codebase can already disable root imports and construct a namespace with ordinary means in the language. |
A compiler option so that root imports exclude deprecated elements, such as
Stream
in 2.13.Root imports are necessarily privileged, as they intrude on all namespaces; this offers stricter quality control.
It would also be useful if the compiler could treat all deprecated elements as though they were already deleted, as the deprecator plugin did, but that is probably out of scope.
The text was updated successfully, but these errors were encountered: