Skip to content

Improve handling of deprecated methods/classes in the REPL #4229

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

Closed
scabug opened this issue Feb 9, 2011 · 5 comments
Closed

Improve handling of deprecated methods/classes in the REPL #4229

scabug opened this issue Feb 9, 2011 · 5 comments

Comments

@scabug
Copy link

scabug commented Feb 9, 2011

= problem =
When using the REPL, deprecated methods/classes can only be noticed after using them.

warning: there were 1 deprecation warnings; re-run with -deprecation for details

= analysis =
It would be better if deprecated methods would be recognizable in tab-completion and in usage/while typing.

= enhancement recommendation =
Options to display deprecated methods/classes more clearly could be:

  • A "strike-through effect"
  • Some coloring (related to SI-4223)
  • Some marking like appending "(d)" in the tab completion

If that would work, it might be possible to consider dropping the "warning after usage" when running scala without "-deprecation"

@scabug
Copy link
Author

scabug commented Feb 9, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4229?orig=1
Reporter: @soc
Attachments:

@scabug
Copy link
Author

scabug commented Feb 9, 2011

@soc said:
Now

@scabug
Copy link
Author

scabug commented Feb 9, 2011

@soc said:
Proposal (Option 1)

@SethTisue
Copy link
Member

as of Scala 2.13.3, deprecated methods have a "(deprecated)" after them in tab completion:

Screen Shot 2020-12-08 at 7 57 22 PM

@SethTisue SethTisue self-assigned this Dec 9, 2020
@SethTisue
Copy link
Member

Ideally, deprecated methods would be presented last, in their own group. That may yet happen under #12272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants