Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/mcap: Fix scenario where schemaID equals 0 #991

Closed
wants to merge 636 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
636 commits
Select commit Hold shift + click to select a range
9647417
fix Rust details in top-level readme (#596)
james-rms Sep 22, 2022
ef5da8b
Move specification to top-level (#598)
jhurliman Sep 22, 2022
ef7a5b8
Remove lodash dependency from @mcap/core (#597)
jhurliman Sep 22, 2022
7199bf7
Add debug output to swiftformat CI step (#600)
jtbandes Sep 22, 2022
d0d3ee8
swift: add indexed reader, update docs (#603)
jtbandes Sep 23, 2022
a0bd140
MIT License (#601)
amacneil Sep 23, 2022
1cd4276
Remove pre0 support from typescript library (#602)
jhurliman Sep 23, 2022
ba5897c
Use Docker images for swiftformat & swiftlint (#604)
jtbandes Sep 23, 2022
34e6c07
cpp: release 0.3.0 for MIT license change (#608)
jtbandes Sep 26, 2022
f72ad06
Swift: rename MCAP0_MAGIC to mcapMagic (#612)
jtbandes Sep 26, 2022
1ee7925
[TypeScript] Rename all MCAP0 references to MCAP (#610)
jhurliman Sep 26, 2022
8087f63
CLI: Add metadata support (#593)
wkalt Sep 26, 2022
2eb4b8a
Remove more references to x- prefixes (#521)
jtbandes Sep 27, 2022
b3c5fc4
conformance: enable data section crc (#576)
james-rms Sep 27, 2022
b47ee4d
upgrade cpp to 0.4.0 (#615)
jtbandes Sep 27, 2022
a882a4e
Fix incorrect reference to Protobufs in JSON docs (#605)
jhurliman Sep 27, 2022
4bea6a5
Rename content_type to media_type across all specs, docs, and librari…
jhurliman Sep 27, 2022
b1df80b
Grammar, paragraph organization edits to History (#607)
jhurliman Sep 27, 2022
b41b180
remove debug output from rust docs (#617)
james-rms Sep 27, 2022
85e8902
[Python] Add context manager support to ros1 writer (#619)
jhurliman Sep 28, 2022
a3a0ac2
Add support for adding metadata/attachments (#614)
wkalt Sep 28, 2022
6c0e55e
cli: add recover & compress commands (#599)
jtbandes Sep 28, 2022
eac4ff1
Print help instructions if get or list are used without args (#623)
wkalt Sep 29, 2022
42e5cbd
Add rosbag bz2 support to `mcap convert` (#621)
jhurliman Sep 29, 2022
497f8e6
Rust: Port anduril/mcap-rs (#611)
mrkline Sep 30, 2022
1633b8e
add page descriptions and social cards (#624)
jtbandes Sep 30, 2022
b3b27fd
pages: upgrade hdoc to 1.3.1 (#625)
jtbandes Sep 30, 2022
f8045ed
more consistent capitalization/casing (#626)
jtbandes Sep 30, 2022
6cc17a1
cli release: cc maintainers (#627)
jtbandes Sep 30, 2022
89fa6ea
upgrade hdoc to 1.3.2 (#628)
jtbandes Oct 1, 2022
fc0123f
Remove mcap0 from python import path (#629)
james-rms Oct 3, 2022
60138e0
[cli] Replace log.Fatal*() calls with die() (#630)
jhurliman Oct 3, 2022
ee428ec
[cli] Add --version / -v support (#631)
jhurliman Oct 3, 2022
d324bec
Fix hashFiles() input for C++ CI caching (#632)
jhurliman Oct 4, 2022
d3a46e5
fix link in README (#636)
james-rms Oct 4, 2022
1f4360a
docs: add ros2 python writer example (#639)
james-rms Oct 7, 2022
8b0afe7
docs: add note about ros2 bag convert (#637)
james-rms Oct 7, 2022
172dd55
[Python] mcap-ros2-support (#640)
jhurliman Oct 7, 2022
4b959c8
[Python] mcap-ros2-support writing, fixes for reading (#641)
jhurliman Oct 10, 2022
33a2d8e
Get rid from static linking of the zstd in mcap cpp (#642)
MichaelOrlov Oct 10, 2022
1eba9a5
go: do not calculate CRC if not required (#650)
james-rms Oct 12, 2022
5eef951
add release instructions to cpp docs (#655)
jtbandes Oct 12, 2022
8d79384
python: validate CRC within reader (#652)
james-rms Oct 12, 2022
4d2bb5f
go: use internal version string (#649)
james-rms Oct 13, 2022
b3f6715
add mcap-ros2-support publishing steps (#662)
james-rms Oct 13, 2022
87082b2
go: bump to v0.1.1 (#663)
james-rms Oct 13, 2022
1459bc7
mcap info to display the file size (#654)
wimagguc Oct 14, 2022
46904d8
docs: use bold font for markdown h2/h3 headings (#665)
jtbandes Oct 14, 2022
8e80b49
run CI on go/mcap tags (#668)
james-rms Oct 16, 2022
910ea9a
rust: Provide RawMessageStream of (header, data) tuples (#647)
mrkline Oct 16, 2022
e2c2f5e
rust: Don't force serde on users for our tests (#667)
mrkline Oct 16, 2022
c7a9095
rust: bump version to 0.5.0 (#670)
james-rms Oct 16, 2022
409103e
Add rust writer conformance test runner (#664)
foxymiles Oct 17, 2022
07ea268
rust: use small mcaps for test source data (#669)
james-rms Oct 17, 2022
9157750
Fix rust tests by adding serde as a dev dependency (#671)
foxymiles Oct 17, 2022
917c896
Rust: Use docs-rs for docs (#672)
mrkline Oct 17, 2022
6a779af
docs: add ros2 bag record instructions (#673)
james-rms Oct 19, 2022
52d2f18
mcap-ros1-support: bump version to 0.4.0 (#674)
james-rms Oct 19, 2022
84a420f
Make zstd optional in Rust library (#653)
foxymiles Oct 24, 2022
79e20e3
cpp: add closeLastChunk on McapWriter (#678)
james-rms Oct 25, 2022
8780b21
cpp: remove redundant buffer from filewriter (#681)
james-rms Oct 26, 2022
5afb4f5
Fix typo in ros1 profile spec (#680)
jtbandes Oct 27, 2022
7022310
Add .lfsconfig to work around SwiftPM bug (#685)
jtbandes Oct 27, 2022
a293ea4
CLI: Omit metadata and attachment counts if stats are not present (#666)
wkalt Oct 28, 2022
2fb9f3c
Fix Wikipedia link for LZ4 (#690)
jameskuszmaul-brt Oct 29, 2022
4a5022d
CLI: merge preserves profile from inputs (#692)
james-rms Nov 2, 2022
f56eeeb
cpp: update to v0.6.0 (#696)
james-rms Nov 2, 2022
479c55d
CLI: doctor: warn on schema with empty data and encoding fields (#700)
james-rms Nov 3, 2022
71097dd
doctor: fix format string for empty schema (#701)
james-rms Nov 3, 2022
2e99c7f
Remove note about Swift library being experimental (#703)
jtbandes Nov 3, 2022
a377528
CLI: expose informative error on truncation (#702)
james-rms Nov 3, 2022
2049702
Windows dllexport (#711)
emersonknapp Nov 9, 2022
b6680ae
Fix FileDescriptorSet generation & add test (#717)
jtbandes Nov 9, 2022
143d566
Update data-serialization-formats.md (#715)
1beb Nov 10, 2022
9665c3b
build(deps): bump google-github-actions/auth from 0 to 1 (#714)
dependabot[bot] Nov 10, 2022
64059d4
Release @mcap/core v0.3.0 (#722)
jtbandes Nov 14, 2022
66d9308
Windows Action CI (#713)
james-rms Nov 14, 2022
c9e6046
cpp: update version to v0.7.0 (#725)
james-rms Nov 15, 2022
b4990af
cpp: fix windows CI (#728)
james-rms Nov 16, 2022
cc895b4
CLI: filtering with multiple exclude matchers works (#729)
james-rms Nov 16, 2022
d68209c
Add ROS 2 storage plugin evaluation (#712)
james-rms Nov 17, 2022
67f0247
docs: fix incorrect html escape in json guide (#742)
jtbandes Nov 21, 2022
9e3cae2
mcap_protobuf: add MessageFactory internal to Decoder (#730)
james-rms Nov 21, 2022
5980454
Go: add support for stream handling of attachments (#737)
wkalt Nov 21, 2022
695314d
Increment go library version (#743)
wkalt Nov 21, 2022
f7b5322
remove lfsconfig (#744)
james-rms Nov 22, 2022
7d57a00
Add Mcap typescript flatbuffer encoding example (#726)
snosenzo Nov 22, 2022
2a23f93
Fix python and swift CI (#752)
james-rms Nov 28, 2022
6ec537c
CLI: display small byte values with human-readable units (#751)
james-rms Nov 29, 2022
e84f2e3
mcap_protobuf: decoder uses separate factory for each schema (#753)
james-rms Nov 29, 2022
43b14e3
rust: writer automatically breaks chunks at size (#754)
james-rms Nov 30, 2022
ff1a275
Go: address goroutine leak when lexing zstd-compressed mcap (#749)
wkalt Nov 30, 2022
63704a5
rust: release 0.6.0 (#757)
jtbandes Dec 2, 2022
211aa9d
cpp: update to lz4 1.9.4 (#762)
james-rms Dec 6, 2022
2e0d154
ci.yml: pin pypa release action v1.5 (#764)
james-rms Dec 7, 2022
353e4a3
cpp: read messages in deterministic order, yield message offset in Me…
james-rms Dec 7, 2022
b58b358
Revert "ci.yml: pin pypa release action v1.5 (#764)" (#766)
james-rms Dec 7, 2022
478eb69
Update bag2mcap (#769)
defunctzombie Dec 7, 2022
608d14b
Add Flatbuffers doc page (#767)
snosenzo Dec 12, 2022
916fd15
Add conformance test for reading messages in deterministic order (#770)
james-rms Dec 19, 2022
1c337d1
python: bump mcap version to 0.0.16 (#773)
james-rms Dec 19, 2022
390d1fd
Properly track TenMessages fixture with LFS (#774)
james-rms Dec 19, 2022
34717e4
go: update version to v0.4.0 (#775)
james-rms Dec 19, 2022
8bf1b72
rust: breaking change: set default chunk size to a sane value (#777)
james-rms Jan 2, 2023
bd8435e
Revise History section to flow better (#778)
esthersweon Jan 3, 2023
e2d5dc4
build(deps): bump google-github-actions/upload-cloud-storage from 0 t…
dependabot[bot] Jan 4, 2023
ccb27de
swift: reduce exported API (#779)
jtbandes Jan 4, 2023
319fb90
Python, c++: handle reading schemaless channels properly (#782)
james-rms Jan 6, 2023
d0276bd
python: privatize modules in preparation for v1.0 (#780)
james-rms Jan 9, 2023
b3266d3
cpp: make read_job_queue internal (#783)
james-rms Jan 9, 2023
24b3dbe
docs: update logo (#785)
amacneil Jan 10, 2023
8ee83ae
use full url to link to .ksy file (#786)
jtbandes Jan 12, 2023
d72427d
CLI: search optimistically for message definitions (#787)
james-rms Jan 12, 2023
8884743
CLI: `mcap convert` searches subdirectories for ROS 2 message definit…
james-rms Jan 13, 2023
8a5fda8
Fix code formatting in spec appendix (#791)
jtbandes Jan 14, 2023
242d59e
Update mcap dependencies in CLI tool (#798)
wkalt Jan 26, 2023
7b5d733
Updates dependencies in go ROS library (#799)
wkalt Jan 26, 2023
4c42e24
build(deps): bump mislav/bump-homebrew-formula-action from 2.1 to 2.2…
dependabot[bot] Feb 6, 2023
6cb3256
cpp: bump to v1.0.0 (#793)
james-rms Feb 7, 2023
3cc9381
python/mcap: bump to v1.0.0 (#794)
james-rms Feb 7, 2023
9b2dc86
Avoid divide by zero in info on subsecond inputs (#805)
wkalt Feb 7, 2023
342474e
typescript: mcap/core: bump to v1.0.0 (#795)
james-rms Feb 7, 2023
fe62cd7
go: bump library version to v1.0.0 (#796)
james-rms Feb 7, 2023
bcdd7a5
install latest compatible version of conan (#807)
james-rms Feb 8, 2023
6271381
Use @foxglove/wasm-lz4 and @foxglove/wasm-zstd libraries (#808)
jhurliman Feb 8, 2023
167c897
python: close file if writer opens it (#809)
alkasm Feb 13, 2023
ebc5c98
[TypeScript] Add readMetadata() and readAttachments() methods to Mcap…
jhurliman Feb 13, 2023
103e99d
TypeScript @mcap/core 1.1.0 (#812)
jhurliman Feb 14, 2023
705d289
Spec: prohibit zero opcodes (#801)
wkalt Feb 14, 2023
3ccba52
[go] Change zstd from fastest to default (#691)
jhurliman Feb 15, 2023
55e1bb0
cli: filter does not duplicate schema records (#816)
james-rms Feb 16, 2023
d5867de
Add image_example.py, use foxglove-schemas-protobuf package (#814)
jhurliman Feb 16, 2023
d88ab97
[Python] Add enable_crcs and enable_data_crcs Writer options. Expose …
jhurliman Feb 17, 2023
e6ebbb1
[cli] Add `mcap decompress` command (#819)
jhurliman Feb 17, 2023
088bef0
[cli] `mcap doctor --verbose`, default to silence (#820)
jhurliman Feb 17, 2023
b0647c9
Update TypeScript dependencies (#821)
jhurliman Feb 17, 2023
0c7ae66
docs: ros2: handle case using rosbag2_py for non-string msgs (#824)
james-rms Feb 21, 2023
a55e502
[C++] Add ZFP image writing example (#825)
jhurliman Feb 21, 2023
4b6283f
CLI: add warning recommending against partial message indexing (#823)
james-rms Feb 22, 2023
9c7b6e8
specification: clarify where channels can be recorded (#827)
james-rms Feb 22, 2023
c178ce8
Revert "[C++] Add ZFP image writing example (#825)" (#828)
defunctzombie Feb 23, 2023
d9d32e7
CLI: fix bug where `mcap merge` crashes on channels with schema_id ==…
james-rms Feb 23, 2023
9eabaec
[TypeScript] Add `noMagicPrefix` option to McapStreamReader to allow …
jhurliman Feb 23, 2023
e5becd8
build(deps): bump actions/checkout from 2 to 3 (#832)
dependabot[bot] Feb 24, 2023
5c8a49b
Update ROS library to support bounded fields in mcap convert (#833)
wkalt Feb 27, 2023
f4e7c69
python: fix doc generation for Writer (#835)
james-rms Feb 28, 2023
9f15651
@mcap/core 1.2.0 (#836)
jhurliman Feb 28, 2023
18e757d
fix bad mutation in merge (#839)
jtbandes Feb 28, 2023
f0c228f
[TypeScript] @mcap/support (#838)
jhurliman Feb 28, 2023
3448e74
Revert "[TypeScript] @mcap/support (#838)" (#841)
defunctzombie Mar 1, 2023
b9eb609
Export error type for invalid zero opcode (#800)
wkalt Mar 1, 2023
7513091
go/ros: ros1msg parser accepts fields separated by tabs and spaces (#…
james-rms Mar 2, 2023
493272b
Specify that installing with go install is not supported (#826)
wkalt Mar 2, 2023
d242450
CLI: info: handle durations > 2**63 (#844)
james-rms Mar 7, 2023
137cfe2
python/mcap: fix statistics deserialization (#846)
james-rms Mar 9, 2023
85ce59f
[C++] Fix warnings from extra semicolons and missing override keyword…
jhurliman Mar 13, 2023
07ab378
Update example for mcap_ros2.reader (#855)
idrilirdi Mar 14, 2023
0be12a1
Speed up the info subcommand (#854)
wkalt Mar 14, 2023
efc95d0
Go indexed reader: locate summary section end by scanning for footer …
wkalt Mar 14, 2023
b63a4dc
typescript: make forward and reverse iterators true opposites with mu…
jtbandes Mar 16, 2023
224fee9
fix(cli): sigsev on null schema (#857)
jon-chuang Mar 19, 2023
6e5ecba
go/ros/bag2mcap: check connection ids fit into 16-bit channel IDs (#864)
james-rms Mar 27, 2023
674f979
Better example for metadata name (#865)
amacneil Mar 27, 2023
11eb7db
specification: remove errant extra line (#869)
james-rms Mar 27, 2023
c530819
Upgrade to Yarn v3 (#866)
amacneil Mar 27, 2023
729fd32
Clean up .gitattributes (#870)
amacneil Mar 28, 2023
9019166
Yarn dedupe (#871)
amacneil Mar 29, 2023
1381575
go/mcap: do not write empty message indexes (#873)
james-rms Mar 30, 2023
79f8287
python-ros2-support: provide type and full text attributes (#872)
james-rms Mar 30, 2023
71e57b8
Fix bug in ros1msg parser (#877)
wkalt Apr 4, 2023
9c45924
Use buffered IO in mcap conversion (#878)
wkalt Apr 10, 2023
afb9272
Speed up ROS to JSON transcoder (#882)
wkalt Apr 15, 2023
5b9bffb
CLI: represent NaNs consistently in cat --json (#884)
james-rms Apr 17, 2023
fbaa2c3
Add profile switch for CLI operations (#881)
wkalt Apr 26, 2023
dc90754
doctor: do not error on schemaless channels (#885)
james-rms Apr 30, 2023
5e1a5bc
Ensure errors from the merge command contain the filename that produc…
wkalt May 4, 2023
a4a3081
TypeScript Text Annotations example (#889)
snosenzo May 11, 2023
29a199a
Fix McapProtobufMessage docstring (#891)
KTong821 May 15, 2023
1ac8b2a
Fix mcap conversion for bzip2 bags (#890)
wkalt May 15, 2023
d183f26
cpp: fix header parsing (#892)
james-rms May 16, 2023
a3e6610
CLI: remove MCAP doctor on chunks with no messages, schemaless channe…
james-rms May 17, 2023
3a1d364
build(deps): bump actions/setup-go from 3 to 4 (#858)
dependabot[bot] May 21, 2023
834722d
New website (#867)
amacneil May 23, 2023
43a63a7
Website fixes (#897)
amacneil May 24, 2023
e07d6c7
Auto detect Go version in GitHub Actions (#896)
amacneil May 24, 2023
c0549e1
CPP: add getter for metadata indices (#898)
emersonknapp May 30, 2023
bf36500
cpp: bump to 1.1.0 (#902)
emersonknapp May 30, 2023
789b37c
fix link (#900)
james-rms May 31, 2023
2a1c854
Website: Another icon fix (#903)
amacneil May 31, 2023
8961db7
CLI: Add capability to specify attachment name (#905)
wkalt Jun 6, 2023
c6409e0
Add live demo to website (#879)
jtbandes Jun 6, 2023
9c360f4
Update docusaurus.config.js (#907)
esthersweon Jun 7, 2023
233d5e9
Use 'API reference' for consistency with previously made changes (#908)
esthersweon Jun 7, 2023
0b45a92
Docs: rearrange record ordering more logically (#904)
wkalt Jun 8, 2023
008a7aa
Make demo copy more concise (#909)
esthersweon Jun 8, 2023
0907f57
fix footnotes in feature matrix (#910)
jtbandes Jun 9, 2023
10112a8
Update copy on MCAP home page (#906)
esthersweon Jun 12, 2023
57aadc3
demo: show camera immediately when enabled (#916)
jtbandes Jun 15, 2023
00b6a53
python/mcap: add API to decode messages while reading (#883)
james-rms Jun 16, 2023
264e189
Support fast addition of attachments/metadata (#915)
wkalt Jun 16, 2023
7ef0f15
Add isort formatter for import order (#914)
emersonknapp Jun 16, 2023
6238b21
Add company logos to MCAP homepage (#912)
esthersweon Jun 20, 2023
8257df6
Add header to logos section; link each logo to website (#917)
esthersweon Jun 29, 2023
e1b5fe4
Tighten python protobuf dependency to `<=4.21.11` to fix potential se…
achim-k Jul 6, 2023
ecc23a3
Bump mcap-protobuf-support to 0.4.0 (#920)
jtbandes Jul 6, 2023
aaa6261
mcap filter: don't die on schema id 0 (#921)
jtbandes Jul 7, 2023
251b379
specification: add omgidl to appendix (#894)
james-rms Jul 12, 2023
efc1a1b
cpp: re-use allocations for message indexes in writer (#925)
james-rms Jul 19, 2023
d48afa1
fix python reader support for mcap without summary (#928)
omegacoleman Jul 23, 2023
870ae40
Website: Configure Fathom for SPA (#929)
amacneil Jul 25, 2023
fce13c6
Respect validateCrc option for chunk reading in typescript indexed re…
foxymiles Jul 26, 2023
51c3726
Bump typescript mcap/core version to 1.3.0 (#933)
foxymiles Jul 27, 2023
224539f
Rust: properly handle messages with log_time 0 (#930)
mrkline Jul 27, 2023
dcd7634
Fix outdated link in C++ header (#935)
defunctzombie Jul 27, 2023
2d5dced
Website: Fix deployment key (#936)
amacneil Jul 28, 2023
e8eecfd
Fix typescript npm publish CI steps (#937)
foxymiles Jul 28, 2023
f39f59b
Spec: improve description of sequence field (#938)
wkalt Jul 31, 2023
b926bb5
Add og-image for mcap.dev site (#940)
esthersweon Aug 3, 2023
1fd5c93
Add Waabi logo to landing page (#946)
esthersweon Aug 15, 2023
82341ab
swift: don't try to use ARM intrinsics on iOS (#947)
jtbandes Aug 21, 2023
d213b08
mcap_ros2: Fix serde of empty messages (#949)
achim-k Aug 23, 2023
9d65469
Fix python ROS1 example (#951)
achim-k Aug 23, 2023
1230b4b
Go: Allocate less in indexed message chunk loading (#950)
wkalt Aug 24, 2023
be974a2
Bump go library version (#952)
wkalt Aug 24, 2023
c8f5f4c
CLI: Properly support --name parameter on add attachment (#953)
wkalt Aug 25, 2023
d0acc2f
Update Homebrew formula path (#954)
jtbandes Aug 28, 2023
eec851c
cpp: fix warning in examples on msvc (#948)
pezy Aug 30, 2023
29f9059
swift: flush writer buffer when closing a chunk (#960)
jtbandes Aug 30, 2023
bf3d57e
mcap-ros1-support: Add missing pyyaml dependency (#956)
achim-k Sep 1, 2023
2d8ab43
Revise docs for CLI to include correct release download link (#965)
esthersweon Sep 5, 2023
0b76956
Fix ROS 2 message equality check (#964)
achim-k Sep 6, 2023
59f7082
Add Apex AI logos (#962)
esthersweon Sep 6, 2023
b5d0e5e
Tidy upper part of info table (#967)
Sep 8, 2023
5a1f93e
fix: LinearMessageView begin does not compare equal to begin (#969)
james-rms Sep 12, 2023
f0512c2
Go: add support for custom compression (#968)
Sep 12, 2023
d20db09
build(deps): bump mislav/bump-homebrew-formula-action from 2.2 to 2.3…
dependabot[bot] Sep 12, 2023
d8229c8
Python: Detect invalid magic when instantiating SeekingReader (#971)
achim-k Sep 13, 2023
cf3823a
Don't run docs-deploy job on Dependabot PRs (#978)
jtbandes Sep 20, 2023
6562d9c
Add progress bar for `mcap convert` (#973)
narasaka Sep 20, 2023
196a499
Fix spelling in Readme (#980)
yizhang24 Sep 25, 2023
93391d8
CLI/merge: Avoid duplication of identical schemas (#982)
achim-k Sep 28, 2023
654dc1c
build(deps): bump mislav/bump-homebrew-formula-action from 2.3 to 3.1…
dependabot[bot] Sep 30, 2023
0b8bcd3
Lint mcap cli (#981)
narasaka Oct 3, 2023
bfc81b1
fix negative timestamp in cpp protobuf example (#984)
wirthual Oct 4, 2023
7da9a4f
Revert to title case for header; Use consistent casing / copy in foot…
esthersweon Oct 4, 2023
c77c8a5
rust: update binrw to v0.12.0 (#987)
james-rms Oct 4, 2023
8d9d9e6
[Rust - bugfix] read_record_from_slice checking wrong size of buffer …
dmweis Oct 4, 2023
3700944
Use Python 3.8 for CI builds (#988)
achim-k Oct 6, 2023
41f0c57
go/mcap: Fix scenario where schemaID equals 0
StarCsu Oct 10, 2023
05d5ca6
Merge branch 'main' into fix-zeroschemaid
StarCsu Oct 11, 2023
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
4 changes: 2 additions & 2 deletions go/mcap/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestIndexedReaderBreaksTiesOnChunkOffset(t *testing.T) {
assert.Nil(t, err)
assert.Nil(t, writer.WriteHeader(&Header{}))
assert.Nil(t, writer.WriteSchema(&Schema{
ID: 0,
ID: 1,
Name: "",
Encoding: "",
Data: []byte{},
Expand Down Expand Up @@ -586,7 +586,7 @@ func TestReadingMessageOrderWithOverlappingChunks(t *testing.T) {
assert.Nil(t, err)
assert.Nil(t, writer.WriteHeader(&Header{}))
assert.Nil(t, writer.WriteSchema(&Schema{
ID: 0,
ID: 1,
Name: "",
Encoding: "",
Data: []byte{},
Expand Down
6 changes: 6 additions & 0 deletions go/mcap/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ func (w *Writer) WriteFooter(f *Footer) error {
// identified within a file by their schema ID. A Schema record must occur at
// least once in the file prior to any Channel Info referring to its ID.
func (w *Writer) WriteSchema(s *Schema) (err error) {
if s == nil {
return errors.New("schema struct can not be nil")
}
if s.ID == 0 {
return errors.New("schemaID must not be zero")
}
msglen := 2 + 4 + len(s.Name) + 4 + len(s.Encoding) + 4 + len(s.Data)
w.ensureSized(msglen)
offset := putUint16(w.msg, s.ID)
Expand Down
Loading