chore: stop reporting removal warnings for test sources - #25825
Open
totally-not-ai[bot] wants to merge 1 commit into
Open
totally-not-ai[bot] wants to merge 1 commit into
totally-not-ai[bot] wants to merge 1 commit into
Conversation
Tests keep calling APIs that are deprecated for removal on purpose, so the removal lint only adds noise there: of the 309 warnings a build of flow-server, flow-data and flow-html-components printed, 186 came from src/test. The lint stays on for src/main, where such a call is a real finding.
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test code calls deprecated-for-removal APIs on purpose, so the compiler's removal warnings there are just noise. This turns those warnings off for test sources only.
What changed
<testCompilerArgument>-Xlint:-removal</testCompilerArgument>to the sharedmaven-compiler-pluginconfiguration in the rootpom.xml, sosrc/testno longer reports removal warnings.src/mainis untouched: calling a deprecated-for-removal API in production code still warns, because that is a real finding.This is a build-only change. No behavior change for users of Flow, and no source changes — it only makes build output quieter. For reference, a build of flow-server, flow-data and flow-html-components printed 309 removal warnings, 186 of them from test sources.