refactor: replace direct external calls with common wrappers #2

Open
opened 2026-04-26 13:41:16 +02:00 by michael · 0 comments
Owner

Goal

Replace all direct external calls in program code with common wrappers.
No os.execute, io.open, or io.popen outside of adapter/wrapper layer.

Background

33 direct external calls found in src/ (excluding src/lib/).
These violate the DAW coding principles (daw-docs/docs/standards/daw-code-standard.md):

  • External calls belong in common/adapters only
  • One place where errors can happen
  • OS and Lua version differences handled in one wrapper

sig.lua was partially fixed (os.execute return value normalization)
but still contains direct os.execute calls outside the execute() wrapper.

Acceptance criteria

  • All os.execute calls go through execute() wrapper or fs adapter
  • All io.open / io.popen calls moved to fs adapter
  • execute() wrapper used consistently everywhere it exists
  • No silent errors -- all wrappers return nil, err on failure
  • Tests cover sig.lua verify_file error paths

Notes

Current count: 33 locations in src/ (excluding src/lib/)
Reference: daw-docs/docs/standards/daw-code-standard.md

## Goal Replace all direct external calls in program code with common wrappers. No `os.execute`, `io.open`, or `io.popen` outside of adapter/wrapper layer. ## Background 33 direct external calls found in src/ (excluding src/lib/). These violate the DAW coding principles (daw-docs/docs/standards/daw-code-standard.md): - External calls belong in common/adapters only - One place where errors can happen - OS and Lua version differences handled in one wrapper sig.lua was partially fixed (os.execute return value normalization) but still contains direct os.execute calls outside the execute() wrapper. ## Acceptance criteria - [ ] All `os.execute` calls go through execute() wrapper or fs adapter - [ ] All `io.open` / `io.popen` calls moved to fs adapter - [ ] execute() wrapper used consistently everywhere it exists - [ ] No silent errors -- all wrappers return nil, err on failure - [ ] Tests cover sig.lua verify_file error paths ## Notes Current count: 33 locations in src/ (excluding src/lib/) Reference: daw-docs/docs/standards/daw-code-standard.md
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-module-manager#2
No description provided.