You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: XMILE <options> namespace attribute is silently dropped on read #902
The XMILE spec (section 2.2.1) defines namespace as an XML attribute of <options> (e.g. <options namespace="std, isee">), declaring the namespace resolution order for identifiers. The Options struct in src/simlin-engine/src/xmile/mod.rs (line ~1139) declares the field without the quick-xml @ attribute rename:
pubstructOptions{pubnamespace:Option<String>,// string of comma separated namespaces#[serde(rename = "$value")]pubfeatures:Option<Vec<Feature>>,}
quick-xml's serde support maps an un-prefixed field to a child element, and unknown attributes are ignored -- so the attribute form always parses as None. Contrast the Macro struct in the same file, which correctly uses #[serde(rename = "@namespace")] for its spec-defined namespace attribute.
Note the vendored Stella fixtures also carry namespace="std, isee" as an attribute on the <smile> header element (test/conveyors/*.stmx), which is a separate un-parsed surface (see the companion issue on the <smile> attribute-form feature flags).
Why it matters
Advisory-only today -- nothing in the engine consumes the declared namespace resolution order -- but it is a spec-defined attribute silently dropped on import, so the declaration is lost on any read/re-write round trip. Same "XMILE header advisory metadata silently dropped by the reader" class as the #888 family; unlike pre-#888 unknown options, it never causes a parse failure.
Add #[serde(rename = "@namespace")] to the field (mirroring Macro), plus a reader test with <options namespace="std, isee">...</options> asserting the value survives. Decide separately whether the writer should re-emit it (the current writer re-canonicalizes the header from model contents).
Context
Noticed during the GH #888 fix (tolerant <options> parsing) on branch conveyor-engine; deliberately left out of that fix's scope. Related: #888 (reader hard-fail on unknown option elements), #872 (writer never emits <uses_conveyor/>).
Activity
engine: tolerate unknown XMILE header options, add missing variants
engine: tolerate unknown XMILE header options, add missing variants