ReviewOS

home-lang/home-os

Rename reserved-keyword fields (`readonly`, `is`, `requires`) in 5 kernel modules

#19
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Context

5 home-os kernel modules use reserved Home keywords as struct field names. The parser rejects these with Expected '}' after struct fields (the error message is unhelpful, but the underlying cause is keyword-as-identifier).

Affected files

FileLineFieldSuggested rename
kernel/src/container/overlayfs.home12readonly: u32read_only
kernel/src/drivers/ahci.home83is: u32int_status
kernel/src/fs/sysfs.home94readonly: u32read_only
kernel/src/fs/fsck.home36readonly: boolread_only
kernel/src/init/init.home83requires: [...]requires_list

Approach

For each file:

  1. Rename the field in the struct declaration
  2. Find all references to that field (grep) within the same file and across dependent files
  3. Update each reference to match
  4. Verify with home-debug ast that the file now parses past that line

Why this matters

Mechanical kernel cleanup. 5 modules unblocked. Pairs with the Home compiler's eventual better error message for reserved-keyword-as-field (separate language-side improvement).

Reference

  • 2026-05-04-night audit
  • Scout triage report

Sign in to comment on this issue.