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

Failure to parse .x.["y.z"] notation #1168

Closed
mcint opened this issue Jun 21, 2016 · 14 comments
Closed

Failure to parse .x.["y.z"] notation #1168

mcint opened this issue Jun 21, 2016 · 14 comments

Comments

@mcint
Copy link

mcint commented Jun 21, 2016

mcint@work MINGW64 /c/git

The document

$ less test.json | jq -c '.'
{"a":"A","b":{"c":{"d.e.f":"DEF"}}}

The complex key

$ less test.json | jq -c '.b.c'
{"d.e.f":"DEF"}

One naive approach

$ less test.json | jq -c '.b.c.d.e.f'
null

Solution proposed by the docs

$ less test.json | jq -c '.b.c.["d.e.f"]'
jq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Windows cmd shell quoting issues?) at <top-level>, line 1:
.b.c.["d.e.f"]
jq: 1 compile error

Work-around

$ less test.json | jq -c '.b.c | .["d.e.f"]'
"DEF"

Boundaries of quoted key solution

$ less test.json | jq -c '.b | .c.["d.e.f"]'
jq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Windows cmd shell quoting issues?) at <top-level>, line 1:
.b | .c.["d.e.f"]
jq: 1 compile error
@mcint
Copy link
Author

mcint commented Jun 21, 2016

Trials with 2-part ("z.y") versus 3-part ("z.y.x") key

$ less test2.json | jq -c '.b.c'
{"d.e": "DEF"}
$ less test2.json | jq -'c .b.c.d.e'
null
$ less test2.json | jq -c '.b.c.["d.e"]'
jq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Windows cmd shell quoting issues?) at <top-level>, line 1:
.b.c.["d.e"]
jq: 1 compile error

@ghost
Copy link

ghost commented Jun 21, 2016

The syntax is either .foo (for keys without extraneous characters) or ["foo.bar"] (note the absence of a trailing dot). That is:

jq '.b | .c["d.e.f"]'
jq '.b.c["d.e"]'

So, you may be wondering: how come jq '.b.c | .["d.e.f"]' does work? The answer lies in that the output of the previous filter is represented by .. Therefore, .["d.e.f"] performs ["d.e.f"] over .. The dot can be elided when using .foo as the first filter: that's why it's .b.c and not ..b.c.

@mcint
Copy link
Author

mcint commented Jun 21, 2016

Great, that completely addresses my question, thank you. Good to close.

For the sake of completeness, it looks like the dot must be elided.

$ less test2.json | jq '..b.c'
jq: error: syntax error, unexpected IDENT, expecting $end (Windows cmd shell quoting issues?) at <top-level>, line 1:
..b.c
jq: 1 compile error

@ghost
Copy link

ghost commented Jun 21, 2016

Yes, that is correct: the dot must be elided. I misspoke in my earlier comment.

@rogpeppe
Copy link

This seems to be a documentation issue. The reference documentation
describes the operator as .[0] and says:

When the index value is an integer, .[<value>] can index arrays

This appears to be true only if the dot is at the start. There
are no examples of an array index not at the start, and no
indications that I've found that the dot is not allowed in that
case.

@wtlangford
Copy link
Contributor

wtlangford commented May 11, 2017 via email

@nicowilliams
Copy link
Contributor

My question is: should we add .a.["b"]? I'm tempted to say "no", but this does come up frequently enough that maybe it'd just be for the best. What do we lose if we add this?

@MondayHopscotch
Copy link

This is something I recently ran into, as well. Simplified examples using JQPlay:

With dot (syntax error):
https://jqplay.org/s/itgHiQlNMP

Without dot (happy):
https://jqplay.org/s/AWemvC2Vsv

Is this something that there is a concrete reason behind disallowing? Or is it just a limitation of the current implementation?

Wording my question another way: Is there any reason that supporting this in the future would be explicitly unwanted?

@nicowilliams
Copy link
Contributor

@MondayHopscotch There is no limitation of the current implementation that makes this difficult to support.

As to reasons not to support this, I don't think there are any, and this is a very very FAQ.

This trivial patch adds support for this:

diff --git a/src/parser.y b/src/parser.y
index 6255850..39c7836 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -685,6 +685,12 @@ Term '[' Exp ']' '?' {
 Term '[' Exp ']' %prec NONOPT {
   $$ = gen_index($1, $3);
 } |
+Term '.' '[' Exp ']' '?' {
+  $$ = gen_index_opt($1, $4);
+} |
+Term '.' '[' Exp ']' %prec NONOPT {
+  $$ = gen_index($1, $4);
+} |
 Term '[' ']' '?' {
   $$ = block_join($1, gen_op_simple(EACH_OPT));
 } |
$ ./jq -cn '{a:{b:{c:"d"}}}|.a.["b"]'
{"c":"d"}
$ 

@nicowilliams
Copy link
Contributor

@wtlangford any objections to pushing that patch?

@rogpeppe
Copy link

rogpeppe commented Mar 8, 2019

The syntax is either .foo (for keys without extraneous characters) or ["foo.bar"] (note the absence of a trailing dot).

Perhaps the real issue here is that the documentation doesn't explain the grammar clearly. I can't see anything in the documentation that mentions that [] can be used as an operator at all.

Note that .a.b.c is the same as .a | .b | .c

AFAICS . is being used in two senses here - as an initial value (the first .) and then as a special case as a binary operator. Currently the filter documentation elides the operands for each operator. Perhaps if it didn't, then things might be more obvious.

One other thing: .x.y? works, and the docs document the .foo? form exactly the same was as .[<string>] so it's perhaps not surprising people get confused when .x.["<string>"] doesn't work.

@nicowilliams
Copy link
Contributor

There is certainly a bug in the manual...

   For  example  .["foo::bar"]  and .["foo.bar"] work while .foo::bar does
   not, and .foo.bar means .["foo"].["bar"].

@nicowilliams
Copy link
Contributor

@rogpeppe https://github.com/stedolan/jq/wiki/jq-Language-Description

@nicowilliams nicowilliams self-assigned this Mar 25, 2019
@nicowilliams
Copy link
Contributor

I've pushed 3e0a118 to allow '.foo.["bar"] syntax.

fuzzypixelz added a commit to fuzzypixelz/zenoh-python that referenced this issue Apr 17, 2024
ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.
fuzzypixelz added a commit to fuzzypixelz/zenoh-kotlin that referenced this issue Apr 17, 2024
ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.
fuzzypixelz added a commit to fuzzypixelz/zenoh-c that referenced this issue Apr 17, 2024
ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.
Mallets pushed a commit to eclipse-zenoh/zenoh-python that referenced this issue Apr 17, 2024
* build: Get Read the Docs release number from Cargo manifest

This avoids hardcoding the release number in the documentation build config,
making it easier to bump the version by only modifying the manifest.

* build: Require Python 3.11 in Read the Docs configuration

Python 3.11 is needed to access tomllib; useful for parsing the Cargo manifest file.

* feat: Create branch, bump version and tag in release workflow

* feat: Add publish-github job

* fix: Broken tag dependencies

* chore: Remove enforce-linking-issues workflow

* fix: Bump version in pyproject.toml

* chore: Upgrade artifact actions from v3 to v4

* fix: Typo in git-commit command

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* Revert "chore: Upgrade artifact actions from v3 to v4"

This reverts commit a535971.

* fix: Build wheels from release branch

* fix: Switch to pypa/gh-action-pypi-publish@release/v1

The older actions doesn't recognize the pyproject.toml metadata fields.
Mallets pushed a commit to eclipse-zenoh/zenoh-kotlin that referenced this issue Apr 17, 2024
* feat: Store project version in version.txt

* fix: Remove cargo-deb metadata section in `zenoh-jni`

* feat: Add `bump-and-tag.bash` script

* chore: Rename release workflow to pre-release

* chore: Disable release event on publish workflows

* fix: Typo in ci/scripts

* feat: Automate Release

* chore: Remove enforce-linking-issues workflow

* fix: Set permissions for publishing jobs

* feat: Add publish-dokka to release workflow

* fix: Set release branch in publishing jobs

* fix: Make `branch` input unrequired in publishing jobs

* style: Uniformize publishing workflow names

* fix: Unecessary use of `BOT_TOKEN_WORKFLOW`

* fix: Incorrect Cargo manifest/lockfile path

* fix: Add missing `live-run` input for publish-dokka job

* fix: Typo in pre-release workflow name

* fix: Remove `if: always()` in publish-github job

* fix: Remove unecessary SSH passphrase/privatekey inputs

* chore: Retrigger CI

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.
wyfo pushed a commit to ZettaScaleLabs/zenoh-python that referenced this issue Apr 25, 2024
* build: Get Read the Docs release number from Cargo manifest

This avoids hardcoding the release number in the documentation build config,
making it easier to bump the version by only modifying the manifest.

* build: Require Python 3.11 in Read the Docs configuration

Python 3.11 is needed to access tomllib; useful for parsing the Cargo manifest file.

* feat: Create branch, bump version and tag in release workflow

* feat: Add publish-github job

* fix: Broken tag dependencies

* chore: Remove enforce-linking-issues workflow

* fix: Bump version in pyproject.toml

* chore: Upgrade artifact actions from v3 to v4

* fix: Typo in git-commit command

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* Revert "chore: Upgrade artifact actions from v3 to v4"

This reverts commit a535971.

* fix: Build wheels from release branch

* fix: Switch to pypa/gh-action-pypi-publish@release/v1

The older actions doesn't recognize the pyproject.toml metadata fields.
diogomatsubara pushed a commit to ZettaScaleLabs/zenoh-c that referenced this issue Jul 10, 2024
ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.
Mallets added a commit to eclipse-zenoh/zenoh-python that referenced this issue Aug 2, 2024
* chore: bump pyo3 to 0.21 (#175)

Roughly adapt the code to the new PyO3 API, with a few warning fixes.

* fix(examples): fix commented parts of z_put.py (#176)

* fix(examples): fix commented parts of z_put.py

* fix: apply PR reviews

* fix: apply PR reviews

* Correct the syntax of pyproject.toml (#181)

* feat: Automate Release (#165)

* build: Get Read the Docs release number from Cargo manifest

This avoids hardcoding the release number in the documentation build config,
making it easier to bump the version by only modifying the manifest.

* build: Require Python 3.11 in Read the Docs configuration

Python 3.11 is needed to access tomllib; useful for parsing the Cargo manifest file.

* feat: Create branch, bump version and tag in release workflow

* feat: Add publish-github job

* fix: Broken tag dependencies

* chore: Remove enforce-linking-issues workflow

* fix: Bump version in pyproject.toml

* chore: Upgrade artifact actions from v3 to v4

* fix: Typo in git-commit command

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* Revert "chore: Upgrade artifact actions from v3 to v4"

This reverts commit a535971.

* fix: Build wheels from release branch

* fix: Switch to pypa/gh-action-pypi-publish@release/v1

The older actions doesn't recognize the pyproject.toml metadata fields.

* Force sphinx version to 7.2.6 (#185)

* fix: Install maturin according to requirements-dev.txt (#186)

* fix: fix scout deadlock (#188)

Releasing GIL in Scout destructor prevents the deadlock.

* fix(uhlc): bump uhlc version (#173)

Signed-off-by: gabrik <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>

* feat(tracing): using zenoh-util function for log initialization (#172)

* feat(tracing): using zenoh-util function for log initialization

Signed-off-by: gabrik <[email protected]>

* chore: adding Cargo.lock

Signed-off-by: gabrik <[email protected]>

* feat(tracing): using zenoh main

Signed-off-by: gabrik <[email protected]>

* chore: using new try_init_log_from_env

Signed-off-by: gabrik <[email protected]>

* chore: sync Cargo.lock

Signed-off-by: gabrik <[email protected]>

---------

Signed-off-by: gabrik <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>

* feat: add Attachment to API (#189)

* feat: add Attachment to API

* fix: make attachment a CLI arg in z_put example

* Update zenoh/session.py

Co-authored-by: Luca Cominardi <[email protected]>

* Apply suggestions from code review

Co-authored-by: Luca Cominardi <[email protected]>

* test: add test for attachment

---------

Co-authored-by: Luca Cominardi <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@81217c7 from 2024-04-22 (#190)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Create virtual environment for armv6 build (#191)

* build: Sync  with eclipse-zenoh/zenoh@2fdddae from 2024-04-23 (#192)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9a9832a from 2024-04-24 (#193)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7c64d99 from 2024-04-26 (#194)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ad58af6 from 2024-04-26 (#195)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e8916bf from 2024-04-26 (#196)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ea604b6 from 2024-04-29 (#197)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@371ca6b from 2024-04-30 (#198)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7a47445 from 2024-05-03 (#200)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@f5195c0 from 2024-05-03 (#202)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e53364f from 2024-05-04 (#203)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* test: add z_ping/z_pong examples (#205)

* fix: make attachment API more similar to dict API (#201)

* fix: make attachment API more similar to dict API

* fix: fix formatting

* fix: fix formatting

* fix: fix typing

* fix: uncomment tests 😅

* docs: add docstring for Attachment

* build: Sync  with eclipse-zenoh/zenoh@7e5d5e8 from 2024-05-07 (#206)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: add `Encoding.with_suffix` instead of `Encoding.append` (#208)

* fix: add `Encoding.with_suffix` instead of `Encoding.append`

* feat: add `prefix`/`suffix` methods to `Encoding`

* build: Sync  with eclipse-zenoh/zenoh@b8dd01d from 2024-05-07 (#209)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Support timeout for get in session.

Signed-off-by: ChenYing Kuo <[email protected]>

* Update PR based on the review.

Signed-off-by: ChenYing Kuo <[email protected]>

* Fix CI lint error.

Signed-off-by: ChenYing Kuo <[email protected]>

* Update: PyTypeError => PyValueError

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@45e05f0 from 2024-05-13 (#212)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@763a05f from 2024-05-14 (#213)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@75aa273 from 2024-05-15 (#214)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@25f06bd from 2024-05-21 (#215)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@3118d31 from 2024-05-28 (#216)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d574654 from 2024-06-03 (#217)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* chore: Update artifacts action to v4 (#218)

artifacts actions v3 are deprecated

* fix: give unique name for artifacts (#220)

upload-artifacts/v4 has a breaking change from v3, which requires the
artifacts names to be unique. Fix #219

* build: Sync  with eclipse-zenoh/zenoh@c279982 from 2024-06-05 (#221)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d8e66de from 2024-06-10 (#222)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9d09742 from 2024-06-11 (#223)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Fix markdown format in README. (#211)

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ed6c636 from 2024-06-12 (#225)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@8160b01 from 2024-06-13 (#228)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Enable releasing from any branch (#227)

* build: Sync  with eclipse-zenoh/zenoh@7adad94 from 2024-06-14 (#230)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@93f93d2 from 2024-06-17 (#231)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@2500e5a from 2024-06-20 (#236)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: remove deprecated maturin arg (#241)

See PyO3/maturin#1620, `--universal2` has been
deprecated

* build: Sync  with eclipse-zenoh/zenoh@869ace6 from 2024-07-02 (#247)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b93ca84 from 2024-07-03 (#248)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#252)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#253)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#259)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@0a969cb from 2024-07-25 (#261)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@0a969cb from 2024-07-25 (#262)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e587aa9 from 2024-07-26 (#265)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@2d88c7b from 2024-07-29 (#268)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* chore: remove useless dependencies

---------

Signed-off-by: gabrik <[email protected]>
Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: Yuyuan Yuan <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: oteffahi <[email protected]>
Co-authored-by: Gabriele Baldoni <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: ChenYing Kuo <[email protected]>
Co-authored-by: kydos <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
milyin added a commit to eclipse-zenoh/zenoh-c that referenced this issue Aug 21, 2024
* fix: Rename `bump.bash` to `bump-and-tag.bash`

* feat: Add `version.txt` and infer version in `bump-and-tag.bash`

* fix: Clone repository using actions/checkout

* fix: Add `CMakeFiles` to `.gitignore`

* fix: Add `debug` and `release` to `.gitignore`

* fix: Provide default release number for testing

* fix: Don't bump deps when pattern is undefined

* fix sizes of zcu_owned_matching_listener_t and z_owned_reply_t

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#330)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Specify git remote when pushing the tag

* fix: Require `VERSION`in `bump-and-tag.bash`

* fix: Override release tag if it already exists

* feat(tracing): using tracing and zenoh-util init_log (#308)

* feat(tracing): using tracing and zenoh-util init_log

Signed-off-by: gabrik <[email protected]>

* chore: adding Cargo.lock

Signed-off-by: gabrik <[email protected]>

* chore: updated Cargo.toml.in

Signed-off-by: gabrik <[email protected]>

* feat(tracing): using zenoh main branch

Signed-off-by: gabrik <[email protected]>

---------

Signed-off-by: gabrik <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#335)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@23c5932 from 2024-04-16 (#337)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* chore: using new try_init_log_from_env

Signed-off-by: gabrik <[email protected]>

* Align examples and remove reading from stdin (#255)

* Remove reading from stdin, align example implementations

* Add argument parsing implementation for examples

* Add argument parsing to examples, format files

* Replace getchar with sleep in z_pong example

* Fix typo in include

* Use null-pointers instead of empty strings, remove unnecessary mallocs

* Free returned pointer after parse_pos_args usage

* Add common and positional args parsing to z_ping example

* Add formatting for parsed config options

* Add const to function parameters

* Update mode option help

* Fix pos_args memory leak

* Refactor parse_args, remove possible strcpy buffer overflow

* Change parse_args function returns to const where applicable

* Fix const initialization warning

* Remove redundant const for value parameters

* Fix buf variable memory leak

* Update insert json-list config error message

* Add usage example for -e and -l arguments in help

* Update example notation in help message

Co-authored-by: Alexander <[email protected]>

* Update example notation in help message (2/2)

* Fix parameter in error message

Co-authored-by: Alexander <[email protected]>

---------

Co-authored-by: Alexander <[email protected]>

* Bugfix: Unable to build z_queryable_with_channels.c (#340)

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@0283aaa from 2024-04-19 (#341)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e8916bf from 2024-04-26 (#343)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update README and specify Rust version (#342)

* Clean up the Markdown format.

Signed-off-by: ChenYing Kuo <[email protected]>

* Specify Rust version in README.

Signed-off-by: ChenYing Kuo <[email protected]>

---------

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ea604b6 from 2024-04-29 (#344)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@371ca6b from 2024-04-30 (#347)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7a47445 from 2024-05-03 (#348)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@f5195c0 from 2024-05-03 (#350)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e53364f from 2024-05-04 (#351)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7e5d5e8 from 2024-05-07 (#355)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b8dd01d from 2024-05-07 (#356)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@45e05f0 from 2024-05-13 (#360)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Fix build with CMAKE_BUILD_TYPE=None

This is the default build type for debhelper (Debian).

* build: Sync  with eclipse-zenoh/zenoh@763a05f from 2024-05-14 (#363)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@75aa273 from 2024-05-15 (#364)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@25f06bd from 2024-05-21 (#369)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@3118d31 from 2024-05-28 (#399)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@009f666 from 2024-05-30 (#411)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d574654 from 2024-06-03 (#420)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* chore: Update artifacts action to v4 (#421)

artifacts actions v3 are deprecated

* build: Sync  with eclipse-zenoh/zenoh@c279982 from 2024-06-05 (#424)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d8e66de from 2024-06-10 (#436)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9d09742 from 2024-06-11 (#446)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ed6c636 from 2024-06-12 (#450)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@8160b01 from 2024-06-13 (#457)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Enable releasing from any branch (#456)

* build: Sync  with eclipse-zenoh/zenoh@7adad94 from 2024-06-14 (#460)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update to latest zenoh

* Replace `-rc` with `-pre` and document versioning (#466)

* build: Sync  with eclipse-zenoh/zenoh@2500e5a from 2024-06-20 (#467)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* macro generation

* moved types added to decl

* moved type drop

* switched rust to z_moved

* moved closures

* build macros fixed

* z_move name restored

* into_rust_type for moved, payloads

* tests updated

* cargo fmt

* moved structs in some drops/undeclares

* moved as separate parameter

* removed asref from moved

* moved unfinished

* build: Sync  with eclipse-zenoh/zenoh@869ace6 from 2024-07-02 (#494)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* moved type with into_rust_type trait, comiles without shm

* build with shm passed

* option added to some decl_c_type

* clippy fix

* build fix

* moved types added

* task moved used

* build: Sync  with eclipse-zenoh/zenoh@b93ca84 from 2024-07-03 (#500)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some examples fixes

* macros corrected to use auto derive loaned type from owned feature

* optional comma allowed in macros where forgotten

* property moved get

* put options move

* publisher delete options made simpler

* put options with moved

* delete options timestamp simplified

* more moved in options, timestamp simplified

* examples,tests updated

* tests compile fixes

* fix for test failure due to calling z_moved_xxx_t destructor on unitialized memory

* cargo fmt imports

* build fixes

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#508)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Ensure that find_package(zenohc) can be called two times (#470)

* Update CMakeLists.txt (#473)

* Install zenohc.dll in <prefix>/bin on Windows (#471)

* build: Sync  with eclipse-zenoh/zenoh@0a969cb from 2024-07-25 (#546)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e587aa9 from 2024-07-26 (#552)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some xompile errors fixed

* some build errors fixed

* some build errors fixed

* build fixes

* cargo fmt

* into_rust_type usage fixes

* encoding drop fixed

* restored headers

* zcu renamed back to zc

* zcu renamed back to zc

* z_xxx_move is static inline, cpp fixes

* build: Sync  with eclipse-zenoh/zenoh@2d88c7b from 2024-07-29 (#556)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* clang format from start

* cargo fmt

* macros contains funcions now, it needs types defined

* removed zenoh_macros include

* zenoh_macros include returned back to place

* C++ build test added, fails for now

* C++ enabling correction

* C++ compilation for tests added

* C++ build test

* cargo lock update

* retrun value if not void from template functions

* cargo fmt

* build fixes

* build fix after cargo.lock update

* moved types for buffer creation functions

* clippy fix

* clippy fix: c_char can be i8 or u8 depending on platform

* headers restored

* cargo fmt

* -c c++ flag for clang only

* c++ build fix - brackets removed

* type specific take functions added, _ptr in moved

* generic_take_cpp

* z_take impls at the end

* take funcs before generics

* take moved after null

* names fix

* missing null functioj added

* tests fixed for c++

* explicit null calls

* fix generic parameter names c compilation

* null call fix

* misprint fixed

* return removed

* Rename `close` to `undeclare` for Publication Cache and Querying Subscriber

* Temporarily use original pull request branch

* Update to eclipse-zenoh/zenoh@ce4e9bf

* Fix `z_ref_shm_client_storage_global`

* Update Cargo.toml

* decl_c_type corrected

* cargo check run

* borrow error fix

* compilation fix

* parse arg fix

* example compilation fix

* examples compile fix

* examples build fixes

* removed duplicated z_config_default (it's called in parsing args later)

* clang format

* clang format

* cargo.toml restore

---------

Signed-off-by: gabrik <[email protected]>
Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Denis Biryukov <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Gabriele Baldoni <[email protected]>
Co-authored-by: gabrik <[email protected]>
Co-authored-by: oteffahi <[email protected]>
Co-authored-by: Alexander <[email protected]>
Co-authored-by: ChenYing Kuo (CY) <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>
milyin added a commit to eclipse-zenoh/zenoh-c that referenced this issue Aug 21, 2024
* fix: Rename `bump.bash` to `bump-and-tag.bash`

* feat: Add `version.txt` and infer version in `bump-and-tag.bash`

* fix: Clone repository using actions/checkout

* fix: Add `CMakeFiles` to `.gitignore`

* fix: Add `debug` and `release` to `.gitignore`

* fix: Provide default release number for testing

* fix: Don't bump deps when pattern is undefined

* fix sizes of zcu_owned_matching_listener_t and z_owned_reply_t

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#330)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Specify git remote when pushing the tag

* fix: Require `VERSION`in `bump-and-tag.bash`

* fix: Override release tag if it already exists

* feat(tracing): using tracing and zenoh-util init_log (#308)

* feat(tracing): using tracing and zenoh-util init_log

Signed-off-by: gabrik <[email protected]>

* chore: adding Cargo.lock

Signed-off-by: gabrik <[email protected]>

* chore: updated Cargo.toml.in

Signed-off-by: gabrik <[email protected]>

* feat(tracing): using zenoh main branch

Signed-off-by: gabrik <[email protected]>

---------

Signed-off-by: gabrik <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#335)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@23c5932 from 2024-04-16 (#337)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* chore: using new try_init_log_from_env

Signed-off-by: gabrik <[email protected]>

* Align examples and remove reading from stdin (#255)

* Remove reading from stdin, align example implementations

* Add argument parsing implementation for examples

* Add argument parsing to examples, format files

* Replace getchar with sleep in z_pong example

* Fix typo in include

* Use null-pointers instead of empty strings, remove unnecessary mallocs

* Free returned pointer after parse_pos_args usage

* Add common and positional args parsing to z_ping example

* Add formatting for parsed config options

* Add const to function parameters

* Update mode option help

* Fix pos_args memory leak

* Refactor parse_args, remove possible strcpy buffer overflow

* Change parse_args function returns to const where applicable

* Fix const initialization warning

* Remove redundant const for value parameters

* Fix buf variable memory leak

* Update insert json-list config error message

* Add usage example for -e and -l arguments in help

* Update example notation in help message

Co-authored-by: Alexander <[email protected]>

* Update example notation in help message (2/2)

* Fix parameter in error message

Co-authored-by: Alexander <[email protected]>

---------

Co-authored-by: Alexander <[email protected]>

* Bugfix: Unable to build z_queryable_with_channels.c (#340)

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@0283aaa from 2024-04-19 (#341)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e8916bf from 2024-04-26 (#343)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update README and specify Rust version (#342)

* Clean up the Markdown format.

Signed-off-by: ChenYing Kuo <[email protected]>

* Specify Rust version in README.

Signed-off-by: ChenYing Kuo <[email protected]>

---------

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ea604b6 from 2024-04-29 (#344)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@371ca6b from 2024-04-30 (#347)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7a47445 from 2024-05-03 (#348)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@f5195c0 from 2024-05-03 (#350)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e53364f from 2024-05-04 (#351)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7e5d5e8 from 2024-05-07 (#355)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b8dd01d from 2024-05-07 (#356)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@45e05f0 from 2024-05-13 (#360)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Fix build with CMAKE_BUILD_TYPE=None

This is the default build type for debhelper (Debian).

* build: Sync  with eclipse-zenoh/zenoh@763a05f from 2024-05-14 (#363)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@75aa273 from 2024-05-15 (#364)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@25f06bd from 2024-05-21 (#369)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@3118d31 from 2024-05-28 (#399)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@009f666 from 2024-05-30 (#411)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d574654 from 2024-06-03 (#420)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* chore: Update artifacts action to v4 (#421)

artifacts actions v3 are deprecated

* build: Sync  with eclipse-zenoh/zenoh@c279982 from 2024-06-05 (#424)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d8e66de from 2024-06-10 (#436)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9d09742 from 2024-06-11 (#446)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ed6c636 from 2024-06-12 (#450)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@8160b01 from 2024-06-13 (#457)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Enable releasing from any branch (#456)

* build: Sync  with eclipse-zenoh/zenoh@7adad94 from 2024-06-14 (#460)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update to latest zenoh

* Replace `-rc` with `-pre` and document versioning (#466)

* build: Sync  with eclipse-zenoh/zenoh@2500e5a from 2024-06-20 (#467)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* macro generation

* moved types added to decl

* moved type drop

* switched rust to z_moved

* moved closures

* build macros fixed

* z_move name restored

* into_rust_type for moved, payloads

* tests updated

* cargo fmt

* moved structs in some drops/undeclares

* moved as separate parameter

* removed asref from moved

* moved unfinished

* build: Sync  with eclipse-zenoh/zenoh@869ace6 from 2024-07-02 (#494)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* moved type with into_rust_type trait, comiles without shm

* build with shm passed

* option added to some decl_c_type

* clippy fix

* build fix

* moved types added

* task moved used

* build: Sync  with eclipse-zenoh/zenoh@b93ca84 from 2024-07-03 (#500)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some examples fixes

* macros corrected to use auto derive loaned type from owned feature

* optional comma allowed in macros where forgotten

* property moved get

* put options move

* publisher delete options made simpler

* put options with moved

* delete options timestamp simplified

* more moved in options, timestamp simplified

* examples,tests updated

* tests compile fixes

* fix for test failure due to calling z_moved_xxx_t destructor on unitialized memory

* cargo fmt imports

* build fixes

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#508)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Ensure that find_package(zenohc) can be called two times (#470)

* Update CMakeLists.txt (#473)

* Install zenohc.dll in <prefix>/bin on Windows (#471)

* build: Sync  with eclipse-zenoh/zenoh@0a969cb from 2024-07-25 (#546)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e587aa9 from 2024-07-26 (#552)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some xompile errors fixed

* some build errors fixed

* some build errors fixed

* build fixes

* cargo fmt

* into_rust_type usage fixes

* encoding drop fixed

* restored headers

* zcu renamed back to zc

* zcu renamed back to zc

* z_xxx_move is static inline, cpp fixes

* build: Sync  with eclipse-zenoh/zenoh@2d88c7b from 2024-07-29 (#556)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* clang format from start

* cargo fmt

* macros contains funcions now, it needs types defined

* removed zenoh_macros include

* zenoh_macros include returned back to place

* C++ build test added, fails for now

* C++ enabling correction

* C++ compilation for tests added

* C++ build test

* cargo lock update

* retrun value if not void from template functions

* cargo fmt

* build fixes

* build fix after cargo.lock update

* moved types for buffer creation functions

* clippy fix

* clippy fix: c_char can be i8 or u8 depending on platform

* headers restored

* cargo fmt

* -c c++ flag for clang only

* c++ build fix - brackets removed

* type specific take functions added, _ptr in moved

* generic_take_cpp

* z_take impls at the end

* take funcs before generics

* take moved after null

* names fix

* missing null functioj added

* tests fixed for c++

* explicit null calls

* fix generic parameter names c compilation

* null call fix

* misprint fixed

* return removed

* Rename `close` to `undeclare` for Publication Cache and Querying Subscriber

* Temporarily use original pull request branch

* Update to eclipse-zenoh/zenoh@ce4e9bf

* Fix `z_ref_shm_client_storage_global`

* Update Cargo.toml

* decl_c_type corrected

* cargo check run

* borrow error fix

* compilation fix

* parse arg fix

* example compilation fix

* examples compile fix

* examples build fixes

* removed duplicated z_config_default (it's called in parsing args later)

* clang format

* clang format

* cargo.toml restore

* added underscore to _z_null and _z_check

* missing functions updated

* rename to z_internal_null/check

* clang format fix

* restored headers, corrected cargo.toml

---------

Signed-off-by: gabrik <[email protected]>
Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Denis Biryukov <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Gabriele Baldoni <[email protected]>
Co-authored-by: gabrik <[email protected]>
Co-authored-by: oteffahi <[email protected]>
Co-authored-by: Alexander <[email protected]>
Co-authored-by: ChenYing Kuo (CY) <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>
eclipse-zenoh-bot added a commit to eclipse-zenoh/zenoh-c that referenced this issue Aug 29, 2024
* Add z_timestamp_new and tests

* fix clippy warning

* Add z_publisher_set_* methods

* Add missing properties to z_query_reply_options_t

* Add check, null, loan, drop for source info.

* Move z_*_source_info_t, z_entity_global_id_t out from commons

* renamed zc_liveliness_declare_subscriber_options_t -> zc_liveliness_subscriber_options_t;
added zc_liveliness_token_loan function;
added tests for liveliness;

* fmt

* test update

* Add reply_del support

* Add clang-format CI check

* Update codebase with clang-format

* Remove z_query_value

* Fix default congestion_control for z_query_reply_options_t

* Fix default congestion_control for z_query_reply_del_options_t

* Exclude autogenerated files from clang-format

* Add z_publisher_loan_mut

* Add z_reply_err_t and methods

* Add missing properties to z_get_options_t

* Remove publisher set methods

* Add z_reply_replier_id

* chore: Sync Rust toolchain

* Add publisher id getter (#448)

* Add publisher id getter

* Add z_publisher_id to docs/api.rst

* Support recent zenoh (no shm renaming!)

* SHM renaming support

* remove unnecessary .clone() call (#437)

* format tests

* Fix INTERFACE includes (was incorrect when Cargo is generating to custom directory)

* rename z_bytes_encode/decode into z_bytes_serialize/deserialize

* format

* cargo fmt

* Remove unused variable

* more build system fixes

* Fix build with CMAKE_BUILD_TYPE=None

This is the default build type for debhelper (Debian).

* chore: Update artifacts action to v4 (#421)

artifacts actions v3 are deprecated

* Enable releasing from any branch (#456)

* Replace `-rc` with `-pre` and document versioning (#466)

* Update README and specify Rust version (#342)

* Clean up the Markdown format.

Signed-off-by: ChenYing Kuo <[email protected]>

* Specify Rust version in README.

Signed-off-by: ChenYing Kuo <[email protected]>

---------

Signed-off-by: ChenYing Kuo <[email protected]>

* chore: Update artifacts action to v4 (#421)

artifacts actions v3 are deprecated

* build: Sync  with eclipse-zenoh/zenoh@65e5df7 from 2024-06-21 (#468)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@a6d117b from 2024-06-21 (#474)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Align Zenoh (#476)

* build: Sync  with eclipse-zenoh/zenoh@fc18f90 from 2024-06-26 (#477)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@1790d59 from 2024-06-26 (#483)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* simplify transmute mod for easier understanding the code (#472)

* from/into types

* inplace2 for Config

* z_config_default fix

* separating CSlice - unfinished

* slice/string rework unfinshed

* collections unfinished

* collections updated

* clippy fix

* cargo fmt

* copy transmute, only a_c_type kept

* clippy fix

* sample converted

* encoding converted

* EntityGlobalId converted

* sourceInfo updated

* publisher updated

* clippy fix

* queryable updated

* query updated

* reply_error

* querying_subscriber update

* slice_map converted

* string_array updated

* reply updated

* keyexpr updated

* liveliness token updated

* ZBytes updated

* zbytes writer updated

* zbyes reader updated

* ZenohId updated

* zbytesiterator updated

* publication cache updated

* scouting updated

* session updated

* subscriber updated

* owned_matching_listener updated

* closure hello updated

* matching status closure update

* cargo fmt, doc comments corrected

* query channel

* query_channel updated

* query_closure updated

* reply_closure updated

* fifo_handler_reply updated

* response_channel updated

* sample channel updated

* sample closure updated

* sample channel updated

* zenoh_id closure updated

* zmutex updated

* condvar covered

* task covered

* z_owned_shm_t updated

* shm_mut updated

* shm_client updated

* owned_shm_client_list updated

* shm_client_storage updated

* alloc_layout, alloc_result converted

* shm provider update

* alloc alignment converted

* memory layout updated

* chunk alloc resut updated

* rename transmute2 to transmute

* lifetime corrected

* tests fixed, uninit test updated

* lib name restored

* renamed "ctype" to "c_type", like "rust_type"

* write empty on error

* year updated

* regenerated headers wihtout shm

* String names normalization (#495)

* fix string-related function names in docs (#496)

* updated docs after pr #495

* updated docs

* change order of arguments for ..._clone methods to that of zenoh-pico (#497)

* fix_what_am_i_to_str name and docs (#503)

* add encoding tests (#502)

* add encoding tests

* format

* feat: bump zenoh version (#485)

* chore: rebase onto dev/1.0.0

* fix: fix clippy lint

* fix: comment entity_global_id...

* fix: fix comment

* fix: comment eid in the test

* fix: fix test

* fix: fix test

* fix: fix test

* fix: add comment

* build: Sync  with eclipse-zenoh/zenoh@cae8697 from 2024-07-05 (#505)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@6df74c7 from 2024-07-07 (#506)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@12b11ee from 2024-07-08 (#507)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9e1c4a8 from 2024-07-08 (#509)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* api fixes for compatibility with zenoh-pico (#510)

* api fixes for compatibility with zenoh-pico

* clippy fixes

* remove unneeded enumerators from z_whatami_t

* fix: Rename `bump.bash` to `bump-and-tag.bash`

* feat: Add `version.txt` and infer version in `bump-and-tag.bash`

* fix: Clone repository using actions/checkout

* fix: Don't bump deps when pattern is undefined

* fix: Specify git remote when pushing the tag

* fix: Require `VERSION`in `bump-and-tag.bash`

* fix: Override release tag if it already exists

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* align api with zenoh-pico (#519)

* remove z_slice_map;
make z_timestamp_new, use id of session and current wall clock time;

* format

* fix tests

* format

* removed z_owned_closure_owned_query_t

* fix: typos of attachment (#478)

* added default encoding for publisher (#520)

* add default enum constants (#521)

* chore: replace log by tracing (#514)

* chore: replace log by tracing

* fix: update Cargo.toml.in

* fix: remove useless dependencies

* fix: fix Cargo.toml.in

* add get is_express option (#522)

* chore: Sync Rust toolchain

* chore: Sync Rust toolchain

* support for enable/disable unstable features via #define

* fmt

* Encoding alignment with Zenoh-rust (#523)

* add z_encoding_set_schema functions (corresponding to zenoh-rust Encoding::with_schema);
add predefined encoding constants;

* docs update

* clippy

* fmt

* fmt

* add zc_config_from_env function (#527)

* readme update to explain how to enable optional features

* move SourceInfo, liveliness, KeyExpr::relation_to and zenoh-ext functionality under unstable feature

* fix: Add step to run cargo build for docs

Some auto generated files (e.g. include/zenoh_opaque.h) are platform
specific so they are git ignored. They contain documentation that should
be published as well, so this step makes sure all the files are in the
checkout before publishing them to readthedocs.io

* propagate options to cmake find_package (#531)

* propagate options to cmake find_package

* output feature variables

* Pre release SHM

* Fix SHM config key and examples

* Revert Cargo.toml change

* Fix examples

* - do not trigger error if SHARED_MEMORY enabled without UNSTABLE
- fix clippy
- review fixes

* remove redundant compile definitions (#534)

* Address review comments

* Add SHM config to z_sub_thr

* remove redundant compile definitions (#534)

* align with recent zenoh

* unstable is not default

* Fix z_pub_shm_thr. Fix shm API.

* Adopt keyexpr tests for new behavior

* Add check in z_pub_shm_thr

* Add z_bytes_serialize_from_shm check in examples

* Rename z_error_t to z_result_t

* Rename errors.rs to result.rs

* no longer use cpp, awk and sed for cbindgen output processing

* typo fix

* Address review comments

* refactor features usage

* fix docs

* add SHM examples

* build: Sync  with eclipse-zenoh/zenoh@4827f39 from 2024-07-24 (#540)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* typo fix (how did that compile????)

* Ensure that find_package(zenohc) can be called two times (#470)

* Update CMakeLists.txt (#473)

* Install zenohc.dll in <prefix>/bin on Windows (#471)

* Fix shm doc

* fix cbindgen in ptr to const ptr case

* Align SHM examples

* don't need this

* build: Sync  with eclipse-zenoh/zenoh@0c43c08 from 2024-07-25 (#547)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Remove legacy slice methods

* build: Sync  with eclipse-zenoh/zenoh@32bdded from 2024-07-26 (#550)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* simplify tests and examples with attachment

* address review comments

* build: Sync  with eclipse-zenoh/zenoh@502d3be from 2024-07-30 (#558)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix queryable examples to account for an empty payload

* Update dependencies to have 1.80 build

* Allow providing custom delete function when serializing from pointers (#554)

* remove z_serialize_xxx_copy;
z_serialize_from_slice now consumes z_owned_slice_t;
z_serialize_from_str is renamed into z_serialize_from_string and is now consuming z_owned_string_t
introduce z_serialize_from_buf/from_str allowing to consume raw pointers by taking custom delete function;

* format

* clippy

* add support for creating string/slice with custom deleter;
align serialization functions;

* intorduce z_bytes_from_static_str and z_bytes_from_static_buf

* rename slice/string constructors according to zenoh-pico review comments

* build: Sync  with eclipse-zenoh/zenoh@5d09cf7 from 2024-08-01 (#562)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build fix after cargo.lock update (#564)

* - add z_byte_writer_write_all
- z_byte_writer_write now has interface that intends that it can write not all

* add  doxygenfunction:: z_bytes_writer_write_all

* change output parameter position

* Rename `close` to `undeclare` for Publication Cache and Querying Subscriber

* Temporarily use original pull request branch

* Update to eclipse-zenoh/zenoh@ce4e9bf

* Fix `z_ref_shm_client_storage_global`

* Update Cargo.toml

* leave only z_bytes_writer_write_all

* Kick CI

* Kick CI

* log error messages when failing to manipulate the config (#563)

* generate panic messages only if explicitly asked (#569)

* generate panic messages only if explicitly asked

* doc comments restored

* remove unnecessary build artifacts (#571)

* build: Sync  with eclipse-zenoh/zenoh@b1e4dba from 2024-08-05 (#573)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b7d42ef from 2024-08-06 (#574)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@2d5ab7c from 2024-08-06 (#575)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* z_recv/z_try_recv without the need of z_check (#570)

* make z_recv/z_try_recv return z_result_t to allow differentiating between different cases without the need to call z_check on constructed object

* format

* Logging (#580)

* renamed zc_init_logger -> zc_init_logging;
added support for providing custom callbacks for logging messages;

* format

* clippy

* add missing dependency

* z_bytes_reader and z_bytes_writer update (#583)

* made z_bytes_writer non-owned;
added z_bytes_writer_append(...) and z_bytes_writer append_bounded(...) (aka writer.serialize());
added z_bytes_reader_read_bounded(...);

* fix initializer

* fix initializer

* rename zc_publisher_matching_listener_callback -> zc_publisher_matching_listener_declare; (#581)

added zc_publisher_get_matching_status;

* docs: fix doxygen (#578)

* chore: ignore docs/doxyxml

* docs: update the README of doxygen

* docs: fix the warnings

* docs: remove the unnecessary step in macOS

* chore: address the review comment

* add valgrind memory leaks check (#584)

* added pub sub test for memory leaks

* added valgrind test

* format

* ci fix

* ci fix

* add queryable-get memory leaks test

* do not copy memory leaks script

* fixed memory leak in handlers

* docs update

* format

* format

* attempt to address ci no more space issue (#585)

* attempt to address ci no more space issue

* remove env settings

* add CARGO_PROFILE_DEV_DEBUG=false

* Move protection (#488)

* macro generation

* moved types added to decl

* moved type drop

* switched rust to z_moved

* moved closures

* build macros fixed

* z_move name restored

* into_rust_type for moved, payloads

* tests updated

* cargo fmt

* moved structs in some drops/undeclares

* moved as separate parameter

* removed asref from moved

* moved unfinished

* moved type with into_rust_type trait, comiles without shm

* build with shm passed

* option added to some decl_c_type

* clippy fix

* build fix

* moved types added

* task moved used

* some examples fixes

* macros corrected to use auto derive loaned type from owned feature

* optional comma allowed in macros where forgotten

* property moved get

* put options move

* publisher delete options made simpler

* put options with moved

* delete options timestamp simplified

* more moved in options, timestamp simplified

* examples,tests updated

* tests compile fixes

* fix for test failure due to calling z_moved_xxx_t destructor on unitialized memory

* cargo fmt imports

* build fixes

* some xompile errors fixed

* some build errors fixed

* some build errors fixed

* build fixes

* cargo fmt

* into_rust_type usage fixes

* encoding drop fixed

* restored headers

* zcu renamed back to zc

* zcu renamed back to zc

* z_xxx_move is static inline, cpp fixes

* clang format from start

* cargo fmt

* macros contains funcions now, it needs types defined

* removed zenoh_macros include

* zenoh_macros include returned back to place

* C++ build test added, fails for now

* C++ enabling correction

* C++ compilation for tests added

* C++ build test

* cargo lock update

* retrun value if not void from template functions

* cargo fmt

* build fixes

* build fix after cargo.lock update

* moved types for buffer creation functions

* clippy fix

* clippy fix: c_char can be i8 or u8 depending on platform

* headers restored

* cargo fmt

* -c c++ flag for clang only

* c++ build fix - brackets removed

* type specific take functions added, _ptr in moved

* generic_take_cpp

* z_take impls at the end

* take funcs before generics

* take moved after null

* names fix

* missing null functioj added

* tests fixed for c++

* explicit null calls

* fix generic parameter names c compilation

* null call fix

* misprint fixed

* return removed

* Rename `close` to `undeclare` for Publication Cache and Querying Subscriber

* Temporarily use original pull request branch

* Update to eclipse-zenoh/zenoh@ce4e9bf

* Fix `z_ref_shm_client_storage_global`

* Update Cargo.toml

* build fixes

* zc_ prefix for log function

* zc_ prefix in example

* regenerated files

* cargo fmt

* undeclare as drop

* removed _undeclare parsing

* missing drop/check funcs added. verification added to build.rs

* cargo fmt

* tests fix

* test fix

* cmake fix

* null drop test same as in pico, take corrected

---------

Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>

* fix: use `z_move` in shm examples (#589)

* fix tests and examples for SHM (#592)

* SHM is now enabled by default in the Config, so no need to set it explicitly in examples

* build: Sync  with eclipse-zenoh/zenoh@0e2f78a from 2024-08-14 (#596)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* update zenoh

* fix clang

* dropper autogeneration

* dropper type

* unfinished - into_rust_type approach failed

* compiles

* compile with all features

* drop functions updated

* "this" parameter name globally renamed to this_ to avoid using C++ keyword

* compile fix

* generic functions update

* drop generic fix

* clippy fix

* cargo fmt

* headers updated

* cargo fmt fix

* check in build.rs restored

* fix: misuse the callback in z_info

* chore: Bump version to `1.0.0.0`

* chore: Bump libzenohc-dev version to `1.0.0~dev-1`

* chore: Bump `/zenoh.*/` dependencies to `1.0.0-dev`

* chore: Update Cargo.lock to `1.0.0-dev`

* chore: Bump build-resources/opaque-types version to `1.0.0-dev`

* merge main branch into dev/1.0.0 (after "moved_as_ptr" update) (#600)

* fix: Rename `bump.bash` to `bump-and-tag.bash`

* feat: Add `version.txt` and infer version in `bump-and-tag.bash`

* fix: Clone repository using actions/checkout

* fix: Add `CMakeFiles` to `.gitignore`

* fix: Add `debug` and `release` to `.gitignore`

* fix: Provide default release number for testing

* fix: Don't bump deps when pattern is undefined

* fix sizes of zcu_owned_matching_listener_t and z_owned_reply_t

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#330)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Specify git remote when pushing the tag

* fix: Require `VERSION`in `bump-and-tag.bash`

* fix: Override release tag if it already exists

* feat(tracing): using tracing and zenoh-util init_log (#308)

* feat(tracing): using tracing and zenoh-util init_log

Signed-off-by: gabrik <[email protected]>

* chore: adding Cargo.lock

Signed-off-by: gabrik <[email protected]>

* chore: updated Cargo.toml.in

Signed-off-by: gabrik <[email protected]>

* feat(tracing): using zenoh main branch

Signed-off-by: gabrik <[email protected]>

---------

Signed-off-by: gabrik <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#335)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@23c5932 from 2024-04-16 (#337)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* chore: using new try_init_log_from_env

Signed-off-by: gabrik <[email protected]>

* Align examples and remove reading from stdin (#255)

* Remove reading from stdin, align example implementations

* Add argument parsing implementation for examples

* Add argument parsing to examples, format files

* Replace getchar with sleep in z_pong example

* Fix typo in include

* Use null-pointers instead of empty strings, remove unnecessary mallocs

* Free returned pointer after parse_pos_args usage

* Add common and positional args parsing to z_ping example

* Add formatting for parsed config options

* Add const to function parameters

* Update mode option help

* Fix pos_args memory leak

* Refactor parse_args, remove possible strcpy buffer overflow

* Change parse_args function returns to const where applicable

* Fix const initialization warning

* Remove redundant const for value parameters

* Fix buf variable memory leak

* Update insert json-list config error message

* Add usage example for -e and -l arguments in help

* Update example notation in help message

Co-authored-by: Alexander <[email protected]>

* Update example notation in help message (2/2)

* Fix parameter in error message

Co-authored-by: Alexander <[email protected]>

---------

Co-authored-by: Alexander <[email protected]>

* Bugfix: Unable to build z_queryable_with_channels.c (#340)

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@0283aaa from 2024-04-19 (#341)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e8916bf from 2024-04-26 (#343)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update README and specify Rust version (#342)

* Clean up the Markdown format.

Signed-off-by: ChenYing Kuo <[email protected]>

* Specify Rust version in README.

Signed-off-by: ChenYing Kuo <[email protected]>

---------

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ea604b6 from 2024-04-29 (#344)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@371ca6b from 2024-04-30 (#347)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7a47445 from 2024-05-03 (#348)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@f5195c0 from 2024-05-03 (#350)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e53364f from 2024-05-04 (#351)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7e5d5e8 from 2024-05-07 (#355)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b8dd01d from 2024-05-07 (#356)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@45e05f0 from 2024-05-13 (#360)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Fix build with CMAKE_BUILD_TYPE=None

This is the default build type for debhelper (Debian).

* build: Sync  with eclipse-zenoh/zenoh@763a05f from 2024-05-14 (#363)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@75aa273 from 2024-05-15 (#364)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@25f06bd from 2024-05-21 (#369)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@3118d31 from 2024-05-28 (#399)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@009f666 from 2024-05-30 (#411)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d574654 from 2024-06-03 (#420)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* chore: Update artifacts action to v4 (#421)

artifacts actions v3 are deprecated

* build: Sync  with eclipse-zenoh/zenoh@c279982 from 2024-06-05 (#424)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d8e66de from 2024-06-10 (#436)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9d09742 from 2024-06-11 (#446)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ed6c636 from 2024-06-12 (#450)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@8160b01 from 2024-06-13 (#457)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Enable releasing from any branch (#456)

* build: Sync  with eclipse-zenoh/zenoh@7adad94 from 2024-06-14 (#460)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update to latest zenoh

* Replace `-rc` with `-pre` and document versioning (#466)

* build: Sync  with eclipse-zenoh/zenoh@2500e5a from 2024-06-20 (#467)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* macro generation

* moved types added to decl

* moved type drop

* switched rust to z_moved

* moved closures

* build macros fixed

* z_move name restored

* into_rust_type for moved, payloads

* tests updated

* cargo fmt

* moved structs in some drops/undeclares

* moved as separate parameter

* removed asref from moved

* moved unfinished

* build: Sync  with eclipse-zenoh/zenoh@869ace6 from 2024-07-02 (#494)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* moved type with into_rust_type trait, comiles without shm

* build with shm passed

* option added to some decl_c_type

* clippy fix

* build fix

* moved types added

* task moved used

* build: Sync  with eclipse-zenoh/zenoh@b93ca84 from 2024-07-03 (#500)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some examples fixes

* macros corrected to use auto derive loaned type from owned feature

* optional comma allowed in macros where forgotten

* property moved get

* put options move

* publisher delete options made simpler

* put options with moved

* delete options timestamp simplified

* more moved in options, timestamp simplified

* examples,tests updated

* tests compile fixes

* fix for test failure due to calling z_moved_xxx_t destructor on unitialized memory

* cargo fmt imports

* build fixes

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#508)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Ensure that find_package(zenohc) can be called two times (#470)

* Update CMakeLists.txt (#473)

* Install zenohc.dll in <prefix>/bin on Windows (#471)

* build: Sync  with eclipse-zenoh/zenoh@0a969cb from 2024-07-25 (#546)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e587aa9 from 2024-07-26 (#552)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some xompile errors fixed

* some build errors fixed

* some build errors fixed

* build fixes

* cargo fmt

* into_rust_type usage fixes

* encoding drop fixed

* restored headers

* zcu renamed back to zc

* zcu renamed back to zc

* z_xxx_move is static inline, cpp fixes

* build: Sync  with eclipse-zenoh/zenoh@2d88c7b from 2024-07-29 (#556)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* clang format from start

* cargo fmt

* macros contains funcions now, it needs types defined

* removed zenoh_macros include

* zenoh_macros include returned back to place

* C++ build test added, fails for now

* C++ enabling correction

* C++ compilation for tests added

* C++ build test

* cargo lock update

* retrun value if not void from template functions

* cargo fmt

* build fixes

* build fix after cargo.lock update

* moved types for buffer creation functions

* clippy fix

* clippy fix: c_char can be i8 or u8 depending on platform

* headers restored

* cargo fmt

* -c c++ flag for clang only

* c++ build fix - brackets removed

* type specific take functions added, _ptr in moved

* generic_take_cpp

* z_take impls at the end

* take funcs before generics

* take moved after null

* names fix

* missing null functioj added

* tests fixed for c++

* explicit null calls

* fix generic parameter names c compilation

* null call fix

* misprint fixed

* return removed

* Rename `close` to `undeclare` for Publication Cache and Querying Subscriber

* Temporarily use original pull request branch

* Update to eclipse-zenoh/zenoh@ce4e9bf

* Fix `z_ref_shm_client_storage_global`

* Update Cargo.toml

* decl_c_type corrected

* cargo check run

* borrow error fix

* compilation fix

* parse arg fix

* example compilation fix

* examples compile fix

* examples build fixes

* removed duplicated z_config_default (it's called in parsing args later)

* clang format

* clang format

* cargo.toml restore

---------

Signed-off-by: gabrik <[email protected]>
Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Denis Biryukov <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Gabriele Baldoni <[email protected]>
Co-authored-by: gabrik <[email protected]>
Co-authored-by: oteffahi <[email protected]>
Co-authored-by: Alexander <[email protected]>
Co-authored-by: ChenYing Kuo (CY) <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>

* `z_check` and `z_null` made internal (#605)

* fix: Rename `bump.bash` to `bump-and-tag.bash`

* feat: Add `version.txt` and infer version in `bump-and-tag.bash`

* fix: Clone repository using actions/checkout

* fix: Add `CMakeFiles` to `.gitignore`

* fix: Add `debug` and `release` to `.gitignore`

* fix: Provide default release number for testing

* fix: Don't bump deps when pattern is undefined

* fix sizes of zcu_owned_matching_listener_t and z_owned_reply_t

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#330)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Specify git remote when pushing the tag

* fix: Require `VERSION`in `bump-and-tag.bash`

* fix: Override release tag if it already exists

* feat(tracing): using tracing and zenoh-util init_log (#308)

* feat(tracing): using tracing and zenoh-util init_log

Signed-off-by: gabrik <[email protected]>

* chore: adding Cargo.lock

Signed-off-by: gabrik <[email protected]>

* chore: updated Cargo.toml.in

Signed-off-by: gabrik <[email protected]>

* feat(tracing): using zenoh main branch

Signed-off-by: gabrik <[email protected]>

---------

Signed-off-by: gabrik <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#335)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@23c5932 from 2024-04-16 (#337)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* fix: Support jq 1.6

ubuntu-22.04 runners use jq 1.6 which doesn't recognize a dot for `[]` value iterator.

See: jqlang/jq#1168.

* chore: using new try_init_log_from_env

Signed-off-by: gabrik <[email protected]>

* Align examples and remove reading from stdin (#255)

* Remove reading from stdin, align example implementations

* Add argument parsing implementation for examples

* Add argument parsing to examples, format files

* Replace getchar with sleep in z_pong example

* Fix typo in include

* Use null-pointers instead of empty strings, remove unnecessary mallocs

* Free returned pointer after parse_pos_args usage

* Add common and positional args parsing to z_ping example

* Add formatting for parsed config options

* Add const to function parameters

* Update mode option help

* Fix pos_args memory leak

* Refactor parse_args, remove possible strcpy buffer overflow

* Change parse_args function returns to const where applicable

* Fix const initialization warning

* Remove redundant const for value parameters

* Fix buf variable memory leak

* Update insert json-list config error message

* Add usage example for -e and -l arguments in help

* Update example notation in help message

Co-authored-by: Alexander <[email protected]>

* Update example notation in help message (2/2)

* Fix parameter in error message

Co-authored-by: Alexander <[email protected]>

---------

Co-authored-by: Alexander <[email protected]>

* Bugfix: Unable to build z_queryable_with_channels.c (#340)

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@0283aaa from 2024-04-19 (#341)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e8916bf from 2024-04-26 (#343)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update README and specify Rust version (#342)

* Clean up the Markdown format.

Signed-off-by: ChenYing Kuo <[email protected]>

* Specify Rust version in README.

Signed-off-by: ChenYing Kuo <[email protected]>

---------

Signed-off-by: ChenYing Kuo <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ea604b6 from 2024-04-29 (#344)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@371ca6b from 2024-04-30 (#347)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7a47445 from 2024-05-03 (#348)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@f5195c0 from 2024-05-03 (#350)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e53364f from 2024-05-04 (#351)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@7e5d5e8 from 2024-05-07 (#355)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@b8dd01d from 2024-05-07 (#356)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@45e05f0 from 2024-05-13 (#360)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Fix build with CMAKE_BUILD_TYPE=None

This is the default build type for debhelper (Debian).

* build: Sync  with eclipse-zenoh/zenoh@763a05f from 2024-05-14 (#363)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@75aa273 from 2024-05-15 (#364)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@25f06bd from 2024-05-21 (#369)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@3118d31 from 2024-05-28 (#399)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@009f666 from 2024-05-30 (#411)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d574654 from 2024-06-03 (#420)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* chore: Update artifacts action to v4 (#421)

artifacts actions v3 are deprecated

* build: Sync  with eclipse-zenoh/zenoh@c279982 from 2024-06-05 (#424)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d8e66de from 2024-06-10 (#436)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9d09742 from 2024-06-11 (#446)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ed6c636 from 2024-06-12 (#450)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@8160b01 from 2024-06-13 (#457)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Enable releasing from any branch (#456)

* build: Sync  with eclipse-zenoh/zenoh@7adad94 from 2024-06-14 (#460)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update to latest zenoh

* Replace `-rc` with `-pre` and document versioning (#466)

* build: Sync  with eclipse-zenoh/zenoh@2500e5a from 2024-06-20 (#467)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* macro generation

* moved types added to decl

* moved type drop

* switched rust to z_moved

* moved closures

* build macros fixed

* z_move name restored

* into_rust_type for moved, payloads

* tests updated

* cargo fmt

* moved structs in some drops/undeclares

* moved as separate parameter

* removed asref from moved

* moved unfinished

* build: Sync  with eclipse-zenoh/zenoh@869ace6 from 2024-07-02 (#494)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* moved type with into_rust_type trait, comiles without shm

* build with shm passed

* option added to some decl_c_type

* clippy fix

* build fix

* moved types added

* task moved used

* build: Sync  with eclipse-zenoh/zenoh@b93ca84 from 2024-07-03 (#500)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some examples fixes

* macros corrected to use auto derive loaned type from owned feature

* optional comma allowed in macros where forgotten

* property moved get

* put options move

* publisher delete options made simpler

* put options with moved

* delete options timestamp simplified

* more moved in options, timestamp simplified

* examples,tests updated

* tests compile fixes

* fix for test failure due to calling z_moved_xxx_t destructor on unitialized memory

* cargo fmt imports

* build fixes

* build: Sync  with eclipse-zenoh/zenoh@b3e42ce from 2024-07-08 (#508)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Ensure that find_package(zenohc) can be called two times (#470)

* Update CMakeLists.txt (#473)

* Install zenohc.dll in <prefix>/bin on Windows (#471)

* build: Sync  with eclipse-zenoh/zenoh@0a969cb from 2024-07-25 (#546)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@e587aa9 from 2024-07-26 (#552)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* some xompile errors fixed

* some build errors fixed

* some build errors fixed

* build fixes

* cargo fmt

* into_rust_type usage fixes

* encoding drop fixed

* restored headers

* zcu renamed back to zc

* zcu renamed back to zc

* z_xxx_move is static inline, cpp fixes

* build: Sync  with eclipse-zenoh/zenoh@2d88c7b from 2024-07-29 (#556)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* clang format from start

* cargo fmt

* macros contains funcions now, it needs types defined

* removed zenoh_macros include

* zenoh_macros include returned back to place

* C++ build test added, fails for now

* C++ enabling correction

* C++ compilation for tests added

* C++ build test

* cargo lock update

* retrun value if not void from template functions

* cargo fmt

* build fixes

* build fix after cargo.lock update

* moved types for buffer creation functions

* clippy fix

* clippy fix: c_char can be i8 or u8 depending on platform

* headers restored

* cargo fmt

* -c c++ flag for clang only

* c++ build fix - brackets removed

* type specific take functions added, _ptr in moved

* generic_take_cpp

* z_take impls at the end

* take funcs before generics

* take moved after null

* names fix

* missing null functioj added

* tests fixed for c++

* explicit null calls

* fix generic parameter names c compilation

* null call fix

* misprint fixed

* return removed

* Rename `close` to `undeclare` for Publication Cache and Querying Subscriber

* Temporarily use original pull request branch

* Update to eclipse-zenoh/zenoh@ce4e9bf

* Fix `z_ref_shm_client_storage_global`

* Update Cargo.toml

* decl_c_type corrected

* cargo check run

* borrow error fix

* compilation fix

* parse arg fix

* example compilation fix

* examples compile fix

* examples build fixes

* removed duplicated z_config_default (it's called in parsing args later)

* clang format

* clang format

* cargo.toml restore

* added underscore to _z_null and _z_check

* missing functions updated

* rename to z_internal_null/check

* clang format fix

* restored headers, corrected cargo.toml

---------

Signed-off-by: gabrik <[email protected]>
Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Denis Biryukov <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Gabriele Baldoni <[email protected]>
Co-authored-by: gabrik <[email protected]>
Co-authored-by: oteffahi <[email protected]>
Co-authored-by: Alexander <[email protected]>
Co-authored-by: ChenYing Kuo (CY) <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>

* made reliability option unstable (#612)

* Update api.rst (#613)

* Adopt SHM for recent API changes (#615)

* Ensure build directory contains a copy of rust-toolchain.toml.

When building using cargo's --manifest-path option the toolchain configuration file within the manifest directory is ignored. Ensuring a copy of the rust-toolchain.toml file is in the build directory ensures the toolchain settings are pciked up when building via cmake.

* Shm ci (#593)

* fix tests and examples for SHM

* Add feature tests in CI

* Adopt SHM for recent API changes

* Update ci.yml and CMakeLists.txt

* fix build for windows

* build in separate directory failure fix (#617)

* test for build in separate directory

* builds dir from ci variable

* using CI_PROJECT_DIR variable

* relarive build examples

* updated "time" version, suppressed "unused trait" warnings

* build: Sync  with eclipse-zenoh/zenoh@8b027e9 from 2024-08-22 (#619)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* cargo.lock update

* fix: properly apply `z_get_options_t` in `ze_querying_subscriber_get` (#621)

* Revert "Merge dev1.0.0 into main"

* merging error fix

* build: Sync Cargo lockfile with Zenoh's

---------

Signed-off-by: ChenYing Kuo <[email protected]>
Signed-off-by: gabrik <[email protected]>
Co-authored-by: Alexander Bushnev <[email protected]>
Co-authored-by: yellowhatter <[email protected]>
Co-authored-by: Michael Ilyin <[email protected]>
Co-authored-by: Denis Biryukov <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: yellowhatter <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: ChenYing Kuo (CY) <[email protected]>
Co-authored-by: Luca Cominardi <[email protected]>
Co-authored-by: DenisBiryukov91 <[email protected]>
Co-authored-by: Joseph Perez <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Yuyuan Yuan <[email protected]>
Co-authored-by: Diogo Mendes Matsubara <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Gabriele Baldoni <[email protected]>
Co-authored-by: gabrik <[email protected]>
Co-authored-by: oteffahi <[email protected]>
Co-authored-by: Alexander <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: Geoff Martin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants