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: upgrade to JLine 3 (benefits include multi-line editing) #8036

Merged
merged 5 commits into from Mar 25, 2020

Commits on Mar 25, 2020

  1. Use JLine3

    Minimal changes to support new API,
    with basic completion and history.
    JLine handles continuation line edit.
    som-snytt authored and SethTisue committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    77c7c47 View commit details
    Browse the repository at this point in the history
  2. use newer JLine version

    the new features in 3.13 and 3.14 don't look especially
    interesting offhand, but maybe there's something cool
    I didn't spot, and we'll want all the bugfixes?
    
    and update IntelliJ stuff for new JLine & Jansi versions
    
    also update legal stuff.  JLine 3 is now BSD 3-clause not BSD.  and
    bring License.rtf up to date with LICENSE.md.  (apparently the MSI
    installer stuff needs the RTF version, sigh)
    
    and it's not strictly JLine related but while I was updating legal
    stuff I removed ScalaCheck since we currently neither in-source it nor
    ship it
    SethTisue committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    70ef446 View commit details
    Browse the repository at this point in the history
  3. JLine 3: history handling improvements

    use a different filename than we used with JLine 2, since the format
    is different (has timestamps) and because old files might have a
    different character encoding, we encountered that in testing
    
    also bring back code that restricts permissions on history file,
    this went missing during the upgrade
    SethTisue committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    328c5db View commit details
    Browse the repository at this point in the history
  4. JLine 3: be emacs friendly (adjust :completions support)

    based on review feedback from hvesalai
    SethTisue committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    2738c38 View commit details
    Browse the repository at this point in the history
  5. JLine 3: use JNA not Jansi

    Goal: avoid conflicting with sbt's own Jansi version
    
    Ref scala/scala-dev#678
    
    https://github.com/jline/jline3#jansi-vs-jna says
    
    > On the Windows platform, relying on native calls is mandatory, so
    > you need to have either Jansi or JNA library in your classpath along
    > with the `jline-terminal-jansi` or `jline-terminal-jna` jar.
    
    When I tested on Windows 7 or Windows 10 using `sbt console` I got
    "WARNING: Unable to create a system terminal, creating a dumb terminal
    (enable debug logging for more information)" and key input also didn't
    work. (This could be more to do with sbt). I am guessing that Jansi
    used by sbt itself maybe interfering with Jansi that gets loaded from
    the compiler. Normally these duplicates are resolved by creating a
    sandbox ClassLoader, but maybe it doesn't exactly work for native
    libraries loaded into the same process.
    
    additional changes by Seth:
    * change Jansi -> JNA in legal info, Intellij config
    
    Co-authored-by: Seth Tisue <seth@tisue.net>
    eed3si9n and SethTisue committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    712aff0 View commit details
    Browse the repository at this point in the history