Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
Feature Specification: Replace vendor/ Snapshots with Pinned CPM Dependencies
Feature Branch: 032-cpm-vendor-removal
Created: 2026-10-19
Status: Implemented
Input: User description: "We want to remove the entire vendor directory and replace it with CPM dependencies".
Nota Context
Feature area:
- Engine (C++,
src/native/nota.engine) — real-time audio rules apply, seeARCHITECTURE.mdAR table - Managed app (C#,
src/managed/*) - UI (Avalonia)
- Plugin hosting (
pluginhost/) — the only place JUCE is allowed - Build / packaging / CI (
scripts/,.github/) — seeBUILD.md - Docs only
Nota docs to keep in mind:
ARCHITECTURE.md (AR-7 pure C ABI),
CONTRIBUTING.md (dependency policy — read before adding any source),
BUILD.md (offline-build story must be updated),
LICENSES/third-party.md (one row per dependency — mandatory for every swap).
User Scenarios & Testing (mandatory)
User Story 1 - No Vendored Sources, Reproducible Fetches (Priority: P1) 🎯 MVP
As a Nota maintainer, I want src/native/nota.engine/vendor/ gone (9 snapshots, ~104 MB, JUCE alone 92 MB), with every dependency fetched by CPM from a pinned URL/tag + hash into the build dir (like nlohmann_json 3.12.0 today), so that upstream updates are version bumps, not vendored directory merges, and license texts live in LICENSES/ instead of scattered snapshots.
Why this priority: Vendored snapshots rot silently (JUCE 8.0.14, LAME 3.100,ateurs unknown-pinned miniaudio/rtmidi/dr_libs), duplicate maintenance (two Oversampler-style twins were already found in 031), and bloat every clone. CPM infra already exists (cmake/dependencies.cmake, CPM_VERSION v0.43.2 with hash pin).
Independent Test: Fresh clone on a machine with empty CPM cache: ./scripts/build.sh green; tests/Nota.SmokeTest 3704 checks pass; git status shows no vendor/; license audit (LICENSES/third-party.md rows + texts) complete.
Acceptance Scenarios:
- Given a fresh clone with network, When running
./scripts/build.sh, Then CPM fetches all 9 dependencies pinned (URL+HASH or GIT_TAG+hash) and the full build + smoke pass with zerovendor/references in CMake or sources. - Given
dr_libs/miniaudio/hiir/signalsmithheader-only deps, When building, Then only include dirs are wired (no built artifacts), matching today's usage. - Given
flac/rtmidi(upstream CMake) andlame(no upstream CMake), When building, Then flac/rtmidi build via their own CMake with tests/examples off (as today), and lame builds via our thin wrapper moved tocmake/(same sources, same static-into-shared linkage, LGPL note 7 unchanged). - Given JUCE 8.0.14, When building both the default target and
-DNOTA_BUILD_PENTAD_VST3=ON, Thenjuce_add_pluginflows work unchanged (shallow fetch to bound the 92 MB cost) and hosted-plugin smoke tests pass. - Given an offline machine with a warm
CPM_SOURCE_CACHE, When building, Then no network is touched (documented inBUILD.md); with a cold cache and no network, configure fails fast with a clear message (current nlohmann behavior, kept).
Edge Cases
- LAME has no upstream CMake and upstream tarballs live on SourceForge (reliability): keep our wrapper
CMakeLists, fetch the 3.100 tarball by URL+HASH like nlohmann_json; LGPL-2.0-or-later duties unchanged (static lib inside the SHARED engine dylib, note 7 stays accurate — re-verify the note text). - JUCE full-clone cost:
GIT_SHALLOW TRUE(or tarball if upstream provides versioned archives); never fetch submodules we don't build. signalsmith-linearvssignalsmith-stretchupstream layout unknown (one repo or two?) — P0 verifies before wiring.- miniaudio/rtmidi/dr_libs/hiir pinned versions must be read off the CURRENT snapshots (version headers/changelogs) so the swap is version-neutral first, upgrades later.
- Any
scripts/or docs references tovendor/paths must move with the code (grep-gated).
Requirements (mandatory)
Functional Requirements
- FR-001:
vendor/deleted; novendor/string remains in CMake, sources, scripts, or docs (grep-verified). - FR-002: Every dependency pinned (URL+HASH preferred; GIT_TAG + commit hash where no tarball exists) in
cmake/dependencies.cmake; no floatingmain/master. - FR-003:
LICENSES/third-party.mdgains/updates one row per dependency (upstream URL, pinned version, license); license texts preserved inLICENSES/(hiir WTFPL, lame LGPL note, JUCE AGPL terms as today). - FR-004: Audio behavior unchanged: oversampler null harness (031, 1x–8x bit-identical) re-run against the fetched hiir; MP3/FLAC export smoke tests green (spec 001 surface); plugin-scan smoke green (JUCE).
- FR-005:
BUILD.mddocuments the CPM cache story (warm/cold,CPM_SOURCE_CACHE, first-configure network requirement).
Key Entities
cmake/dependencies.cmake(all pins),cmake/lame.cmakeor equivalent wrapper (moved thin build),LICENSES/third-party.md+ texts, per-dep smoke coverage.
Success Criteria (mandatory)
- SC-001: Fresh-clone full gate green with no
vendor/on disk (except CPM cache outside the repo). - SC-002: License audit complete (9 deps mapped, texts present).
- SC-003: No C ABI diff; smoke 3704 PASS.