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

Generic mechanism to turn specific deprecation warnings into errors #24588

Open
ZakTaccardi opened this issue Mar 31, 2023 · 1 comment
Open
Labels
a:feature A new functionality in:problems problems api in:work-validation task validation, warnings, disable optimizations

Comments

@ZakTaccardi
Copy link

ZakTaccardi commented Mar 31, 2023

When migrating from 7.x to 8.x, a big chance was that implicit dependencies (docs) go from warnings to errors.

As this was a known upcoming change, it would have been really nice to be able to turn those warnings into errors while we were still on 7.x to ensure a smooth migration to 8.0.

But because Gradle does not support this, I accidentally wrote some new gradle code that had implicit dependency issues without realizing it.

The ability to generically opt in to turn any warning into an error would be very useful! Something like this:

org.gradle.deprecations.implicitDependencies=error # default would be warn

If Gradle internally builds a system where every deprecation warning -> error like this had a key (implicitDependencies above), then this pattern could be extensible and make future breaking changes easier to opt into early.

org.gradle.deprecations.xxx=error
org.gradle.deprecations.somethingThatWillBecomeAnErrorInGradle9=error

Ultimately, the goal here with a feature like this is to make it easy to avoid having to wait until 8.0 (or 9.0 in the future) to address these issues.

Configuration Cache

This is a side note, but being able to leverage org.gradle.unsafe.configuration-cache=true before it was ready was very useful to ensure that our codebase is and stays compatible with the configuration cache. As far as I know, there is no way to do this for generic warnings that become errors.

@ZakTaccardi ZakTaccardi added a:feature A new functionality to-triage labels Mar 31, 2023
@ov7a ov7a added in:problems problems api in:work-validation task validation, warnings, disable optimizations and removed to-triage labels Apr 3, 2023
@ov7a
Copy link
Member

ov7a commented Apr 3, 2023

Thank you for your interest in Gradle!

This feature request is in the backlog of the relevant team but this area of Gradle is currently not a focus one so it might take a while before it gets implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:problems problems api in:work-validation task validation, warnings, disable optimizations
Projects
None yet
Development

No branches or pull requests

2 participants