Skip to content

[Analysis API] Ignore missing standalone binary roots#6506

Open
Maxerns wants to merge 1 commit into
JetBrains:masterfrom
Maxerns:master
Open

[Analysis API] Ignore missing standalone binary roots#6506
Maxerns wants to merge 1 commit into
JetBrains:masterfrom
Maxerns:master

Conversation

@Maxerns

@Maxerns Maxerns commented Jul 2, 2026

Copy link
Copy Markdown

Fixes KT-57715.

Standalone Analysis API could throw when a missing .jar/.klib
binary root was passed to the session builder, because the jar VFS was
queried before checking whether the path exists.

This skips missing archive roots before opening them through the jar
file system and adds a regression test for a missing binary jar root.

Tests:

  • ./gradlew :analysis:analysis-api-standalone:compileTestKotlin -q
  • ./gradlew :analysis:analysis-api-standalone:test --tests "org.jetbrains.kotlin.analysis.api.standalone.fir.test.cases.session.builder.StandaloneSessionBuilderTest.testMissingBinaryRootDoesNotCrashStandaloneSessionBuilder"

CC: Yan Zhulanow (@yanex) Marco Pennekamp (@marcopennekamp) Alexey Belkov (@abelkov) Dmitrii Gridin (@dimonchik0036) Oleg Makeev (@BlaBlaHuman)

Standalone Analysis API asks the IntelliJ jar file system for every archive root while building library roots. Missing jar paths can make that lookup throw before downstream tools get a chance to report their own classpath warning.

Skip missing archive roots before opening them through the jar file system, matching the graceful behavior expected by tools which intentionally pass unresolved classpath entries. Add a session builder regression test for a missing binary jar root.

^KT-57715 Fixed
@kotlin-safemerge

Copy link
Copy Markdown

Code Owners

RuleOwnersApproval
/​analysis/​
kotlin-analysis-api

UNASSIGNED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant