diff --git a/Cargo.lock b/Cargo.lock index d54fc24..5b846b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,8 +236,8 @@ dependencies = [ [[package]] name = "xtce-codegen" -version = "0.1.0" -source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=63d14a4be6400d909c20d64e5ec82b369ad3d4ef#63d14a4be6400d909c20d64e5ec82b369ad3d4ef" +version = "0.1.1" +source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=17671eaf4ea8aa9fb17c096001b39ecd88e77059#17671eaf4ea8aa9fb17c096001b39ecd88e77059" dependencies = [ "prettyplease", "proc-macro2", @@ -249,8 +249,8 @@ dependencies = [ [[package]] name = "xtce-decode" -version = "0.1.0" -source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=63d14a4be6400d909c20d64e5ec82b369ad3d4ef#63d14a4be6400d909c20d64e5ec82b369ad3d4ef" +version = "0.1.1" +source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=17671eaf4ea8aa9fb17c096001b39ecd88e77059#17671eaf4ea8aa9fb17c096001b39ecd88e77059" dependencies = [ "thiserror", "xtce-model", @@ -258,7 +258,7 @@ dependencies = [ [[package]] name = "xtce-flight" -version = "0.1.0" +version = "0.1.1" dependencies = [ "clap", "prettyplease", @@ -272,7 +272,7 @@ dependencies = [ [[package]] name = "xtce-flight-e2e" -version = "0.1.0" +version = "0.1.1" dependencies = [ "xtce-decode", "xtce-flight", @@ -281,8 +281,8 @@ dependencies = [ [[package]] name = "xtce-model" -version = "0.1.0" -source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=63d14a4be6400d909c20d64e5ec82b369ad3d4ef#63d14a4be6400d909c20d64e5ec82b369ad3d4ef" +version = "0.1.1" +source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=17671eaf4ea8aa9fb17c096001b39ecd88e77059#17671eaf4ea8aa9fb17c096001b39ecd88e77059" dependencies = [ "quick-xml", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 206198a..b69779a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = ["crates/*"] exclude = ["probes/nostd"] [workspace.package] -version = "0.1.0" +version = "0.1.1" edition = "2024" rust-version = "1.85" license = "MIT OR Apache-2.0" @@ -19,9 +19,9 @@ xtce-flight = { path = "crates/xtce-flight", version = "0.1.0", default-features # Pinned to a revision, not a branch. `xtce_codegen::plan` is this project's input format; # a moving dependency would mean an unrelated commit there breaks a build here. -xtce-model = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "63d14a4be6400d909c20d64e5ec82b369ad3d4ef" } -xtce-codegen = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "63d14a4be6400d909c20d64e5ec82b369ad3d4ef" } -xtce-decode = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "63d14a4be6400d909c20d64e5ec82b369ad3d4ef" } +xtce-model = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "17671eaf4ea8aa9fb17c096001b39ecd88e77059" } +xtce-codegen = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "17671eaf4ea8aa9fb17c096001b39ecd88e77059" } +xtce-decode = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "17671eaf4ea8aa9fb17c096001b39ecd88e77059" } clap = { version = "4", features = ["derive"] } prettyplease = "0.2" diff --git a/docs/releases/v0.1.1.md b/docs/releases/v0.1.1.md new file mode 100644 index 0000000..8ef7ea1 --- /dev/null +++ b/docs/releases/v0.1.1.md @@ -0,0 +1,33 @@ +A definition shape that generated a decoder rejecting every packet is refused instead. + +## What was wrong + +`abstract` defaults to **false** in XTCE. So a base `SequenceContainer` that nobody marked — +the ordinary CCSDS primary-header shape, which is most definitions — was emitted as a concrete +container, and a concrete container with no restriction criteria has `true` for the body of its +generated `matches`. + +The module-level `decode` counts how many containers match and refuses a packet that matches +more than one. Every packet therefore matched the base *and* its own child, and every packet +came back `DecodeError::Ambiguous`. The generator said nothing, and the place that would have +found out is the spacecraft. + +It is refused at generation time now, naming the container and giving both ways out: + +```console +$ xtce-flight generate mission.xml -o telemetry.rs +error: cannot compile in FlightPacket: this container has no restriction +criteria, so it matches every packet long enough to hold it; beside the other containers +generated here that makes every packet ambiguous. Mark it abstract="true" if other containers +inherit from it, or give it criteria that select it +``` + +Narrow on purpose: only when the definition has more than one container. A lone concrete +container with no criteria *is* the whole definition and still generates. + +## Also + +Pinned to `xtce-rs` v0.1.1, which brings three XTCE constructs that used to be read as if they +were absent — an `` among them. + +43 tests, and the bare-metal no-panic gate as before. diff --git a/probes/nostd/Cargo.lock b/probes/nostd/Cargo.lock index 722b666..835fc3c 100644 --- a/probes/nostd/Cargo.lock +++ b/probes/nostd/Cargo.lock @@ -95,8 +95,8 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "xtce-codegen" -version = "0.1.0" -source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=63d14a4be6400d909c20d64e5ec82b369ad3d4ef#63d14a4be6400d909c20d64e5ec82b369ad3d4ef" +version = "0.1.1" +source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=17671eaf4ea8aa9fb17c096001b39ecd88e77059#17671eaf4ea8aa9fb17c096001b39ecd88e77059" dependencies = [ "prettyplease", "proc-macro2", @@ -108,7 +108,7 @@ dependencies = [ [[package]] name = "xtce-flight" -version = "0.1.0" +version = "0.1.1" dependencies = [ "prettyplease", "proc-macro2", @@ -129,8 +129,8 @@ dependencies = [ [[package]] name = "xtce-model" -version = "0.1.0" -source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=63d14a4be6400d909c20d64e5ec82b369ad3d4ef#63d14a4be6400d909c20d64e5ec82b369ad3d4ef" +version = "0.1.1" +source = "git+https://github.com/RustSpaceLab/xtce-rs?rev=17671eaf4ea8aa9fb17c096001b39ecd88e77059#17671eaf4ea8aa9fb17c096001b39ecd88e77059" dependencies = [ "quick-xml", "thiserror", diff --git a/probes/nostd/Cargo.toml b/probes/nostd/Cargo.toml index 71e84f7..cda03bb 100644 --- a/probes/nostd/Cargo.toml +++ b/probes/nostd/Cargo.toml @@ -16,7 +16,7 @@ path = "src/lib.rs" [build-dependencies] xtce-flight = { path = "../../crates/xtce-flight", default-features = false } -xtce-model = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "63d14a4be6400d909c20d64e5ec82b369ad3d4ef" } +xtce-model = { git = "https://github.com/RustSpaceLab/xtce-rs", rev = "17671eaf4ea8aa9fb17c096001b39ecd88e77059" } [profile.release] opt-level = "z"