milosmns / code-stats

An opinionated, local analysis of team contributions similar to GitHub Insights

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix Kotlin/Native builds on MacOS

milosmns opened this issue · comments

What's the problem?

The Mac builds of Kotlin/Native started failing when some of the code was added. Unfortunately, it was too much code to be able to pinpoint what exactly the compiler throws up on.

⚠️ Update: here's the Jet Brains bug report.


Error 1

Here's the first error message that appeared early on:

 * Compiler version: 1.9.0
 * Output kind: PROGRAM

e: java.lang.IllegalStateException: IrClassPublicSymbolImpl
  for components.data/CodeReviewChange|null[0] is already bound:
  CLASS CLASS name:CodeReviewChange modality:FINAL
  visibility:public [data] superTypes:[utils.HasSimpleFormat]

You can see the full stacktrace in this Action output.


Error 2

The first error has not (yet) been fixed. However, with even more added code, here's the second error message that appeared recently:

 * Compiler version: 1.9.10
 * Output kind: PROGRAM

e: java.lang.IllegalStateException: Could not resolveFakeOverride()
  for FUN FAKE_OVERRIDE name:URLSession visibility:public 
  modality:OPEN <> 
  
  (
    $this:platform.Foundation.NSURLSessionTaskDelegateProtocol,
    session:platform.Foundation.NSURLSession,
    task:platform.Foundation.NSURLSessionTask,
    needNewBodyStreamFromOffset:kotlin.Long{ platform.posix.int64_t },
    completionHandler:kotlin.Function1 
      <platform.Foundation.NSInputStream?, kotlin.Unit>
  )
  returnType:kotlin.Unit [fake_override]

You can see the full stacktrace in this Action output.


What should we do?

Let's fix that! 😄

It's still easy to reproduce, take a look at #12.
Worst case scenario, let's report a bug to Jet Brains and see if they can help.