Skip to content

fix: compile warnings - #36

Open
SmilingPixel wants to merge 6 commits into
mainfrom
fix/compile_warning_0720
Open

fix: compile warnings#36
SmilingPixel wants to merge 6 commits into
mainfrom
fix/compile_warning_0720

Conversation

@SmilingPixel

Copy link
Copy Markdown
Owner

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-classes compiler 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.entryDate is a Long, but LocalDate.toEpochDays() returns an Int. This assignment won’t compile without converting to Long.
                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.entryDate is a Long, but LocalDate.toEpochDays() returns an Int. This assignment won’t compile without converting to Long.
                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.

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.

2 participants