Skip to content

refactor(hm-common): fs::write_create_all - #170

Merged
markovejnovic merged 1 commit into
mainfrom
feat/fs-write-helper
Jul 25, 2026
Merged

markovejnovic merged 1 commit into
mainfrom
feat/fs-write-helper

Conversation

@markovejnovic

@markovejnovic markovejnovic commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

Rework the hm-common fs helper introduced in 09dd3d6. Instead of a bare
create_dir_all returning a typed FsError, provide write_create_all,
which joins std::fs::create_dir_all(parent) and std::fs::write into one
call and returns io::Error directly — no bespoke error type.

Migrate the three write sites (hm init x2, hm run) to it, each
collapsing a create-dir + write pair (and, for run, an if-let parent
block) into a single call. The two mkdir-only sites (hm-vm registry,
hm-dsl-engine bundled_sources) don't write a file, so they revert to
std::fs::create_dir_all and drop their now-unused hm-common dep.
@markovejnovic
markovejnovic merged commit 966246c into main Jul 25, 2026
2 of 3 checks passed
@markovejnovic
markovejnovic deleted the feat/fs-write-helper branch July 25, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant