Skip to content

Separate spi loading and registry generation #74

@jangalinski

Description

@jangalinski

see

    val withIllegalContextType = serviceInstances.filterNot { it.contextType.isSubclassOf(contextTypeUpperBound) }

    require(withIllegalContextType.isEmpty()) {
      "All declarations of type `${KotlinCodeGenerationSpi.metaInfServices}` " +
        "must be a subclass of contextType=$contextTypeUpperBound, but " +
        "found ${withIllegalContextType.joinToString(", ")}."
    }

We found that when we use multiple generation contexts in parallel, we cannot do so because each single context fails hard for the illegal other contexts.

A good solution would be to keep the check as a default but allow disabling via toggle.

Metadata

Metadata

Assignees

Labels

Type: bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions