Skip to content

[modules] is optional - #310

Merged
HaoZeke merged 3 commits into
developfrom
feat/modules-optional
Nov 26, 2026
Merged

HaoZeke merged 3 commits into
developfrom
feat/modules-optional

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

A site file with no module tool to drive, such as one workstation with EasyBuild from pip, had to write [modules] init = [] to say nothing. The table and its init key are optional: absent, no module is loaded and no module wrapper starts, the same as init = [].

  • schema.rs: Modules has a Default; Site.modules and Modules.init take #[serde(default)] and are documented as optional, so the site-file reference row changes with them.
  • The schema contract test lists modules with the optional tables. missing_required_sections_are_rejected keeps [scheduler]; a_site_without_modules_loads_nothing checks the new case parses, loads nothing and validates.
  • The workstation template drops its empty [modules] table.

Checked on one x86_64 host: cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test. In a login shell, one watch test (without_eb_stack_watch_says_what_to_rebuild_and_refuses_to_guess_the_rest) failed once because that shell's PATH carries an eb-stack 0.3.0, which writes rebuild-set schema 4; the test appends the caller's PATH after its stubs. Without that eb-stack on PATH the watch suite passed 5 of 5 runs.

A site file with no module tool to drive, such as one machine with
EasyBuild from pip, wrote [modules] init = [] to say nothing. Absent, the
table and the key now mean the same: no module loaded, no wrapper. The
schema contract test lists modules with the optional tables.
The owner made [modules] optional; dropping [scheduler] is still refused.
@HaoZeke
HaoZeke merged commit 11f4b61 into develop Nov 26, 2026
8 checks passed
@HaoZeke
HaoZeke deleted the feat/modules-optional branch November 26, 2026 21:46
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