Skip to main content

Crate sqry_classpath

Crate sqry_classpath 

Source
Expand description

JVM classpath analysis for sqry.

This crate provides bytecode parsing, build system resolution, and graph integration for JVM classpath dependencies (Java, Kotlin, Scala). It enables sqry to resolve imports and type references across workspace source code and compiled library JARs.

§Architecture

The classpath pipeline runs as a pre-pass before the main build graph pipeline:

  1. Detect - Identify the build system (Gradle, Maven, Bazel, sbt)
  2. Resolve - Extract the classpath JAR list via build tool subprocess
  3. Scan - Parse .class bytecode from each JAR into ClassStub records
  4. Cache - Persist parsed stubs per JAR (SHA-256 keyed) for incremental rebuilds
  5. Index - Merge all stubs into a ClasspathIndex for fast FQN lookup
  6. Emit - Create synthetic graph nodes and register in ExportMap

§Feature Gate

All classpath functionality is gated behind the jvm-classpath feature on sqry-core. When disabled, no classpath code is compiled and there is zero overhead.

Modules§

bytecode
JVM bytecode parsing.
detect
Build system detection for JVM projects.
graph
Graph integration for classpath data.
kotlin
Kotlin metadata extraction from @kotlin.Metadata annotations.
pipeline
Classpath pipeline orchestration.
resolve
Classpath resolution via build tool subprocesses.
scala
Scala signature extraction from @ScalaSignature annotations.
stub
Stub data model for parsed bytecode.

Enums§

ClasspathError
Errors that can occur during classpath analysis.

Type Aliases§

ClasspathResult
Result type for classpath operations.