Repository navigation
Clean out dead libs/externals, salvage math_ext, add AOT test - #422
Merged
Merged
Conversation
These bindings target native libraries that aren't shipped in
platform-shlibs, aren't built by CMake, and aren't loaded by anything.
Each fails to load on a current build with "could not find <lib>
dynamic library", and reviving any would mean re-adding a native build
plus porting to s7. Last touched 2016-2020; untouched through the
s7/aarch64 modernisation.
opencl - libCL (GPU compute, superseded by WebGPU)
opencv - ocv_core_lib/ocv_hgui_lib (computer vision)
gstreamer- gstreamer (video)
ceph - librados (distributed storage)
nanomsg - libnanomsg (messaging)
hid/hidapi - libhid (two competing HID bindings)
udis86 - libudis86 (x86 disassembler)
portaudio- libportaudio (legacy binding; the audio backend is the
statically-linked portaudio_static, unaffected)
Not referenced by any build target, test, example, or live library, and
not in platform-shlibs. They "load" only on a dev box that happens to
have the system package installed; on CI or a clean machine they fail.
Last touched 2019-2020.
fleet, fleet-node, ghttp, jansson - dead distributed-extempore /
networking cluster (depended on the now-removed nanomsg)
glib - only consumer was the removed gstreamer binding
apr, system - APR-based OS utilities, referenced only by unregistered
legacy test aggregators
curl (2016), qr-code, libc - strays, nothing loads them
The v0.9.0-beta WebGPU migration deleted all libs/contrib/gl/*.xtm,
nanovg.xtm, graphics-pipeline.xtm and assimp.xtm, but left the build
machinery that compiled them behind an OFF-by-default option. The
aot_external_graphics_opengl target's aotcompile_lib() calls all point
at files that no longer exist.
Removed:
- EXTERNAL_SHLIBS_GRAPHICS_OPENGL option and its EXT_DYLIB override
- GL_BIND_METHOD logic + AOT_EXTERNAL_GRAPHICS_OPENGL_LIBS list
- the aot_external_graphics_opengl AOT block (CMakeLists.txt)
- the "Legacy OpenGL graphics stack" native build block
(extras/cmake/external_deps.cmake): nanovg + assimp ExternalProjects
and the external_shlibs_graphics_opengl copy target
- DEP_NANOVG_COMMIT and DEP_ASSIMP_VERSION pins
WebGPU graphics (stb_image, glfw3, webgpu) and the static portaudio
audio backend are untouched.
tests/core/game-of-life.xtm - loads deleted libs/contrib/game-of-life.xtm tests/external/mpi/random-walk.xtm - loads deleted examples/external/mpi/random-walk.xtm tests/external/system.xtm - tests the now-removed libs/external/system.xtm None are registered in extras/cmake/tests.cmake. The legacy tests/all*.xtm aggregators and tests/core/aot-compilation.xtm are left in place (a separate question).
math_ext.xtm (vector/matrix linear algebra) had silently rotted: it is
all generic functions, so it loaded fine but failed to compile the
moment any op was instantiated, because the "big refactor of math.xtm"
renamed/changed every primitive it calls. Verified working now for
double vectors and matrices (magnitude, dot, cross, normalise, +, -,
elementwise and scalar *, scalar /, transpose, determinant, inverse,
matrix multiply).
Changes:
- renamed refactored primitives: vnorm->vnormalise, vdot->vvdot,
vcross->vvcross, vmul->vvmul, vsum->vvsum, vsub->vvsub,
mdetrm->mdeterminant, minv->minverse
- fixed vsmul/vsdiv arg order (scalar-first -> vector-first)
- dropped mprint's removed 4th (flag) argument
- fixed the xtm_subtration typo -> xtm_subtraction
- made the Vec/Mat macros hygienic (gensym, not a hard-coded symbol)
- reimplemented transposition inline (math.xtm split transpose into a
float-only mtrans and double-only mtranspose; neither works for a
type-generic function)
- removed the element-wise Vector/Vector division overload: math.xtm
has no vvdiv primitive (Vector/scalar division is retained)
Confirmed by a full reverse-reference sweep (excluding the auto-generated
aot-cache): nothing in libs, examples, runtime, tests, docs, extras or
CMake loads any of these, and most last saw real changes in 2020.
core/looper, core/music, core/xobject, core/vu_meter, core/math_ext^,
core/toplap_clock (superseded by topclock), core/vaudio_dsp
core/pattern + base/pattern (a dead pair; superseded by
core/pattern-language), core/instruments/{basicsynth,cerberus_midi,
channel_strip}
^ math_ext kept and repaired in the preceding commit.
Not registered in ctest and unrunnable: it instructs precompiling libs/contrib/aot-compilation.xtm, deleted at v0.9.0-beta. AOT compilation is still exercised by the aot_* build targets in CI.
Replaces the unrunnable aot-compilation.xtm removed earlier in this
branch with a real, registered two-phase test:
- tests/core/aot-compilation-lib.xtm: a small self-contained fixture
library (ported to the current base.xtm layout; the old one loaded
the long-gone libs/core/std.xtm)
- tests/core/aot-compilation.xtm: loads the fixture from its
precompiled cache and asserts execution (aot_answer, aot_add) and
docstring preservation (named-type + global-var) survive AOT
- extras/cmake/run_aot_test.cmake: cmake -P harness that runs phase 1
(impc:aot:compile-xtm-file) then phase 2 (xtmtest-run-tests),
mirroring the offline-audio test harness
- registered in tests.cmake under the compiler-unit label
Note: bind-func (closure) docstrings are deliberately not asserted ---
impc:ti:get-closure-docstring returns #f even for a freshly compiled
function, so that accessor looks broken independent of AOT.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleanout of accumulated dead/unmaintainable code in
libs/andexamples/, following the same rationale as the v0.9.0-betacontrib/removal. Each removal was verified empirically (load-tested in a current build) and by a full reverse-reference sweep; nothing kept references anything removed.Removed
opencl,opencv,gstreamer,ceph,nanomsg,hid,hidapi,udis86,portaudio. Each fails to load on a current build (native lib not shipped/built), and reviving any means re-adding a native build plus an s7 port. (The staticportaudio_staticaudio backend is untouched — only the dead xtlang binding goes.)fleet,fleet-node,ghttp,jansson), plusglib,apr,system,curl,qr-code,libc. Not in any build target, not loaded by anything; "load" only on a dev box that happens to have the system package.EXTERNAL_SHLIBS_GRAPHICS_OPENGLoption,aot_external_graphics_opengltarget,GL_BIND_METHODlogic and the nanovg/assimp ExternalProjects. Itsaotcompile_lib()calls all pointed atlibs/contrib/gl/*files deleted at v0.9.0-beta.game-of-lifeandmpi/random-walk(loaded deleted paths),external/system(tested a removed lib).libs/coreorphans —looper,music,xobject,vu_meter,pattern+base/pattern(superseded bypattern-language),toplap_clock(superseded bytopclock),vaudio_dsp, and orphan instrumentsbasicsynth/cerberus_midi/channel_strip.Repaired
math_ext.xtm— vector/matrix linear algebra that had silently rotted: all-generic, so it loaded but failed to compile when used, because the math.xtm refactor renamed/changed every primitive it called. Ported and verified working (dot, cross, magnitude, normalise, +, -, elementwise/scalar*, scalar/, transpose, determinant, inverse, matrix multiply).Added
extras/cmake/run_aot_test.cmake): AOT-compile a fixture, then load it from its precompiled cache in a fresh process and assert execution + type/global-var docstring preservation. Registered undercompiler-unit. Restores (and fixes) coverage the old unrunnableaot-compilation.xtmwas meant to provide.Verification
Full local
ctestsuite: 100% — 50/50 on Linux x64. Net ~13k lines removed.Note:
impc:ti:get-closure-docstringreturns#feven for a freshly-compiled function — looks like a pre-existing regression independent of AOT, so bind-func docstrings aren't asserted. Flagged for separate follow-up.