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

no new line before use of println #9

Open
joprice opened this issue Dec 15, 2021 · 4 comments
Open

no new line before use of println #9

joprice opened this issue Dec 15, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@joprice
Copy link

joprice commented Dec 15, 2021

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
@mrsarm
Copy link
Owner

mrsarm commented Feb 11, 2022

Sorry to not reply before, and yes, I'm aware of that error, some times not sure why it doesn't happens but most of the times it does.

The problem is Gradle and its pour support for managing I/O in the console, check this #2.

We were talking today in another issue how limited is to run JShell from Gradle and it would be ideal to run the process outside Gradle to solve this and other problems (#12 (comment)), but for now, I'm limited of time to work on it 😞 .

@mrsarm mrsarm added the bug Something isn't working label Feb 11, 2022
@appkr
Copy link

appkr commented Jul 24, 2023

Is it a same problem? Any workaround?

I used this version:

// build.gradle
plugins {
    id 'com.github.mrsarm.jshell.plugin' version '1.2.1'
}

The actual result differs from the expected:

$ rlwrap ./gradlew --no-daemon --console plain jshell

# Expected
jshell> new String("Hello");
$1 ==> "Hello"

# Actual
jshell> new String("Hello");
new String("Hello")$1 ==> "Hello"

While in a vanilla jshell:

$ jshell

jshell> new String("Hello");
$1 ==> "Hello"

@mrsarm
Copy link
Owner

mrsarm commented Jul 25, 2023

Hi @appkr , no, there is no workaround at the moment 😞

@appkr
Copy link

appkr commented Jul 26, 2023

@mrsarm Thanks for the clarification.

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

No branches or pull requests

3 participants