fix: compile warnings - #36
Open
SmilingPixel wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets build/compile warning cleanup and small logic simplifications across the MarkDay Compose Multiplatform codebase, including Gradle/KMP settings adjustments and minor Kotlin code cleanups in persistence and sync/export paths.
Changes:
- Adjusts Kotlin Multiplatform/Gradle settings (disable default hierarchy template; add
-Xexpect-actual-classescompiler arg). - Updates Room persistence mapping for diary entry dates (epoch-days handling).
- Simplifies JVM export directory selection flow and Google Drive authorization code.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
gradle.properties |
Disables default KMP hierarchy template; normalizes enableIos property line. |
composeApp/build.gradle.kts |
Adds -Xexpect-actual-classes to Kotlin compiler args for the module. |
composeApp/src/nonWebMain/kotlin/io/github/smiling_pixel/database/DiaryDaoImpl.kt |
Changes persisted entryDate mapping to use toEpochDays() directly (needs type fix). |
composeApp/src/jvmMain/kotlin/io/github/smiling_pixel/sync/DiaryEntryExport.jvm.kt |
Reworks null handling around directory selection to avoid !!. |
composeApp/src/jvmMain/kotlin/io/github/smiling_pixel/client/GoogleDriveClient.kt |
Simplifies authorize() by removing redundant credential-null branch. |
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/screens/EntryDetailsScreen.kt |
Removes one !! in timestamp rendering (currently breaks nullability/compilation). |
Comments suppressed due to low confidence (2)
composeApp/src/nonWebMain/kotlin/io/github/smiling_pixel/database/DiaryDaoImpl.kt:69
RoomDiaryEntry.entryDateis aLong, butLocalDate.toEpochDays()returns anInt. This assignment won’t compile without converting toLong.
entry.content,
createdAt = entry.createdAt.toEpochMilliseconds(),
updatedAt = entry.updatedAt.toEpochMilliseconds(),
entryDate = entry.entryDate.toEpochDays(),
),
composeApp/src/nonWebMain/kotlin/io/github/smiling_pixel/database/DiaryDaoImpl.kt:83
RoomDiaryEntry.entryDateis aLong, butLocalDate.toEpochDays()returns anInt. This assignment won’t compile without converting toLong.
entry.content,
createdAt = entry.createdAt.toEpochMilliseconds(),
updatedAt = entry.updatedAt.toEpochMilliseconds(),
entryDate = entry.entryDate.toEpochDays(),
),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces several improvements and minor fixes across the codebase, focusing on build configuration, database handling, and code simplification. The most significant changes include updates to the Kotlin Multiplatform and Gradle build settings, corrections to database date handling, and code simplification in file export and Google Drive client logic.