Feat/stdlib fs env format - #149
Conversation
Six new stdlib builtins for tooling workloads:
- fs_write_file / fs_read_file / fs_create_dir_all / fs_exists
- env_args (host-supplied with std::env::args().skip(1) fallback)
- format (positional {} substitution, {{ }} escapes)
Plus PROGRAM_ARGS OnceLock + pub fn set_program_args, and my-cli's Run
subcommand grows a trailing_var_arg field forwarded to set_program_args.
Validated by an end-to-end run of an out-of-tree scaffold tool against
six idaptik-port component repos.
See PR body for details and open design questions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Automatic reviews are paused because your trial's included automatic processing has been used for this period. Upgrade now, or comment "Gitar review" to run a review anytime. Code Review ✅ Approved 4 resolved / 4 findingsAdds standard library file system, formatting, and argument builtins along with CLI argument forwarding. Consider adding unit tests for the new builtins and excluding generated site output from version control.
✅ 4 resolved✅ Quality: Generated site output and duplicate CSS committed to repo
✅ Quality: Invalid SPDX identifier MPL-2.0-or-later in CONTRIBUTING.md
✅ Edge Case: env_args() leaks host argv when embedder omits set_program_args
✅ Quality: New format/fs/env_args builtins have no tests
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
|
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Summary
Closes #
Type of change
How has this been verified?
Checklist
git commit -S).SPDX-License-Identifier(code/configMPL-2.0,prose
CC-BY-SA-4.0); I did not relicense existing files.Notes for reviewers
Summary by Gitar
fs_write_file,fs_read_file,fs_create_dir_all, andfs_existsincrates/my-lang/src/stdlib.rsenv_args()and positional placeholderformat()builtins incrates/my-lang/src/stdlib.rsmy-cliRuncommand to propagate--arguments toenv_args()This will update automatically on new commits.