Repository navigation
Troubleshooting
Run croma check FILE to see diagnostics without producing output. Each
diagnostic has a code, a severity, a 1-based line:column span, and a
byte span into the source:
$ croma check nokey.abc
nokey.abc:3:1-3:1: error[abc.file.missing_k]: ABC source is missing a K: field
byte span 13..13
|
| ^
-
nokey.abc:3:1-3:1— file, thenstartLine:startCol-endLine:endCol(1-based). -
error[abc.file.missing_k]— the severity and the dotted code. Codes are stable identifiers (e.g.abc.file.empty,abc.file.missing_k) you can grep for or match on. -
byte span 13..13— the half-open byte range, which lines up exactly withcroma-core'sSpanand the LSP's UTF-8 ranges.
For tooling, use JSON — it carries the same fields structurally:
croma check --diagnostics=json FILE[
{
"code": "abc.file.missing_k",
"line_span": {
"end": { "column": 1, "line": 3 },
"start": { "column": 1, "line": 3 }
},
"message": "ABC source is missing a K: field",
"path": "nokey.abc",
"severity": "error",
"snippet": { "line": "", "marker": "^" },
"span": { "end": 13, "start": 13 }
}
]--diagnostics <text|json> and --warnings-as-errors are available on xml,
check, fmt, and dump (CLI-Usage#parse-modes-shared-flags).
croma is strict by design. If a file is rejected for a trivial loose-source issue (detached note length, redundant barline, spaced field, a legacy tempo suffix), run the formatter's repair pass first:
croma fmt --auto-fix FILE # sanitise loose source into canonical spellingEvery --auto-fix curation is pitch/structure-gated and reverted if it would
change the score (Formatter). The parser stays strict; the formatter
recovers the loose source. (--loose / --recover parse modes also exist for
one-off cases — see CLI-Usage#parse-modes-shared-flags.)
The corpus-scale proofs (corpus_proof tests, throughput harnesses) are
environment-gated by ABC_ROOT. With no corpus present, a normal
cargo test --workspace skips them cleanly — that is the intended behaviour,
not a failure. croma builds and tests standalone; the full matrix runs from the
companion croma-test repo (How-its-Proven). A mis-set ABC_ROOT is
caught by a >= 9000 file-count guard that rejects a vacuous run.
-
Wrong toolchain. croma pins Rust 1.96.0 via
rust-toolchain.toml; plaincargo/rustcselects it automatically. Don't hardcode a toolchain path. If a build complains about edition 2024, yourcargois too old — let the pin take over (or update viarustup). -
Don't want
roxmltree? The MusicXML reader is the only thing that pulls it. Build a reader-less, zero-dependency CLI withcargo build -p croma-cli --no-default-features(this also removescroma read/croma musicxml2abc). -
croma read/musicxml2abc"unknown subcommand". You're on a--no-default-features(reader-less) build. Rebuild with default features. -
Editor / grammar pieces.
editors/zed/andtree-sitter-abc/are excluded from the cargo workspace (they target wasm / use tree-sitter tooling). A rootcargo buildwon't touch them; build them from their own directories perdocs/editors.md.
- Bugs / feature requests: GitHub Issues — include the input and the exact command.
-
Security vulnerabilities: GitHub Security tab → Report a
vulnerability (private), per
SECURITY.md. Crashes, hangs, or excessive resource use on malformed input are valid security reports.
croma — licensed under Apache-2.0.
Commercial use is allowed but must retain the attribution in
NOTICE (license §4); provided
as-is, without warranty or liability (§7–8).
Repository · crates.io · docs.rs · Issues · docs/
Start here
Use it
Capabilities
Why trust it
Help