Skip to content

Drop ZINC/SBT URI scheme and prune dead helpers#895

Merged
jupblb merged 2 commits into
mainfrom
michal/cleanup-indexer
Jun 2, 2026
Merged

Drop ZINC/SBT URI scheme and prune dead helpers#895
jupblb merged 2 commits into
mainfrom
michal/cleanup-indexer

Conversation

@jupblb
Copy link
Copy Markdown
Member

@jupblb jupblb commented Jun 2, 2026

Two small, independent cleanups that don't depend on any in-flight work.

Drop ZINC/SBT URI scheme

Scala/SBT support was dropped in #883, but the SBT-via-Zinc plumbing in the javac plugin lingered:

  • UriScheme.SBT (already @Deprecated) and UriScheme.ZINC
  • -build-tool:sbt argument parsing
  • vf://tmp/ URI handling in SemanticdbTaskListener.absolutePathFromUri

The minimized sbt project was the last user of -build-tool:sbt. Updated it to fork javac with --add-exports flags (same trick semanticdbKotlincMinimized already uses), so the plugin sees real file paths instead of sbt's vf:// virtual-file URIs.

Remove dead helpers and unused imports

Pure dead-code removal:

  • Result.{fold,map,isError,equals,hashCode,toString} — none called externally; map only called fold recursively. Improved getOrThrow/getErrorOrThrow error messages and made kind final.
  • GlobalSymbolsCache.isNone — single-line wrapper for sym == null, inlined into its sole caller; dropped now-unused ElementKind import.
  • 8 unused imports in AnalyzerCheckers.kt (kotlin.math.exp, FirBasicExpressionChecker, FirClassReferenceExpressionChecker, FirClassReferenceExpression, FirStatement, coneType, resolvedType).

Validation

  • sbt checkAll
  • sbt unit/test
  • sbt snapshots/test ✅ (no snapshot drift)
  • sbt minimized/clean minimized/compile
  • sbt semanticdbKotlincMinimized/clean kotlincSnapshots ✅ (no snapshot drift)

@jupblb jupblb merged commit 4e9abcc into main Jun 2, 2026
12 checks passed
@jupblb jupblb deleted the michal/cleanup-indexer branch June 2, 2026 15:59
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