[core] Schema: tests first for validation and compiler determinism (red: 37+11 failing)

This commit is contained in:
2026-11-07 14:34:33 +01:00
parent c1abe88688
commit 9176cc63a4
12 changed files with 1231 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//! Parsing and validation of the routes tree.
use crate::{Model, ValidationErrors};
/// One route file handed in by the caller (core does no I/O).
#[derive(Debug, Clone, Copy)]
pub struct SourceFile<'a> {
pub name: &'a str,
pub contents: &'a str,
}
/// Parse and validate the site file and every host file.
pub fn load(site: &SourceFile<'_>, hosts: &[SourceFile<'_>]) -> Result<Model, ValidationErrors> {
let _ = (site, hosts);
Err(ValidationErrors(Vec::new()))
}