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

REPL goes through a phase #15663

Merged

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Jul 13, 2022

An initial parser phase is a no-op but lets users see their snippet.

A repl phase performs code wrapping.

Repl State is attached to the compilation unit tree.

Fixes #13835

@som-snytt som-snytt force-pushed the issue/13885-repl-parser-more-phaselike branch 2 times, most recently from 6add4c6 to 592f228 Compare July 13, 2022 17:46
@som-snytt
Copy link
Contributor Author

Oh man, red ❌ ? It's literally "just a phase"!

An initial parser phase is a no-op but lets users see their snippet.

A repl phase performs code wrapping.

Repl `State` is attached to the compilation unit tree.
@som-snytt som-snytt force-pushed the issue/13885-repl-parser-more-phaselike branch from 592f228 to 5f4653d Compare July 15, 2022 15:16
@som-snytt som-snytt marked this pull request as ready for review July 15, 2022 17:22
@mbovel mbovel requested a review from dwijnand July 18, 2022 13:13
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

OK. Took me a while to wrap my head around the changes you'd done, but I'm happy to go with this. Thanks for fixing the Vprint!

@dwijnand dwijnand merged commit 62ca3fc into scala:main Jul 26, 2022
@som-snytt
Copy link
Contributor Author

To comment more, I previously did something similar for scala 2 REPL, where instead of "pre-wrapping" or "pre-packaging", a phase does that work. That was pre-empted by the "repl frontend" refactor. But I hope it helps with future innovation by looser coupling of concerns.

@som-snytt som-snytt deleted the issue/13885-repl-parser-more-phaselike branch July 26, 2022 16:50
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 2, 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.

in REPL, -Vprint should support the new "parser" phase
3 participants