Giter VIP home page Giter VIP logo

jshell-plugin's People

Contributors

arcesino avatar davidnavas avatar gregfenton avatar mrsarm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jshell-plugin's Issues

No Interactive Shell using Gradle 6.3 and JDK 14

Added the plugin in the following version:

id "com.github.mrsarm.jshell.plugin" version "1.0.0-RC1"

Running the command:

./gradlew --no-daemon build -x test --console plain jshell

Leads to it successfully building and starting JShell but i doesn't grant me interactive input and stops as "BUILD SUCCESSFUL" immediately after:

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.3/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing

> Configure project :
:jshell task :classes not found, be sure to compile the project first

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :bootJar UP-TO-DATE
> Task :jar SKIPPED
> Task :assemble UP-TO-DATE
> Task :check
> Task :build

> Task :jshell
|  Welcome to JShell -- Version 14
|  For an introduction type: /help intro

BUILD SUCCESSFUL in 11s
4 actionable tasks: 1 executed, 3 up-to-date

Some infos about my system:

➜  service java --version
openjdk 14 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
➜  service ✗ ./gradlew --version

------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------

Build time:   2020-03-24 19:52:07 UTC
Revision:     bacd40b727b0130eeac8855ae3f9fd9a0b207c60

Kotlin:       1.3.70
Groovy:       2.5.10
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          14 (Oracle Corporation 14+36-1461)
OS:           Mac OS X 10.15.3 x86_64

arrow key not work

jshell> int a = 100

when I type left arrow key, as follows

jshell> int a = 100^[[D

jshell version != JDK version

I've got everything in my project using Java17:

% echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/
% which java
/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/java
% which jshell
/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/jshell

Similarly, my build.gradle specifies Java17 in all the right places and if I call System.getProperty("java.version"), it prints "17.0.1".

But, when I run ./gradlew --console plain jshell, I get this:

...
> Task :jshell
|  Welcome to JShell -- Version 11.0.7
|  For an introduction type: /help intro

jshell> 

Is this configurable somewhere?

no new line before use of println

When writing to stdout using for instance System.out.println, the line is printed as appended to the end of the line, instead of on a new line of its own:

println(1)1

I would expect a new line after println:

println(1)
1

not working in Windows

hello

plugin is not working in Windows.

jshell is started, but there is no my classes around.

In windows, if classpath is sent as a one string, multiple dirs and jars are separated by the ; char, not by : char as in linux.

is this handled correctly in your plugin?

tab completion not working

Hi,

When starting the gradle jshell plugin, seems to print a regular tab, instead of triggering code completion. If I launch jshell directly, tab works fine.

I'm under linux, and tried to play with TERM variable a bit, but didn't succeed.

There might be something I'm missing. Could you help me, or point me to a resource to help me.

Thanks in advance

:jshell task :classes not found, be sure to compile the project first

Even when running

./gradlew --console plain classes jshell

I still get the message

:jshell task :classes not found, be sure to compile the project first

I haven't been able to figure out what could be causing this. Could you point me in the right direction?

I'm using Java 13.0.1 and Gradle 6.5 on macOS Catalina (10.15.4).

Non jar files should be excluded from the path sent to jshell

See the code
https://github.com/johnpoth/jshell-maven-plugin/blob/master/src/main/java/com/github/johnpoth/jshell/JShellMojo.java#L118

Recommended remediation for gradle plugin:
pathSet = pathSet.findAll{ it.isDirectory() || it.toString().endsWith('.jar') }
[prior to the join()]

Our specific problem is that hk2-jar (org.glassfish.ha/ha-api/3.1.12/*/ha-api-3.1.12.hk2-jar) is being pulled into our classpath, and it is not an actual jar file.

Command line editing?

Any thoughts or possible ways to get some form of command-line editing and/or history working with this?

I would love Emacs keys, but simply having the ability to up-arrow/down-arrow for history, and more importantly left-arrow/right-arrow for inline editing of the command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.