Feature/source plugins #1

Merged
martino merged 130 commits from feature/source-plugins into main 2026-11-04 07:35:21 +01:00
4 changed files with 18 additions and 21 deletions
Showing only changes of commit 5bb23e6a0a - Show all commits

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ The detail lives in `docs/claude/`. Read the files that touch the area you are e
| File | What it covers | | File | What it covers |
| --- | --- | | --- | --- |
| [build-and-run.md](docs/claude/build-and-run.md) | Configuring and building, the desktop-entry target, the command-line options, and the two vendored dependencies (`deps/plotter`, `deps/udpsclient`) including what was changed upstream and why. | | [build-and-run.md](docs/claude/build-and-run.md) | Configuring and building, the desktop-entry target, the command-line options, and the two vendored dependencies (`deps/plotter`, `deps/udpsclient`) including what was changed upstream and why. |
| [verification.md](docs/claude/verification.md) | How to run the headless self-check, the **two baselines every run is read against** (exactly three build warnings; no `Gtk-CRITICAL`), and the environment variable that schedules each probe. | | [verification.md](docs/claude/verification.md) | How to run the headless self-check, the **two baselines every run is read against** (exactly one build warning; no `Gtk-CRITICAL`), and the environment variable that schedules each probe. |
| [probe-readings.md](docs/claude/probe-readings.md) | The per-line reference for the self-check's output: what every probe and dump line means, the value it must read, and the defect a wrong reading names. | | [probe-readings.md](docs/claude/probe-readings.md) | The per-line reference for the self-check's output: what every probe and dump line means, the value it must read, and the defect a wrong reading names. |
### How the application is put together ### How the application is put together
+1 -1
View File
@@ -151,7 +151,7 @@ add_custom_command(
# The generated source carries each file as one C string literal, and a `.ui` is big enough to pass the # The generated source carries each file as one C string literal, and a `.ui` is big enough to pass the
# 4095-character minimum the standard requires a compiler to support: `-Woverlength-strings` fires on # 4095-character minimum the standard requires a compiler to support: `-Woverlength-strings` fires on
# generated *data*, not on anything anyone wrote. Silenced for this one generated file (the icon bundle # generated *data*, not on anything anyone wrote. Silenced for this one generated file (the icon bundle
# is small enough per file never to need it), so the build stays at its three warnings. The manual is # is small enough per file never to need it), so the build stays at its one warning. The manual is
# no longer compiled in, so the help bundle's own warning is gone with it. # no longer compiled in, so the help bundle's own warning is gone with it.
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/udpscope_ui_resources.c set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/udpscope_ui_resources.c
PROPERTIES COMPILE_OPTIONS "-Wno-overlength-strings") PROPERTIES COMPILE_OPTIONS "-Wno-overlength-strings")
+9 -11
View File
@@ -15,23 +15,21 @@ xvfb-run -a env UDPSCOPE_EXIT_AFTER_MS=8000 UDPSCOPE_ENABLE_ALL_MS=1000 \
Two baselines every run is read against. The UDPS runs must be **unchanged by the source-plugin work**: Two baselines every run is read against. The UDPS runs must be **unchanged by the source-plugin work**:
a UDPS self-check, number-normalised (`sed 's/[0-9.]\+/N/g'`), diffs empty against one taken before it. a UDPS self-check, number-normalised (`sed 's/[0-9.]\+/N/g'`), diffs empty against one taken before it.
A clean build emits **three** warnings and no more: two A clean build emits **one** warning and no more: a `-Woverlength-strings` on the icons'
`-Wmissing-field-initializers` on `MathNode::source` and one `-Woverlength-strings` on the icons'
generated GResource `.c`, whose blob is **9248** against C99's 4095-byte string-literal limit with generated GResource `.c`, whose blob is **9248** against C99's 4095-byte string-literal limit with
the five action icons and the two app icons that remain (a note about a generated file, which GCC the five action icons and the two app icons that remain (a note about a generated file, which GCC
itself supports). The *fourth* was the help pages' generated `.c` (**516044** bytes); the manual is itself supports). History: the help pages' generated `.c` (**516044** bytes) went when the manual
now a Mallard set installed for Yelp rather than a GResource compiled into the binary, so that became a Mallard set installed for Yelp; an unused `output_built` in `math_probe()` was deleted as
bundle — and its warning — is gone, and the baseline moved from four to **three**. Re-measure by dead code; and the last two, `-Wmissing-field-initializers` on `MathNode::source` in `math_probe()`,
touching each `*.gresource.xml` under `src/` and rebuilding; a third `-Wmissing-field-initializers` went when the probe's `MathNode{MathOp::Gain, {}}` / `MathNode{MathOp::LowPass, {}}` named the
or any other warning is a finding. (The fifth warning that used to appear here was an unused field (a partial brace-initialiser on `MathNode` re-adds one: `source` has no default member
`output_built` in `math_probe()`; it was **deleted** as dead code — redundant with the initialiser). Re-measure by touching `src/icons/udpscope.gresource.xml` and rebuilding; any
`output_after_add` already printed on the same line — which dropped the baseline from five to second warning is a finding. And an exit-dump run emits **no** `Gtk-CRITICAL` at all, nor any `Gtk-WARNING`: the dump's
four.) And an exit-dump run emits **no** `Gtk-CRITICAL` at all, nor any `Gtk-WARNING`: the dump's
`gtk warnings:` line counts GTK's own log (through a writer function — GTK is built with structured `gtk warnings:` line counts GTK's own log (through a writer function — GTK is built with structured
logging, so the handler API never sees its messages) and must read `0`; see logging, so the handler API never sees its messages) and must read `0`; see
[probe-readings.md](probe-readings.md). [probe-readings.md](probe-readings.md).
An *incremental* build reads **one** of those three: the generated GResource `.c` is not recompiled An *incremental* build reads **zero**: the generated GResource `.c` is not recompiled
when only `src/` changed, so its `-Woverlength-strings` does not reappear. when only `src/` changed, so its `-Woverlength-strings` does not reappear.
A third reading every run offers for free: **how many `[udpscope] buffer allocated:` lines it A third reading every run offers for free: **how many `[udpscope] buffer allocated:` lines it
+7 -8
View File
@@ -467,7 +467,7 @@ gboolean math_probe(gpointer user) {
MathChannel gain; MathChannel gain;
gain.name = "math x2"; gain.name = "math x2";
gain.enabled = true; gain.enabled = true;
gain.nodes = {MathNode{MathOp::Source, name}, MathNode{MathOp::Gain}}; gain.nodes = {MathNode{MathOp::Source, name}, MathNode{MathOp::Gain, {}}};
gain.nodes[1].in_a = 0; gain.nodes[1].in_a = 0;
gain.nodes[1].gain = 2.0; gain.nodes[1].gain = 2.0;
gain.output = 1; gain.output = 1;
@@ -476,14 +476,14 @@ gboolean math_probe(gpointer user) {
MathChannel lp; MathChannel lp;
lp.name = "math lp"; lp.name = "math lp";
lp.enabled = true; lp.enabled = true;
lp.nodes = {MathNode{MathOp::Source, late_name}, MathNode{MathOp::LowPass}}; lp.nodes = {MathNode{MathOp::Source, late_name}, MathNode{MathOp::LowPass, {}}};
lp.nodes[1].in_a = 0; lp.nodes[1].in_a = 0;
lp.nodes[1].fc = 20.0; lp.nodes[1].fc = 20.0;
lp.output = 1; lp.output = 1;
channels.push_back(lp); channels.push_back(lp);
// A third channel so the editor's new form row is built and synced on a baseline run. Assigned field // A third channel so the editor's new form row is built and synced on a baseline run. Assigned field
// by field: a partial brace-initialiser would add a fifth build warning. // by field: a partial brace-initialiser would add a build warning.
MathChannel dn; MathChannel dn;
dn.name = "math denoise"; dn.name = "math denoise";
dn.enabled = true; dn.enabled = true;
@@ -1269,8 +1269,8 @@ gboolean mathwrap_probe(gpointer user) {
MathChannel gain; MathChannel gain;
gain.name = "math wrap"; gain.name = "math wrap";
gain.enabled = true; gain.enabled = true;
// Field by field: a partial brace-initialiser would add a fourth build warning, and the baseline // Field by field: a partial brace-initialiser would add a build warning, and the baseline
// is exactly three. // is exactly one on a clean build.
MathNode src; MathNode src;
src.op = MathOp::Source; src.op = MathOp::Source;
src.source = name; src.source = name;
@@ -5843,9 +5843,8 @@ int noise_channel(App* a, const char* name) {
// the older feature's proof, so the new channel stays out of the acquisition plan until they have // the older feature's proof, so the new channel stays out of the acquisition plan until they have
// all run, and only the de-noise comparison is taken with it in. // all run, and only the de-noise comparison is taken with it in.
// //
// Fields assigned rather than brace-initialised: a partial brace-initialiser on `MathNode` is // Fields assigned rather than brace-initialised: a partial brace-initialiser on `MathNode` leaves
// what the two `-Wmissing-field-initializers` in this file already are, and the build baseline // `source` out and warns (`-Wmissing-field-initializers`), and the build baseline is one warning.
// is exactly four warnings.
gboolean noise_probe_setup(gpointer user) { gboolean noise_probe_setup(gpointer user) {
App* a = static_cast<App*>(user); App* a = static_cast<App*>(user);
if (a->window == nullptr) return G_SOURCE_REMOVE; if (a->window == nullptr) return G_SOURCE_REMOVE;