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

Provide an option for disabling errorprone for a smoother dev experience #3380

Merged
merged 2 commits into from
Jul 9, 2021

Conversation

jkwatson
Copy link
Contributor

@jkwatson jkwatson commented Jul 8, 2021

Just -PdisableErrorProne=true or put it in your personal gradle.properties file.

tasks {
withType<JavaCompile>().configureEach {
with(options) {
errorprone {
enabled = (disableErrorProne != "true")
Copy link
Contributor

Choose a reason for hiding this comment

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

We had an issue in build scripting once of comparing a boolean to the string "true" cause issues so want to stop this admittedly lazy pattern that you might have copied from the other repo.

open-telemetry/opentelemetry-java-instrumentation#3530

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what was the issue that PR solved? Trying to understand how it would end up a boolean and not as a string...

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the problem is properties are Object, not String

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right. In this particular narrow case it probably doesn't matter much, since it's a string if you put it on the command line or in your gradle.properties, but there's no reason not to be extra careful about it anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

one difference between the impl over in the instrumentation repo is that you're pulling from gradle.startParameters.projectProperties and I'm pulling from properties. Yours is actually a String, whereas mine is an Object, so I don't have a toBoolean() method unless I cast it to a String.

Why did you pull from startParameters, btw? When I used that pattern, it didn't seem to pick up my personal gradle.properties in the .gradle directory in my home directory, where as just using properties directly did.

@jkwatson jkwatson merged commit f83b780 into open-telemetry:main Jul 9, 2021
@jkwatson jkwatson deleted the disable_errorprone branch July 9, 2021 15:57
This was referenced Dec 19, 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.

3 participants