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

Fix arrow behaviour in REPLs when using sbt 1.4.x #26

Open
inkytonik opened this issue Jan 12, 2021 · 6 comments
Open

Fix arrow behaviour in REPLs when using sbt 1.4.x #26

inkytonik opened this issue Jan 12, 2021 · 6 comments
Assignees
Labels
bug Something isn't working Component: extras Relating to the extras library

Comments

@inkytonik
Copy link
Owner

inkytonik commented Jan 12, 2021

Since 2.4.0 it seems that back arrow moves the cursor backwards but erases the skipped-over character on the screen (but not in the input). This makes line editing basically impossible because you can't see what you are doing.

Reproduce with

extras/Test/runMain org.bitbucket.inkytonik.kiama.example.lambda.Lambda

then enter some text, back arrow over some of it. You will see spaces where the skipped-over characters should be.

@inkytonik inkytonik self-assigned this Jan 12, 2021
@inkytonik
Copy link
Owner Author

Presumably related to JLIne. Move to JLine 3 while we're at it?

@inkytonik
Copy link
Owner Author

It seems that JLine3 causes more problems than it's worth. Also, sbt seems to still be on JLine2 for most Scala versions, so it's easier if we stay there too.

@inkytonik
Copy link
Owner Author

Ok, new information. If we run the Lambda program mentioned above outside sbt (i.e., by extracting the CLASSPATH and running java with that CLASSPATH directly), everything is fine. This suggests that the problem is due to interaction between sbt's use of JLine and Kiama's.

In Kiama 2.4.0 we are still using JLine2, but sbt as of 1.4.0 moved to JLine3. The approach that Kiama previously used to interoperate nicely with sbt is no longer working properly.

Ideally, we should move to JLine3 to get the latest and greatest, but also work out a way to make it interoperate with sbt again.

@inkytonik
Copy link
Owner Author

It seems that everything is ok on Linux (or at least one version of Linux). So maybe this is a Mac-specific thing.

@inkytonik
Copy link
Owner Author

A workaround is to stay with sbt 1.3.x which works fine with Kiama 1.4.0.

@inkytonik inkytonik changed the title Fix arrow behaviour in REPLs Fix arrow behaviour in REPLs when using sbt 1.4.x Jan 18, 2021
@inkytonik inkytonik added bug Something isn't working Component: extras Relating to the extras library labels Jun 28, 2021
@inkytonik
Copy link
Owner Author

Using a backspace character (control-H) works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Component: extras Relating to the extras library
Projects
None yet
Development

No branches or pull requests

1 participant