Skip to content

[K2] Add a check that source roots do not intersect #3239

@vmishenev

Description

@vmishenev

Different source sets should have disjoint source roots.
Otherwise, it causes

Modules are inconsistent
org.jetbrains.kotlin.utils.exceptions.KotlinIllegalStateExceptionWithAttachments: Modules are inconsistent
	at org.jetbrains.kotlin.analysis.low.level.api.fir.file.builder.LLFirFileBuilder$buildRawFirFileWithCaching$1.invoke(LLFirFileBuilder.kt:56)

Reproducer: add two source sets with the same source root.

Note: It can complicate the StdLib setting.

Metadata

Metadata

Assignees

Labels

enhancementAn issue for a feature or an overall improvementtopic: K2Issues / PRs that are related to the K2 migration. See #2888

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions