Skip to content

warn when running console instead of repl #19729

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 1 commit into from
Feb 24, 2024

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Feb 19, 2024

@lrytz lrytz requested a review from bishabosha February 19, 2024 10:11
Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

I'd prefer a more "in your face" warning, but this works

@lrytz
Copy link
Member Author

lrytz commented Feb 19, 2024

Happy to change it to whatever. There are plenty of emojis. Or make it an error?

@bishabosha
Copy link
Member

I tried something like this maybe

streams.value.log.warn(s"${BOLD}###################################################################$RESET")
streams.value.log.warn(s"${BOLD}#                                                                 #$RESET")
streams.value.log.warn(s"${BOLD}# `console` uses the reference Scala version. Use `repl` instead. #$RESET")
streams.value.log.warn(s"${BOLD}#                                                                 #$RESET")
streams.value.log.warn(s"${BOLD}###################################################################$RESET")

@lrytz
Copy link
Member Author

lrytz commented Feb 19, 2024

image

@bishabosha bishabosha enabled auto-merge February 19, 2024 14:42
@SethTisue
Copy link
Member

SethTisue commented Feb 24, 2024

LGTM — I think the warning is better than an error, as it might still sometimes be handy to use console to see how the reference compiler handles something.

Also yay ascii art.

@bishabosha bishabosha disabled auto-merge February 24, 2024 20:51
@bishabosha bishabosha merged commit 5e9e5e9 into scala:main Feb 24, 2024
@Kordyjan Kordyjan added this to the 3.4.2 milestone Mar 28, 2024
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.

5 participants