fix: yaml.load_file uses io.open directly -- delegate to fs or remove #24

Closed
opened 2026-05-25 19:10:24 +02:00 by michael · 1 comment
Owner

Problem

yaml.load_file uses io.open directly. Pure data parsers in
daw.common do not do filesystem access -- that belongs in fs.lua.

Options

  • Remove yaml.load_file, callers use fs.read_file + yaml.load
  • Keep yaml.load_file but delegate to fs.read_file internally
    (requires yaml.lua to depend on daw.common.fs)

Decision needed

How many callers use yaml.load_file directly?
If few: remove it. If many: delegate to fs.

See also

## Problem `yaml.load_file` uses `io.open` directly. Pure data parsers in daw.common do not do filesystem access -- that belongs in fs.lua. ## Options - Remove `yaml.load_file`, callers use `fs.read_file` + `yaml.load` - Keep `yaml.load_file` but delegate to `fs.read_file` internally (requires yaml.lua to depend on daw.common.fs) ## Decision needed How many callers use `yaml.load_file` directly? If few: remove it. If many: delegate to fs. ## See also - DAW/daw-lua-common#23 (error() vs nil, err in yaml)
Author
Owner

load_file delegates to daw.common.fs.file.read_file(). No more raw io.open in yaml/.

load_file delegates to daw.common.fs.file.read_file(). No more raw io.open in yaml/.
michael 2026-07-19 17:55:30 +02:00
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-lua-common#24
No description provided.