mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
broker/Data/data_to_val: Fail on vectors/lists with holes
Instead of simply removing holes from vectors or lists when converting from Val to Broker format, error out as the receiver has no chance to reconstruct where the hole might have been. We could encode holes with broker::none, but this will put unnecessary burden on language bindings and users due to the potential optionality. Think a std::vector<uint64_t> that technically needs to be a std::vector<std::optional<uint64_t>> to represent optional elements properly. Closes #3045
This commit is contained in:
parent
b9b268bd86
commit
7092db6318
7 changed files with 121 additions and 4 deletions
6
NEWS
6
NEWS
|
@ -17,6 +17,12 @@ New Functionality
|
|||
Changed Functionality
|
||||
---------------------
|
||||
|
||||
- Publishing remote events with vector arguments that contain holes is now
|
||||
rejected. The receiver side never had a chance to figure out where these
|
||||
holes would have been. There's a chance this breaks scripts that accidentally
|
||||
published vectors with holes. A reporter error is produced at runtime when
|
||||
serialization of vectors with holes is attempted.
|
||||
|
||||
Removed Functionality
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue