-
Notifications
You must be signed in to change notification settings - Fork 0
Description
title: "Build & UX papercuts"
labels: ["enhancement"]
Notes from a first attempt at building and running larch2.
1. No guidance on getting GCC trunk
The README says "GCC trunk" and -DGCC_TOOLCHAIN=/path/to/gcc-install but doesn't explain where to get a -freflection-capable compiler. The CI uses kayari.org/gcc-latest/gcc-latest.deb (installs to /opt/gcc-latest) — this should be documented in the Building section.
2. No containerized build
Given that the only supported compiler is GCC trunk with an experimental C++26 extension, a Dockerfile (or at least a documented container image) would significantly lower the barrier to entry. Most developers and HPC systems don't have GCC trunk available.
3. Multiple inputs silently ignored
Passing both --dag-pb and --tree-pb quietly uses only the first one. parse_args lacks a mutual-exclusion check, and main uses a priority chain (dag_pb > tree_pb > fasta). It should error when multiple input modes are specified.
$ larch2 --dag-pb input.pb.gz --tree-pb tree.pb.gz --refseq ref.txt -o out.pb.gz
# silently ignores --tree-pb; --refseq is parsed but unused with --dag-pb
4. Bad file gives bare abort
Opening a nonexistent file throws std::runtime_error which terminates with SIGABRT (exit 134) and a raw terminate called after throwing... message. main() has no try/catch wrapper — adding one would let it print a clean error and exit 1.
$ larch2 --dag-pb nonexistent.pb.gz -o out.pb.gz
terminate called after throwing an instance of 'std::runtime_error'
what(): cannot open nonexistent.pb.gz
5. Progress indicator garbles log files
The progress struct in tools/larch2.cpp uses \r unconditionally in both pct() and counter() methods. This works in a terminal but produces garbled output when stderr is captured to a file or piped. Should check isatty(STDERR_FILENO) and skip \r-based overwrites when stderr is not a terminal.