Repository navigation
Releases
1.2.0
Actions and services whose IDL differs between distributions are merged across them, as
messages already were, on one merge path with one error format; an action's goal, result and
feedback have their constants. Messages and services that are the same in every distribution
generate as in 1.1.1, and so do actions that have no constants; the runtime modules do not
change.
Added
- Actions whose
.actiondiffers between distributions, such as
nav2_msgs/action/NavigateToPose; they were rejected. Their goal, result and feedback are
merged like messages: a field that only some distributions have is written and read only for
them, and the constants are those of every distribution. The five wrappers are shared, and
typeInfo(for:)returns each distribution's hashes of the parts, the wrappers and the
SendGoal and GetResult services, as rosidl computes them from that distribution's.action.
NewIRBuilder.build(perDistro:)overload for[String: IDLAction]. - Services whose
.srvdiffers between distributions, such asnav2_msgs/srv/IsPathValid,
whose request gains fields in Kilted and Lyrical and whose response gainssuccessin
Lyrical; they were rejected. The request and the response are merged like messages: a field
that only some distributions have is written and read only for them, and the constants are
those of every distribution.<Name>Srv.typeInfo(for:)returns each distribution's request,
response and service hashes, as rosidl computes them from that distribution's.srv, and
--verify-hasheschecks the service's event type on each distribution too.
Changed
- An action whose goal, result or feedback field changes type between distributions is
reported at that field's line in the.actionof the first distribution that changes it,
with the type of every distribution (action 'J' cannot be merged across distributions: goal field 'g' changes type: int32 in [jazzy], int64 in [lyrical]). - Messages, services and actions are merged across distributions on one path, and every type
that cannot be merged is reported in the format above: at the line of the.msg,.srvor
.actionof the distribution that introduces the problem, with the type, its part and, for a
field that changes type, its type in every distribution. This covers a message field that
changes type (a bareIRMergeErrorthat named no file), shared fields in a different order,
and a field that skips a distribution (GeneratorError.modernDistroDivergence, which the
pipeline no longer throws). A.srvwhose parts parse to the same IDL apart from comments and
layout is no longer rejected and generates as the oldest distribution's.srv, and an invalid
default or constant in a.srvnames the file's path, as in a.msgor.action. A type that
is the same in every distribution is decided on the parsed IDL, never on a float comparison, so
anandefault is the same as itself and0.0differs from-0.0.
Services and actions now use the union of the runs'--typeslists, as messages already did;
only programmatic callers that pass a different list per run are affected, and a run with
niladds nothing to the union, as for messages.
Fixed
- A generated action has the constants of its goal, result and feedback (for example
FollowJointTrajectoryAction.Result.INVALID_GOALof
control_msgs/action/FollowJointTrajectory); they were dropped. The three parts are now
emitted by the message emitter, as the action's wrappers already were. IRMergeError.conflictingFieldTypelists the type of every distribution that has the field.
With three or more distributions it could give the first distribution's type for one that
changed it, and leave distributions out.
What's Changed
- ci: publish the GitHub release when a version tag is pushed by @youtalk in #47
- fix(gen): emit action goal, result and feedback with the message struct emitter by @youtalk in #48
- fix(gen): report every distribution's type in a field-type conflict by @youtalk in #49
- feat(gen): merge actions that differ between distributions by @youtalk in #50
- refactor(gen): merge messages, services and actions across distributions on one path by @youtalk in #52
- feat(gen): merge services that differ between distributions by @youtalk in #53
- chore(release): 1.2.0 by @youtalk in #54
Full Changelog: 1.1.1...1.2.0
1.1.1
A fix for the oracle check of large types.
Fixed
swift-ros2-gen --verify-hashesno longer hangs on a<Type>.jsonlarger than a pipe
buffer (64 KiB), such as the files ofmoveit_msgs/action/MoveGroup: the oracle client
reads the output ofdocker runwhile the container runs instead of after it exits.
What's Changed
- fix(gen): read oracle output while the container runs by @youtalk in #45
- chore(release): 1.1.1 by @youtalk in #46
Full Changelog: 1.1.0...1.1.1
1.1.0
Message fields that differ among the distributions after Humble, with one type hash per
distribution where they differ. Types that differ only on Humble generate as in 1.0.
Added
- Message fields that differ among the distributions after Humble. Pass a package once per
distribution and the generator merges the IDL into one type: a field that only some
distributions have is written and read only for them (encoder.schemaDistro >= .lyrical),
is decoded as its IDL default elsewhere, and says so in its doc comment. A message, service
or action whose hash differs among distributions, including one that only reaches such a
type (even one read for more distributions than the type itself), getstypeInfo(for:)with
one hash per change;typeInfostays the Jazzy one. A
distribution with no IDL passed (Rolling) takes the newest passed distribution that is not
newer (IRBuilder.schemaDistro(for:read:)). Types that differ only on Humble generate as
before. ROS2DistroisComparablein release order, Rolling greatest.CDREncoder(distro:),CDRDecoder(data:distro:)andschemaDistroon both, and
schemaDistroNameinSwiftROS2CDR. The existing initializers keep the 1.0 behaviour
(Humble when legacy, otherwise Jazzy).typeInfo(for:)requirements onROS2MessageType,ROS2ServiceTypeandROS2Action, with
default implementations that returntypeInfowithout its hashes on Humble, and
withoutTypeHasheson the three type info structs. swift-ros2 needs them to send the
layout and hash of the distribution it runs against.SwiftEmitter.emitServiceUmbrella(…, hashesByDistro:, …)andServiceHashes.- The generated oracle corpus encodes and decodes the samples of
OracleSamples.samples(for:)
with that distribution's message schemas (OracleSamples.allkeeps the default ones), and
RosidlOracleCorpusround-trips both sets.
Changed
- Fields that two distributions have in a different order are rejected (
IRBuildError); the
merged type used the first distribution's order for all of them. GeneratorError.modernDistroDivergencenow reports a field missing from a distribution
between two that have it; any other difference among modern distributions is supported.RIHS01.hash(_:for:registry:)projects a merged type onto the distribution it was read for
that gives its shape (see above) when asked for a distribution it was not read for.swift-ros2-gen --verify-hashes --distros <d>reads every--inputdistribution and checks
every type on every selected distribution (default: every distribution of the inputs but
Humble) with the hash its generatedtypeInfo(for:)returns there, including distributions
its package was not read for (Rolling); a type missing from a distribution its package was
read for is skipped there. Theinterface-oracles.ymlhash oracle passes every
generated distribution (Scripts/generator-args.shwithout an argument) with
--distros <row>, so it verifies the hashes the generated code carries rather than one
distribution's IDL alone.
Fixed
- A message with no fields in some distributions writes and reads rosidl's
structure_needs_at_least_one_memberbyte in exactly those distributions (Humble splits
included), matching its hash; the codec wrote nothing there. - A field a later distribution adds in the middle of a message is placed where that
distribution has it, not at the end. IRBuilder.populateActionHashes(_:distro:extraRegistry:)projects the types an action
references ontodistroinstead of hashing every field any distribution has.
What's Changed
- feat(messages): order distributions and carry the schema distro in the CDR codec by @youtalk in #37
- feat(messages): typeInfo(for:) requirements with defaults by @youtalk in #38
- fix(gen): merge field order per distribution and reject reordered fields by @youtalk in #39
- fix(gen): project action hashes per distribution by @youtalk in #40
- feat(gen): fields that differ among modern distributions by @youtalk in #41
- feat(oracle): verify the emitted per-distribution hashes and CDR shapes by @youtalk in #42
- chore(release): 1.1.0 by @youtalk in #44
Full Changelog: 1.0.1...1.1.0
1.0.1
Patch release: the reusable interface-oracles.yml workflow upgrades the oracle image's packages after installing apt-packages, so callers that install extra packages no longer fail against an older published osrf/ros image (#35). The package code is unchanged since 1.0.0.
1.0.0
First stable release of swift-ros2-rosidl: the XCDR v1 CDR codec, the ROS 2 message, service and action protocols, the runtime interface packages, and the swift-ros2-gen generator with its SwiftPM build plugin. The public API is now covered by semantic versioning.
The code is unchanged since 1.0.0-rc.3, which passed live interop through swift-ros2 against ROS 2 Humble, Jazzy, Kilted and Lyrical hosts over Zenoh and DDS. The README walkthrough was corrected in #34.
See CHANGELOG.md for the changes since the 1.0.0-rc.1 extraction.
1.0.0-rc.3
Last release candidate before the 1.0.0 API freeze.
- Removed dead public API before the freeze (#21) and trimmed CDRSerializationError to the cases generated code throws (#23).
- Malformed IDL is reported with file and line instead of trapping (#22); generated encode() throws for invalid fixed-array/bounded-sequence lengths (#23).
- Bounded strings are length-checked on encode and decode (#30); wstring fields are rejected until implemented (#31).
- Generator cleanup: one IDL walk, one Source label rule, no SwiftROS2CDR import in service umbrellas (#24, #25, #26); drift guards, DocC for every target, cached CI toolchains (#27, #28, #29).
See CHANGELOG.md.
1.0.0-rc.2
Second release candidate.
ROS2ServiceTypeInfo.serviceTypeHashandROS2ActionTypeInfo.sendGoalServiceTypeHash/getResultServiceTypeHash: service-level type hashes, which rmw_zenoh_cpp uses to key services and action services (additive; defaults are nil) (#17).- swift-ros2-gen emits and
--verify-hasheschecks service-level,_Eventand action-level hashes;ActionMsgsandRclInterfacesare regenerated (#17). - swift-ros2-gen reports unresolved array element types as an error instead of crashing (#19).
- README: generating, packaging and publishing a message module end to end (#18).
See CHANGELOG.md.
1.0.0-rc.1
1.0.0-rc.1
- Extracted from swift-ros2 2.3.2 (CDR, message protocols, runtime interfaces, swift-ros2-gen)
with its history; the 2.3.2 state is commitbe8a4ae5f2e8b5499b6bb199d60684a29ae481f8of this repository. ROS2Distromoved here fromSwiftROS2Wire; wire-only members stay in swift-ros2.- Removed the RCL marshalling and registry emitters,
Pipeline.generateRclMarshallingand the--emit-rcl-marshallingCLI flags (RCL is a swift-ros2 runtime concern). - Runtime interfaces are generated as one module per ROS package (
BuiltinInterfaces,UniqueIdentifierMsgs,ActionMsgs,RclInterfaces). swift-ros2-gen --dependency <pkg>=<path>@<distro>takes packages that are referenced but not emitted.swift-ros2-gen --module <pkg>=<Module>overrides the module name of a package.- Generated files import the modules of the packages they reference (derived imports).
- Distro-safe
typeInfo(for:): Humble gets the legacy schema and every later distribution the modern hash; a field that differs among modern distributions stops generation. - ROS names equal to a Swift standard-library type get a
Msgsuffix, now includingDurationMsg,RangeMsgandClockMsg. - The generator emits CDR oracle samples, and a Swift round-trip check verifies them. Each
sample lists the distributions whose IDL has its type, and the corpus executable takes a
distribution argument (<corpus> <output-dir> <distro>) that writes only that
distribution's samples;interface-oracles.ymlpasses the row's distribution. - Services and actions of a package read from several distributions carry the distributions
that have them, as messages do: an action that only a later distribution has is generated
(it was read from the first distribution only), an action whose shape differs between
distributions is rejected like a service, and--verify-hasheschecks service halves and
action parts in each distribution that has them. - Upstream IDL is pinned in
idl.lockand fetched byScripts/fetch-idl.shinto a gitignored cache (no submodules); generated Swift is committed. - Reusable
interface-oracles.ymlworkflow for hash and CDR oracles in interface repositories, with anapt-packagesinput. - Empty action goals, results and feedback encode and decode rosidl's
structure_needs_at_least_one_memberbyte, as empty messages and service halves already did; before, they wrote no body and rosidl subscribers rejected them.
Known issues
wstring(bounded or not) is encoded likestring(UTF-8, NUL-terminated), which no RMW accepts: Fast-CDR-based RMWs (rmw_fastrtps_cpp,rmw_zenoh_cpp) and Jazzy'srmw_cyclonedds_cppexpect a UTF-16 code-unit count followed by one 4-byte unit per UTF-16 code unit, and Lyrical'srmw_cyclonedds_cppexpects a byte count followed by 2-byte units.