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

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

Closed
vmishenev opened this issue Oct 19, 2023 · 1 comment · Fixed by #3390 or #3465
Closed

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

vmishenev opened this issue Oct 19, 2023 · 1 comment · Fixed by #3390 or #3465
Assignees
Labels
enhancement An issue for a feature or an overall improvement topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Milestone

Comments

@vmishenev
Copy link
Contributor

vmishenev commented Oct 19, 2023

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.

@vmishenev vmishenev added the topic: K2 Issues / PRs that are related to the K2 migration. See #2888 label Oct 19, 2023
@vmishenev vmishenev changed the title Add a check that source roots do not intersect [K2] Add a check that source roots do not intersect Oct 19, 2023
@vmishenev vmishenev added the enhancement An issue for a feature or an overall improvement label Oct 19, 2023
@IgnatBeresnev
Copy link
Member

Filed an issue to have this check added in KGP as well: https://youtrack.jetbrains.com/issue/KT-62829/Add-a-check-that-two-source-sets-cannot-have-the-same-file-system-directory

But Dokka should also have it because it's possible to misconfigure it manually in CLI and Maven runners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Projects
None yet
2 participants