-
Notifications
You must be signed in to change notification settings - Fork 339
Backport REPL changes for Swift REPL completion fix #678
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
Backport REPL changes for Swift REPL completion fix #678
Conversation
In some environments (typically, buildbots), this variable may not be available. This can cause tests to behave differently. Explicitly set the variable to "vt100" to ensure consistent test behavior. It should not matter that we do not inherit the process TERM variable, as the child process runs in a new virtual terminal anyway.
…ong result By using m_cursor_index and not m_raw_cursor_pos in this function we return the characters until the argument index (not the character index). This means that for "foo" (cursor at the end of the string) this returns "" instead of "foo" (as the argument index is 0 for the first argument and not 4 which is the character index at the end). This lead to a crash in the REPL completion where it would cause that we would complete the string "ABC" to " " as we think the line is actually empty and we want to provide the indentation string. Note that the function has already been deleted upstream so this bug doesn't exist there.
@fredriss has to approve this. |
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.
Thanks!
@swift-ci test |
@Teemperor are these commits upstream, and then cherry-picked? Doesn't look like it. |
[except for Pavel's] |
…tion code to old API Any REPL client should just move to CompletionRequest instead of relying on the translation code from the old API, so let's remove that translation code.
34c1027
to
43978f8
Compare
Now the PR has:
|
@swift-ci test macOS |
Alright, I'll merge this now and then check on the automerger and let's see how that goes. |
Please make sure to take those on the new stable branch |
Those are the non-swift changes for #679
Pavel's commit is a back port. The change to the REPL interface is a commit I'll push tomorrow and the fix for the CompletionRequest is a new commit for this branch (as I already deleted the wrong code upstream).