ek9_clean

Wipes the on-disk .ek9/ artefacts the scope names and resets the server JVM's in-memory coverage/profiling runtimes; answers status:ok with cleanedSources[] listing what was wiped or reset, in order.

Category: Execution · Compare: Build → Clean (IntelliJ) / mvn clean / cargo clean

When to use it

'Start this measurement from a pristine project' is one call: {scope:'coverage'} (or profiling / release / full) on the workspace root - projectDir only for another root.

When not to use it

Details

Scope maps to state sources: coverage = wipe generated/ + reset CoverageRuntime; profiling = also reset ProfilingRuntime (profiling registers probes via CoverageRuntime, so both reset); release/full = also wipe lib/ + target executable + props (identical on disk today, kept distinct so future caches can join full). Disk wipe + runtime reset are one coordinated step so they never drift (historically a registry-only reset let orphaned .class files re-register stale probes and pollute coverage). The response's cleanedSources lists what was wiped/reset in execution order.

Arguments

ArgumentTypeRequiredWhat it is
filestringThe entry-point .ek9 source file (absolute, or relative to projectDir). Omit to auto-detect the shallowest non-dev .ek9 file - enough to locate the .ek9/ directory.
projectDirstringProject root holding the .ek9 sources - absolute, or relative to the workspace root. Omit to use the workspace root itself (the first root ek9_compile was given).
scopestring: coverage | profiling | release | fullWhat to make pristine: coverage (generated/ + coverage runtime), profiling (coverage + profiling runtime), release and full (also lib/, the target executable and props).

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

Clean coverage scope

Request

{
  "projectDir" : "<workspace-root>",
  "scope" : "coverage"
}

Response

{
  "cleanedSources" : [ "generated", "coverageRuntime" ],
  "mainSource" : "main.ek9",
  "meta" : {
    "serverMs" : "<timing>"
  },
  "projectDir" : "<workspace-root>",
  "scope" : "coverage",
  "status" : "ok"
}