Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

REPL: Don't crash if completions throw #16687

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

dwijnand
Copy link
Member

No description provided.

@SethTisue
Copy link
Member

seems good to me — we reallllly don't want the entire JVM to die just because something went wrong trying to tab-complete some incorrect (or even correct) code

@dwijnand dwijnand marked this pull request as ready for review January 14, 2023 10:38
@dwijnand dwijnand requested a review from som-snytt January 14, 2023 10:38
Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

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

I've already forgotten if NonFatal includes ControlThrowable.

@som-snytt
Copy link
Contributor

I might have expected typeCheck().flatMap(t => Try(complete).toEither) but that would also require flatmapping the result to a diagnostic in the failure case.

@dwijnand dwijnand merged commit 07af300 into scala:main Jan 14, 2023
@dwijnand dwijnand deleted the repl/dont-crash-if-completions-throw branch January 14, 2023 14:55
@Kordyjan Kordyjan added this to the 3.3.0 milestone Aug 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tab complete on classOf[Foo] assertion failed (AndType.apply of HKTypeLambda)
4 participants