Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose Multiplatform #89

Merged
merged 60 commits into from
Oct 9, 2024
Merged

Compose Multiplatform #89

merged 60 commits into from
Oct 9, 2024

Conversation

DatL4g
Copy link
Contributor

@DatL4g DatL4g commented Mar 29, 2024

This is a (ongoing) refactoring to support Compose Multiplatform.
Will close #66 and #1

Done modules:

  • calendar
  • clock
  • color
  • core
  • date_time
  • duration
  • emoji (will only support Android and Desktop-JVM)
  • info
  • input
  • list
  • option
  • rating
  • state

Feel free to migrate any module yourself and create a PR.

Snapshot

Repository: maven("https://s01.oss.sonatype.org/content/repositories/snapshots")
Group: dev.datlag.sheets-compose-dialogs
Version: 2.0.0-SNAPSHOT

Testers are welcome

@maxkeppeler
Copy link
Owner

Amazing work so far! Thanks so much for pushing this topic!

@maicol07
Copy link

maicol07 commented May 7, 2024

@DatL4g I get this error when building for iOS:

error: org.jetbrains.kotlin.backend.konan.llvm.NativeCodeGeneratorException: Exception during generating code for following declaration:
Inside: FILE fqName:com.maxkeppeler.sheets.list fileName:/Users/runner/work/sheets-compose-dialogs/sheets-compose-dialogs/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListDialog.kt
@ExperimentalMaterial3Api
@Composable
@HiddenFromObjC
fun ListDialog(state: UseCaseState, selection: ListSelection, /* var / config: ListConfig?, / var / header: Header?, / var / properties: DialogProperties?, / var */ $composer: Composer?, $changed: Int, $default: Int) {
  // COMPOSITE {
  val config: Ref<ListConfig?> = Ref<ListConfig?>()
  config.<set-element>(<set-?> = config)
  // }
  // COMPOSITE {
  val header: Ref<Header?> = Ref<Header?>()
  header.<set-element>(<set-?> = header)
  // }
  // COMPOSITE {
  val properties: Ref<DialogProperties?> = Ref<DialogProperties?>()
  properties.<set-element>(<set-?> = properties)
  // }
  var $composer: Composer? = $composer
  $composer = $composer.startRestartGroup(key = -1242445907)
  var $dirty: Int = $changed
  // COMPOSITE {
  when {
    areEqualByValue(first = $default.and(other = 4).reinterpret<Int, Int>(), second = 0.reinterpret<Int, Int>()).not() -> { // BLOCK
      config.<set-element>(<set-?> = ListConfig(icons = // COMPOSITE {
      null.reinterpret<Nothing?, LibIcons?>()
      // }, $mask0 = 1, $marker = null))
      $dirty = $dirty.and(other = -897)
    }
  }
  when {
    areEqualByValue(first = $default.and(other = 8).reinterpret<Int, Int>(), second = 0.reinterpret<Int, Int>()).not() -> header.<set-element>(<set-?> = null)
  }
  when {
    areEqualByValue(first = $default.and(other = 16).reinterpret<Int, Int>(), second = 0.reinterpret<Int, Int>()).not() -> properties.<set-element>(<set-?> = DialogProperties(dismissOnBackPress = // COMPOSITE {
    false.reinterpret<Boolean, Boolean>()
    // }, dismissOnClickOutside = // COMPOSITE {
    false.reinterpret<Boolean, Boolean>()
    // }, usePlatformDefaultWidth = // COMPOSITE {
    false.reinterpret<Boolean, Boolean>()
    // }, $mask0 = 7, $marker = null))
  }
  DialogBase(state = state, properties = properties.<get-element>(), onDialogClick = // COMPOSITE {
  null
  // }, content = composableLambda(composer = $composer, key = 1718254212, tracked = true, block = { // BLOCK
    // COMPOSITE {
    // }
    $ListDialog$lambda$0$FUNCTION_REFERENCE$0($state = state, $selection = selection, $config = config, $header = header)
  }), $composer = $composer, $changed = 3072.or(other = #com_maxkeppeker_sheets_core_models_base_UseCaseState$stable).or(other = 14.and(other = $dirty)).or(other = 112.and(other = $dirty.shr(bitCount = 9))), $default = 4)
  // }
  { // BLOCK
    { // BLOCK
      val tmp0_safereceiver: ScopeUpdateScope? = $composer.endRestartGroup()
      when {
        EQEQEQ(arg0 = tmp0safereceiver.reinterpret<ScopeUpdateScope?, Any?>(), arg1 = null) -> null
        true -> tmp0safereceiver.updateScope(block = { // BLOCK
          // COMPOSITE {
          // }
          $ListDialog$lambda$1$FUNCTIONREFERENCE$1($state = state, $selection = selection, $config = config, $header = header, $properties = properties, $$changed = $changed, $$default = $default)
        })
      }
    }
  }
  return theUnitInstance()
}

at org.jetbrains.kotlin.backend.konan.llvm.NativeCodeGeneratorException$Companion.wrap(IrToBitcode.kt:65)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$FileScope.wrapException(IrToBitcode.kt:2148)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$FileScope.wrapException(IrToBitcode.kt:2131)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitFile(IrToBitcode.kt:3351)

at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:180)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitFile(IrToBitcode.kt:244)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitFile(IrToBitcode.kt:244)

at org.jetbrains.kotlin.ir.declarations.IrFile.accept(IrFile.kt:28)

at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.acceptChildren(IrModuleFragment.kt:39)

at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptChildrenVoid(IrVisitors.kt:15)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:475)

at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:116)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:244)

at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:244)

at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.accept(IrModuleFragment.kt:33)

at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptVoid(IrVisitors.kt:11)

at org.jetbrains.kotlin.backend.konan.driver.phases.BitcodeGenerationKt.CodegenPhase$lambda$2(BitcodeGeneration.kt:76)

at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$3.phaseBody(PhaseBuilders.kt:93)

at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$3.phaseBody(PhaseBuilders.kt:81)

at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:226)

at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:113)

at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase(Machinery.kt:139)

at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase$default(Machinery.kt:130)

at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runCodegen(TopLevelPhases.kt:386)

at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runBackendCodegen(TopLevelPhases.kt:329)

at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.compileModule(TopLevelPhases.kt:261)

at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runBackend$lambda$11$runAfterLowerings(TopLevelPhases.kt:114)

at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runBackend(TopLevelPhases.kt:139)

at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.produceObjCFramework(DynamicCompilerDriver.kt:76)

at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.run$lambda$2$lambda$1$lambda$0(DynamicCompilerDriver.kt:42)

at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion$startTopLevel$topLevelPhase$1.phaseBody(Machinery.kt:98)

at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion$startTopLevel$topLevelPhase$1.phaseBody(Machinery.kt:92)

at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:226)

at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:113)

at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion.startTopLevel(Machinery.kt:105)

at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.run(DynamicCompilerDriver.kt:36)

at org.jetbrains.kotlin.backend.konan.KonanDriver.run(KonanDriver.kt:129)

at org.jetbrains.kotlin.cli.bc.K2Native.runKonanDriver(K2Native.kt:152)

at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:69)

at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:36)

at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)

at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)

at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)

at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:79)

at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:43)

at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:180)

at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithRenderer$lambda$2(K2Native.kt:189)

at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:22)

at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:16)

at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithRenderer(K2Native.kt:188)

at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithXcodeRenderer(K2Native.kt:207)

at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMainWithXcodeRenderer$1.invoke(main.kt:52)

at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMainWithXcodeRenderer$1.invoke(main.kt:52)

at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:20)

at org.jetbrains.kotlin.cli.utilities.MainKt.inProcessMain(main.kt:57)

at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMainWithXcodeRenderer(main.kt:52)

at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

at java.base/java.lang.reflect.Method.invoke(Method.java:580)

at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:208)

at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:142)

at org.jetbrains.kotlin.compilerRunner.KotlinNativeToolRunner.run(nativeToolRunners.kt:153)

at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink$compile$1.invoke(KotlinNativeLink.kt:444)

at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink$compile$1.invoke(KotlinNativeLink.kt:392)

at org.jetbrains.kotlin.compilerRunner.ReportUtilsKt.addBuildMetricsForTaskAction(reportUtils.kt:261)

at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeLink.kt:392)

at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

at java.base/java.lang.reflect.Method.invoke(Method.java:580)

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)

at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)

at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)

at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)

at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:247)

at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)

at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)

at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)

at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)

at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)

at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)

at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)

at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)

at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:232)

at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:215)

at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:198)

at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:165)

at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)

at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)

at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)

at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)

at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)

at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)

at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)

at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)

at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)

at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)

at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)

at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)

at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)

at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)

at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)

at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)

at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)

at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)

at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)

at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)

at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)

at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)

at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)

at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:64)

at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:42)

at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)

at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)

at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:189)

at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)

at org.gradle.internal.Either$Right.fold(Either.java:175)

at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)

at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)

at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)

at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)

at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)

at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:76)

at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:54)

at java.base/java.util.Optional.orElseGet(Optional.java:364)

at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)

at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)

at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)

at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)

at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)

at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)

at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)

at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)

at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:106)

at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)

at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)

at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)

at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.executeWithNonEmptySources(AbstractSkipEmptyWorkStep.java:125)

at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:61)

at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:36)

at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)

at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)

at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)

at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:75)

at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:41)

at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.lambda$execute$0(AssignMutableWorkspaceStep.java:35)

at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:292)

at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:31)

at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:22)

at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:40)

at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)

at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:66)

at java.base/java.util.Optional.orElseGet(Optional.java:364)

at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:66)

at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:38)

at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:36)

at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:26)

at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)

at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)

at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:61)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:145)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:134)

at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)

at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)

at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)

at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)

at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)

at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)

at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)

at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)

at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)

at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)

at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)

at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)

at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)

at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)

at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)

at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)

at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)

at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)

at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)

at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)

at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)

at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)

at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)

at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)

at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)

at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)

at java.base/java.lang.Thread.run(Thread.java:1583)

Caused by: java.lang.IllegalStateException: FIELD name:com_maxkeppeker_sheets_core_models_base_UseCaseState$stable type:kotlin.Int visibility:public [final,static]
    at org.jetbrains.kotlin.backend.konan.llvm.LlvmDeclarations.forStaticField(LlvmDeclarations.kt:53)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.staticFieldPtr(IrToBitcode.kt:1871)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateGetField(IrToBitcode.kt:1767)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression(IrToBitcode.kt:983)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression$default(IrToBitcode.kt:971)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExplicitArgs(IrToBitcode.kt:2366)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateCall(IrToBitcode.kt:2237)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression(IrToBitcode.kt:975)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression$default(IrToBitcode.kt:971)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExplicitArgs(IrToBitcode.kt:2366)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateCall(IrToBitcode.kt:2237)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression(IrToBitcode.kt:975)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression$default(IrToBitcode.kt:971)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExplicitArgs(IrToBitcode.kt:2366)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateCall(IrToBitcode.kt:2237)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression(IrToBitcode.kt:975)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression$default(IrToBitcode.kt:971)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExplicitArgs(IrToBitcode.kt:2366)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateCall(IrToBitcode.kt:2237)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression(IrToBitcode.kt:975)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateContainerExpression(IrToBitcode.kt:2215)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression(IrToBitcode.kt:991)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.evaluateExpression$default(IrToBitcode.kt:971)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.generateStatement(IrToBitcode.kt:1012)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.generateStatement$default(IrToBitcode.kt:1010)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitFunction(IrToBitcode.kt:888)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitSimpleFunction(IrElementVisitorVoid.kt:144)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitSimpleFunction(IrToBitcode.kt:244)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitSimpleFunction(IrElementVisitorVoid.kt:140)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitSimpleFunction(IrToBitcode.kt:244)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitSimpleFunction(IrToBitcode.kt:244)
    at org.jetbrains.kotlin.ir.declarations.IrSimpleFunction.accept(IrSimpleFunction.kt:36)
    at org.jetbrains.kotlin.ir.declarations.IrFile.acceptChildren(IrFile.kt:34)
    at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptChildrenVoid(IrVisitors.kt:15)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitFile$lambda$41$lambda$40(IrToBitcode.kt:606)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.runAndProcessInitializers(IrToBitcode.kt:455)
    at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitFile(IrToBitcode.kt:605)
    ... 186 more

@DatL4g
Copy link
Contributor Author

DatL4g commented May 7, 2024

@maicol07 what is your building step exactly?
When you compile an iOS application or just the library? As my library release build went fine.

However let's put this in backlog as long as compose 1.6.10 and kotlin 2.0.0 is not released yet, as both is a requirement.

@maicol07
Copy link

maicol07 commented May 7, 2024

I'm building my iOS app that uses the library. I'm currently using the latest compose 1.6.10-rc01 and kotlin 2.0.0-rc2

@maicol07
Copy link

@DatL4g can you build and push a new version with the latest compose that seems to fix the error I get?
https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.6.10-rc03

Related issue: JetBrains/compose-multiplatform#4809

@DatL4g
Copy link
Contributor Author

DatL4g commented May 17, 2024

@maicol07 I published a new release.

Keep in mind that Snapshot releases are time based so it's still 2.0.0-SNAPSHOT but you may need to clear your gradle cache if it's not detected & downloaded correctly.

@maicol07
Copy link

@maicol07 I published a new release.

Keep in mind that Snapshot releases are time based so it's still 2.0.0-SNAPSHOT but you may need to clear your gradle cache if it's not detected & downloaded correctly.

The issue has been fixed, although I had to add these lines to my gradle.properties:

kotlin.native.cacheKind=none
compose.kotlin.native.manageCacheKind=false

Since K2 and compose 1.6.10 are stable now, you should upgrade them in the lib.
Thank you for being so helpful!

@Nek-12
Copy link

Nek-12 commented Jul 7, 2024

@maxkeppeler,
Is this going to be merged or should we migrate to the fork from @DatL4g ?

@maxkeppeler
Copy link
Owner

maxkeppeler commented Aug 1, 2024

@maxkeppeler, Is this going to be merged or should we migrate to the fork from @DatL4g ?

I started reviewing, but since the PR is so large and my time is so limited, it will take a couple of weekends. Feel free to review it additionally. It's great to see this PR. Sorry that I'm not able to act quickly.

@maicol07
Copy link

maicol07 commented Oct 8, 2024

@DatL4g it seems iOS is crashing with the new Compose version: Release 1.7.0-rc01 · JetBrains/compose-multiplatform (github.com)

Can you fix it and publish a new snapshot? Probably only rebuilding it with the updated dependencies will work

Thanks

@DatL4g
Copy link
Contributor Author

DatL4g commented Oct 9, 2024

@maicol07 Updated the snapshot.

BTW you can just create a small PR next time if you want, then I just have to trigger the release

@maicol07
Copy link

maicol07 commented Oct 9, 2024

Great! Thanks

@maxkeppeler maxkeppeler merged commit 2af41f3 into maxkeppeler:main Oct 9, 2024
2 of 3 checks passed
@maxkeppeler
Copy link
Owner

Looks overall good. It's way too much to review, even if I have another year. Will do some view/dialog changes beginning next year - especially date-time is not acceptable as it is right now. Huge thanks to you for this amazing contribution.

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.

Support for Compose Multiplatform
4 participants