Compile
Turn source code and binaries into a symbol library.
The compile family scans a mix of sources: a local folder, GitHub repos, docker/OCI images, Helm charts, and Artifactory artifacts. It writes a per-file .10x.json unit for each, then links them into one .10x.tar.
That library is what the 10x runtime reads later to assign hidden classes (TenXTemplates) to log events, so a pattern's identity tracks the line of code that emitted it.
Compiling is bounded-synchronous. log10x_compile waits inline up to max_wait_ms (default 45s), then returns the finished library plus the full scan and link diagnostics in one call.
A small compile finishes inside that wait, and so does every re-run: the output folder is pinned per source set, so a repeat call reuses the earlier result.
A long first compile of a large tree overruns the wait and returns a running job_id. Poll it with log10x_compile_status, or call log10x_compile again later and collect the pinned result near-instantly.
To re-link an existing units tree into a library with no source scan, use log10x_compile_link.
You
compile a symbol library from github apache/commons-cli
Log10x
Compile job a1f2c3 done, 31 units linked to symbols.10x.tar (412 KB). No scan failures.
You
how is the big compile coming along?
Log10x
Compile job 7d4e9b running, 2m14s elapsed, 8,640 units so far, 12 files failed to scan (java 9, python 3). Poll again.
You
re-link the units I pruned
Log10x
Link job c90a11 done, 27 units merged to symbols.10x.tar (388 KB). 4 units excluded by name filter.
| You ask | Example answer |
|---|---|
| compile a library from a folder, repos, images, charts, or Artifactory | Compile job a1f2c3 done, 31 units linked to symbols.10x.tar (412 KB). Or a running job_id for a long first compile. |
check on compile job 7d4e9b |
job_status plus units, the linked .10x.tar, per-language scan-failure counts, the link report, and a redacted log tail. |
| re-link a folder of units into one library | Link job c90a11 done, 27 units merged to symbols.10x.tar (388 KB). No source re-scan. |
Prerequisites
The compile family runs the Cloud-flavor Compiler app, which executes the compile pipeline, docker-first. By default it pulls the cloud image log10x/compiler-10x.
That image bundles the following, so no host docker socket is needed:
- a daemonless podman for image pulls
- the GitHub and Artifactory REST clients
- the helm CLI
With mode: "local" it uses a local cloud-flavor tenx instead. The Edge flavor is refused.
This is the CLI tier, so it needs no Kubernetes, deployed app, or Log10x account.
GitHub pull requires a token even for public repos (github_token, or GH_TOKEN / GITHUB_TOKEN). Artifactory pull also requires a token (artifactory_token or ARTIFACTORY_TOKEN). Public docker images and public Helm charts need no credentials.
Two limits to know:
gomodpull is deliberately not exposed, because it floods the library with transitive dependencies..jarfiles are not scanned directly, so provide extracted.classfiles.