Enable strict compiler warnings and fix compilation issues#3
Merged
Conversation
- Change var to val for metadata in DownloadCoordinator.executeDownload (never reassigned) - Remove unused lastError variable in DownloadCoordinator.downloadWithRetry - Remove unused return value assignment from downloadSegments call - Remove unused NSFileSize import in iOS FileAccessor - Remove redundant PartialContent check and unused HttpStatusCode import in KtorHttpEngine https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF
Configures the Kotlin compiler to treat all warnings as errors across all subprojects, ensuring code warnings are caught at build time. https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF
Contributor
- TimeProvider: Replace deprecated @ExperimentalTime opt-in with stable kotlinx.datetime.Clock (already a project dependency) - DownloadRequest: Remove @ExperimentalUuidApi opt-in since Uuid is stable in Kotlin 2.3.0 These produced deprecation/unnecessary opt-in warnings which are now errors due to allWarningsAsErrors. https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF
Suppresses the expect/actual classes warning for KMP modules that use expect class declarations (e.g., FileAccessor). https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF
Configures compiler-level opt-in so individual source files don't need @OptIn annotations for these experimental APIs. https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF
The ExperimentalTime opt-in is already configured globally in the root build script. https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF
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
This PR enables strict Kotlin compiler settings to treat all warnings as errors across all subprojects, and fixes the resulting compilation warnings.
Key Changes
allWarningsAsErrors = trueto Kotlin compilation tasks in all subprojects to enforce stricter code quality standardsvar metadatatoval metadatainstartDownload()since it's never reassignedlastErrorvariable fromexecuteDownloadWithRetry()metadatain the retry loopNSFileSizeHttpStatusCodePartialContentconditionImplementation Details
The compiler now enforces that all warnings must be resolved, improving code quality and maintainability. All changes are minimal and focused on removing unused variables and imports while maintaining existing functionality.
https://claude.ai/code/session_01S8MTGDRyF33yD1HegbWbPF