-
Notifications
You must be signed in to change notification settings - Fork 78
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
Migrate to jline3 #2063
Merged
Merged
Migrate to jline3 #2063
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mostly: only do stuff with the terminal when really needed, don't flash the cursor everytime. Don't remove the progressbar for every incoming write
33d2ec9
to
fa645ec
Compare
Years reflect if the file was new or came from the previous REPL implementation
sungshik
approved these changes
Jan 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an impressive amount of work! Very nice improvements 🙂. Replacing streams with writers looks good: cleaner and less code. Regarding my comments:
- Most of them are nits
- I turned on full pedantic mode a few times to add suggestions for user-facing messages (and a few typos in comments). It's hopefully easy to batch them using the corresponding button and quickly be done with them.
- The bigger things (but non-essential) to consider, are related to moving code to more general, REPL-unspecific packages (e.g., I imagine we might want to reuse the completers in IDEs as well). See the comments for details.
- I don't have a separate comment for this, but I've been seeing some
null
arguments and returns occasionally, and also some checker annotations, but not consistently everywhere I think? This could be something to improve (but not necessarily in this PR). - Some of the deeper details of the implementation were a bit hard for me to get a good feel for (e.g., sequences of jline invocations; the way in which the progress bar is manipulated). I haven't seen anything obviously wrong with it, but it's very well possible I might have missed something in those code fragments.
Thanks Sung 👍🏽 Co-authored-by: sungshik <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates the REPL to jline3, numerous issues are solved, but it also required a redesign of all the REPL classes.
This breaks some stuff, which could not be avoided. The most noticeble is that all Input&OutputStreams were removed from the evaluator. That was (in hindsight) not a good design choice, as they are about bytes, while we want to print text. This gets messy when we have to figure out which charset we should write to the stream.
Todo's:
main