vscode-gradle icon indicating copy to clipboard operation
vscode-gradle copied to clipboard

Gradle progress is truncated/cut off

Open badsyntax opened this issue 3 years ago • 1 comments

Gradle can't get the terminal size and so defaults to 80 columns when showing the progress output.

Screenshot 2020-10-20 at 08 42 34

This can be replicated easily:

const cp = require('child_process');

const p = cp.spawn('./gradlew', ['build', '--console=rich'], {
	cwd: __dirname,
	stdio: 'pipe'
});
p.stdout.on('data', (data) => {
  console.log(data.toString('utf8'));
});

I'd need to use a pseudo terminal instead, but can't use node-pty as it uses native modules which aren't suitable for vscode.

badsyntax avatar Oct 21 '20 20:10 badsyntax

From my testing using node-pty and setting the terminal width does solve this issue when running the wrapper script, but it does not solve the issue when using the tooling api.

I tested this by using note-pty via vscode window.createTerminal api. I put the following into the java server startscript:

stty rows 24 cols 3000
stty size

These command execute successfully within the pty (and not outside of a pty eg cp.spawn). This proves the shell has access to the terminal dimensions, but gradle is not picking this up. This suggests an issue with the tooling api.

Refs https://github.com/gradle/gradle/pull/8189

badsyntax avatar Oct 22 '20 09:10 badsyntax