Skip to content

If for some reason we're missing java.lang.Object mapping during import, fail eagerly #195

Open
@ktoso

Description

@ktoso

Due to dependencies behaving weirdly in plugins the JavaKit dependency was not pulled unless more things were spelled out explicitly...

This resulted in a generated file like:

@JavaClass("org.apache.commons.io.FilenameUtils")
open class FilenameUtils {
  @JavaMethod
  @_nonoverride public convenience init(environment: JNIEnvironment? = nil)
}

which will fail to compile because we need the:

@JavaClass("org.apache.commons.io.FilenameUtils")
open class FilenameUtils: JavaObject {
  @JavaMethod
  @_nonoverride public convenience init(environment: JNIEnvironment? = nil)
}

form.

If we're ever generating code and we're missing JavaObject we should just immediately crash rather than hide the error futher along the build as it can be hard to diagnose what actually went wrong -- but it was a missing dependency on the swift-java file that declared java.lang.object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions