Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
33 changes: 33 additions & 0 deletions docs/releases/v0.1.1.md
Original file line number Diff line number Diff line change
@@ -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 <SequenceContainer> 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 `<IncludeCondition>` among them.

43 tests, and the bare-metal no-panic gate as before.
10 changes: 5 additions & 5 deletions probes/nostd/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion probes/nostd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading