fix: uuid.lua -- daw_register gets nil, error() usage, style #29
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-lua-common#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problems
Critical:
daw_register(_NAME, M)called but M is never defined.Module table is named
uuid, notM. Registration passes nil.error()inread_random_bytesinstead of nil, err.Violates DAW error handling standard.
io.open("/dev/urandom")used directly.is_version_4is redundant --validatealready enforces v4 pattern.Can be removed or kept as thin wrapper around validate.
Indentation is 4 spaces -- rest of daw-lua-common uses 2 spaces.
Header minimal -- no usage example, no refs.
Fix: rename internal table from 'uuid' to 'M' for consistency with all other daw.common modules. Then 'return M' and 'daw_register(_NAME, M)' are both correct.
daw_register(_NAME, M) fixed (was registering an undefined 'uuid' variable -- module never registered correctly). error() replaced with nil,err at the point of failure via fs.handle.open_read/read_bytes (new). Local table renamed to M for repo convention. Covered in test_uuid.lua.