Skip to content

Tweak ANSI color output #230

Merged
olafurpg merged 5 commits into
scip-code:mainfrom
olafurpg:moped-no-color
May 24, 2021
Merged

Tweak ANSI color output #230
olafurpg merged 5 commits into
scip-code:mainfrom
olafurpg:moped-no-color

Conversation

@olafurpg

Copy link
Copy Markdown
Contributor

Previously, lsif-java used default color output settings when shelling out to Maven and Gradle. Now, lsif-java uses --batch-mode for Maven and TERM=dumb for Gradle to reduce ANSI color output (helpful for CI logs). Additionally, we upgrade to the latest moped release so that setting NO_COLOR=true disables all ANSI colors (including output from lsif-java).

The motivation for this PR was to reduce noise in the Sourcegraph auto-indexing CI logs, which currently render ANSI escape codes.

olafurpg added 4 commits May 24, 2021 10:34
This version includes a fix so that `NO_COLOR=true` should be properly
respected now.
This flag has existed longer than `--no-transfer-progress` and it
achieves roughly the same effect (removes verbose output)
This disables progress bars that produce verbose console output.
@olafurpg olafurpg requested a review from Strum355 May 24, 2021 08:37
@olafurpg olafurpg self-assigned this May 24, 2021

@Strum355 Strum355 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if you wanna disable it only when we set NO_COLOR, so we can still get colour when running in an interactive term 🙂 but thats up to you, just a thought

Previously, the tests assumed that the output from Gradle/Maven went
straight to `System.{out,error}`. Now, the output goes through Moped and
it gets captured for testing purposes.
@olafurpg

Copy link
Copy Markdown
Contributor Author

@Strum355 I thought about it but it didn't feel worth the development effort. Most users run lsif-java in CI and I think it makes sense to enable --batch-mode and TERM=dumb by default out of the box

@olafurpg olafurpg merged commit 3d2b21c into scip-code:main May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants