-
Notifications
You must be signed in to change notification settings - Fork 15
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
FR: harmonize GradleException
content between List and Tree
#79
Comments
🤔 . The reason why I printed it and then it's part of the exception is that I didn't know how to add color to the exception message, and I loved the color. Any tips here? |
I do too 🌈 But what I don't understand is why we need the same message in both stdout and as Gradle error. In the "tree" mode we only have it on the stdout (not in the Gradle error). Also, it seems you disabled to colors explicitely here: Lines 91 to 92 in c163524
|
Though it does not play nice with is some places where rich output is unsupported like here for instance: We might be able to ask Gradle what the current behavior is with this: https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_customizing_log_format or use Gradle's own internal |
Happy to accept a PR regarding this. I personally only use If you would like to update/improve the messaging for -- RE: Disable coloring Lines 91 to 92 in c163524
Because it's a plaintext string and not console output, it just looks like some crazy encoded characters if you don't do it that way unfortunately. |
Additionally I dislike the double messages, but now I remember why I did it: Also, if you want to just chat about any of this, feel free to message me on Slack (Kotlin, Gradle, or ASG). |
Ok, this makes more sense now. Then I guess there is no one solution fits all. Gradle's |
List and Tree modes throw different exception content.
Tree
List
As you can see, the List output contains the diff twice. Moreover, the colored diff output is generally hidden, and only the last bit appear, which is the
GradleException
message. (and the first line is different as well)Do you think we could harmonize this behavior?
dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/DependencyGuardTreeDiffer.kt
Lines 66 to 72 in 56ba80d
dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/list/DependencyGuardListTask.kt
Line 105 in 56ba80d
The text was updated successfully, but these errors were encountered: