Repository navigation
fix(cli): name the build with plugin runtimes when one is missing; plugin conformance on macOS and Windows - #2593
Conversation
Release binaries are built without the WASM and Python plugin runtimes on purpose. Asked for a Python or WASM plugin such a build reported only that a feature was missing; check --plugin was an unknown argument; and extract --wasm-importer and --wasm-importer-dir were accepted and ignored, so extract reported only that nothing was extracted. All of them now say the build lacks the runtimes, that release binaries ship without them, and that cargo install rustledger includes them, and the slim-build CI job runs a test of each. The installation guide lists which install routes have the runtimes, and the plugin reference and E8005 point to it. A new non-required workflow runs plugin_conformance and python_plugin_wasi on macOS and Windows nightly and on demand, with RLEDGER_REQUIRE_* set and a skip-marker check. Closes #2541 Closes #2537 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
📊 Benchmark Results
vs base, measured in this run
A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: What do these numbers mean?
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Review loop
The loop converged at round 5. Main has been merged three times, with CHANGELOG resolved as main's file plus this PR's two entries, and main's |
A wasm_importer_dir in importers.toml stays accepted in a build without the WASM runtime (one file may serve both), but its .wasm importers were skipped in silence. Now an error that no importer matches a file, or that nothing was extracted, names them as not tried; a file a CSV entry or a built-in importer reads instead, where a full build would have offered it to them first, gets a warning naming them; and --list-importers lists them as not loaded. Each says cargo install rustledger includes the runtime. The wasm_importer_dir setting and the directory scan are no longer feature-gated, so a slim build can read them. Unit tests that load WASM importers are now gated to the runtime feature; they could not pass in a slim build. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…platforms # Conflicts: # CHANGELOG.md
…platforms # Conflicts: # CHANGELOG.md
…platforms # Conflicts: # CHANGELOG.md
What
#2541: release binaries and the plugin runtimes. This keeps the decision as made: release binaries stay
--no-default-features. The PR documents it and makes every runtime-less path say so.plugin "x.py"Python plugin "x.py" requires the python-plugins feature, which this build lacks: rledger's release binaries ship without the WASM and Python plugin runtimes;cargo install rustledgerincludes themplugin "x.wasm"... requires the wasm-plugins featurecheck --plugin x.wasmunexpected argument '--plugin' foundcannot load WASM plugin x.wasm: this rledger was built without the WASM and Python plugin runtimes (release binaries ship without them); install it withcargo install rustledger, which includes themextract --wasm-importer x.wasm/--wasm-importer-dir dcannot load WASM importers from ...: <same>The loader's "requires the … feature" wording stays as it was, because the corpus-parity sentinel in
rustledger-ffi-component-testsmatches on it. The hint is added after it.check --pluginis now accepted in every build,ag-rledgerincluded, so a build without the runtimes can give the real error.wasm_importer_dirinimporters.toml(option D, as decided): a slim build still accepts the setting without complaint, but it no longer skips those importers in silence:note: this rledger has no WASM runtime, so the WASM importer in imp (bank.wasm) was not tried;cargo install rustledgerincludes it.filename_patternor the single-entry fallback, while a full build would offer the file to the WASM importers first. Such a file now getswarning: bank.csv was read by importers.toml entry 'bank', but <the note>. The same applies when the built-in OFX/CSV importer reads it.--list-importersadds(not loaded: …).--importer, nothing changes: a named entry is read by its own parser in every build.To make this possible,
wasm_importer_dirand the dependency-free directory scan (rustledger_plugin::wasm_dir_scan) are no longer feature-gated. The slim-deps ratchet still passes. Nine unit tests that load WASM importers are now gated to the runtime: they could not pass in a slim build, and nothing ran them there.Docs:
installation.mdgets a Plugin Runtimes section with a table of routes. Release binaries have no runtimes, and Homebrew (the tap installs the release tarballs), Scoop,cargo binstallandrustledger-binuse them.cargo installand source builds have them, and so do the AURrustledger, COPR, Docker and Nix packages, which build from source with default features. It also gives the install command.plugins.mdnotes the requirement at WASM plugins and at Python plugins.errors.mdE8005 now covers the WASMPLUGINcase and names the fix.#2537: a macOS + Windows plugin conformance job.
.github/workflows/plugin-platforms.ymlis not required. It runs nightly (04:30 UTC), onworkflow_dispatch, and on a pull request that changes the workflow file (so this PR runs it). It coversmacos-latestandwindows-latestwithfail-fast: false, the pinned 1.98.1 toolchain andwasm32-unknown-unknown. It runscargo test -p rustledger --test plugin_conformance --test python_plugin_wasiwithRLEDGER_REQUIRE_PYTHON_WASI=1andRLEDGER_REQUIRE_WASM32=1, then fails on any skip marker.workflow_dispatchonly becomes available once the file is on main, which is why thepull_requestpath trigger is there to validate it here.How tested
cli_commands_test::release_build_names_the_build_with_plugin_runtimes(compiled only withoutpython-plugin-wasm): the five cases above each fail and namecargo install rustledger. It fails without the fix on the.pydirective case. TheSlim Build (no wasmtime)CI job now runs it, since nothing else in CI tests the slim build.release_build_names_the_wasm_importers_it_did_not_try(slim): no-match error, CSV-entry warning,--importersilence, no-transactions error with an implicitly foundimporters.toml, and--list-importers. It fails without the change. The slim CI step now runs everyrelease_build_test.wasm_plugins_dir; I took main's version, and the slim test writes its own placeholder.wasm.actionlint(nixpkgs) onplugin-platforms.yml: clean.--no-default-features --features mimalloc,ag-rledger --all-targets), is clean with-D warnings. fmt is clean. Tests for rustledger-loader and rustledger (all features) andcargo doc -D warningsfor rustledger-loader pass.Closes #2541
Closes #2537
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr