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

[Plugin] Add an option to fail on deprecated usages #2575

Merged
merged 5 commits into from
Sep 21, 2020

Conversation

martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented Sep 14, 2020

Add

apollo {
  warnOnDeprecatedUsages.set(true) // true by default
  failOnWarnings.set(true) // false by default
}

Fixes #2489

Using the w: $file: ($line, $column): $message format, intelliJ will display it nicely in the "Run" panel:

Screenshot 2020-09-14 at 11 57 09

Somehow the warnings are not clickable in the "Run" panel but are in the build output, not really sure how to make IntelliJ pick them up.

Also, this PR only checks deprecated fields usages. Checking for deprecated enums could be done too but that's more complex so will be done in a future PR.

Ping @kenyee, sorry it took so long, I wanted to get the multi-module PR in first to avoid too many conflicts.

@martinbonnin martinbonnin changed the title Feature 2489/fail on deprecated [Plugin] Add an option to fail on deprecated usages Sep 14, 2020
Copy link
Contributor

@tasomaniac tasomaniac left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. It's a great addition.

@martinbonnin martinbonnin changed the base branch from master to main September 16, 2020 09:53
@martinbonnin martinbonnin merged commit 344e60e into main Sep 21, 2020
@martinbonnin martinbonnin deleted the feature-2489/fail-on-deprecated branch September 21, 2020 14:04
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.

[Gradle plugin] add an option to fail compilation if a deprecated field is used
2 participants