Skip to content

clean up remaining build and compiler warnings - #3344

Merged
sosnovsky merged 8 commits into
masterfrom
issue_3339_Clean-up-remaining-build-and-compiler-warnings
Nov 18, 2026
Merged

sosnovsky merged 8 commits into
masterfrom
issue_3339_Clean-up-remaining-build-and-compiler-warnings

Conversation

@DenBond7

@DenBond7 DenBond7 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

This PR cleans up the remaining build and compiler warnings in app code, instrumentation tests, and the Gradle build scripts.

close #3339

  • Kotlin warnings: removed redundant null checks, !!, casts, and when branches. Fixed the sizeOf parameter name in EmbeddedAttachmentsProvider and the out field shadowing in ProgressOutputStream.
  • ComposeScreenDisallowUpdateRevokedKeyFlowTest: the "after lookup" check read the recipient from before the lookup. It now verifies the key stored after the lookup.
  • Replaced the grgit plugin with Gradle providers.exec for the commit id and branch name. checkCorrectBranch now checks the branch at execution time, so ./gradlew tasks --all no longer fails on non-master branches.
  • uiTests no longer uses initWith(debug). The shared settings live in a configureDebuggable() helper, which removes the AGP RES_VALUE_REPLACED warnings. Generated BuildConfig and resValues are unchanged.
  • Updated KSP to 2.3.14. It drops the deprecated Configuration.setVisible calls and fixes the 2.3.13 concurrency regression (KSP 2.3.13 regression: library symbols disappear during concurrent in-process executions google/ksp#3286).

Remaining warnings, left as is:

  • Safe Args 2.10.2 (latest) generates casts that rely on null for Parcelable args. It suppresses them as CAST_NEVER_SUCCEEDS, but K2 reports them as UNSAFE_CAST_RELYING_ON_NULL. These are generated files, and suppressing the diagnostic globally would also hide real cases in our code. A comment in build.gradle.kts documents this.
  • The deprecation marker for Toast assertions in BaseTest is intentional.
  • The allowBackup tools:replace is kept on purpose, to guard against libraries enabling backup. The ACRA authorities merger warning comes from the acra-core manifest.

Tests (delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities

Read the key from the recipient queried after lookup instead of reusing the pre-lookup record, so the assertion checks that the stored key remains revoked.
Read the commit hash and branch through providers.exec to avoid deprecated process execution during configuration while preserving the debug version suffix and release branch check.
…mpiler-warnings

# Conflicts:
#	FlowCrypt/build.gradle.kts
#	build.gradle.kts
@DenBond7
DenBond7 marked this pull request as ready for review November 17, 2026 19:12
@DenBond7
DenBond7 requested a review from sosnovsky as a code owner November 17, 2026 19:12

@sosnovsky sosnovsky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@sosnovsky
sosnovsky merged commit 3c2ac2d into master Nov 18, 2026
8 checks passed
@sosnovsky
sosnovsky deleted the issue_3339_Clean-up-remaining-build-and-compiler-warnings branch November 18, 2026 15:09
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.

Clean up remaining build and compiler warnings

2 participants