CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-pantsbuild--zinc

Zinc is a standalone version of sbt's incremental compiler meant to be run in nailgun.

Pending
Overview
Eval results
Files

main-entry.mddocs/

Main Entry Point

Primary command-line interface and programmatic entry points for Zinc compilation orchestration.

Capabilities

Command-Line Interface

Standard main method for command-line execution of Zinc compilation.

/**
 * Standard main method for command-line execution
 * @param args Command-line arguments for compilation
 */
def main(args: Array[String]): Unit

Usage Example:

import org.pantsbuild.zinc.Main

// Command-line execution
Main.main(Array(
  "-scala-home", "/usr/local/scala",
  "-classpath", "/path/to/dependencies:/additional/deps",
  "-d", "/path/to/output/classes",
  "src/main/scala/MyClass.scala",
  "src/main/scala/AnotherClass.scala"
))

Programmatic Compilation

Programmatic compilation entry point with optional working directory specification.

/**
 * Programmatic compilation entry point with optional working directory
 * @param args Command-line arguments for compilation  
 * @param cwd Optional working directory for relative path resolution
 */
def run(args: Array[String], cwd: Option[File]): Unit

Usage Example:

import org.pantsbuild.zinc.Main
import java.io.File

// Programmatic execution with working directory
val projectDir = new File("/path/to/project")
val args = Array(
  "-scala-home", "/usr/local/scala",
  "-classpath", "./lib/dependency.jar:./lib/other.jar", // relative paths
  "-d", "./target/classes",
  "./src/main/scala/Example.scala"
)

Main.run(args, Some(projectDir))

Implementation Notes

The Main object serves as the primary entry point for Zinc compilation and handles:

  • Command-line argument parsing through the Settings system
  • Working directory resolution for relative paths
  • Error handling and logging setup
  • Compilation orchestration through the Compiler system

Both methods will parse arguments, set up the compilation environment, and execute the compilation process with appropriate error handling and logging.

Install with Tessl CLI

npx tessl i tessl/maven-org-pantsbuild--zinc

docs

analysis-caching.md

compiler-management.md

configuration.md

index.md

logging-reporting.md

main-entry.md

utilities.md

tile.json