Skip to content

feat: add warning if drop-callback is passed with a tuple#366

Merged
Mallets merged 1 commit into
eclipse-zenoh:mainfrom
ZettaScaleLabs:feat/done_callback_warning
Oct 18, 2024
Merged

feat: add warning if drop-callback is passed with a tuple#366
Mallets merged 1 commit into
eclipse-zenoh:mainfrom
ZettaScaleLabs:feat/done_callback_warning

Conversation

@wyfo
Copy link
Copy Markdown
Contributor

@wyfo wyfo commented Oct 18, 2024

Fixes #364

@github-actions
Copy link
Copy Markdown
Contributor

PR missing one of the required labels: {'dependencies', 'breaking-change', 'internal', 'bug', 'enhancement', 'documentation', 'new feature'}

@wyfo wyfo requested review from Mallets and milyin October 18, 2024 14:25
@Mallets Mallets added the internal Changes not included in the changelog label Oct 18, 2024
@Mallets Mallets enabled auto-merge (squash) October 18, 2024 14:29
@Mallets Mallets merged commit 50ef20b into eclipse-zenoh:main Oct 18, 2024
Comment thread src/handlers.rs

const CHECK_SIGNALS_INTERVAL: Duration = Duration::from_millis(100);
const DONE_CALLBACK_WARNING: &str = "Passing drop-callback using a tuple \
`(callback, drop-callback)` no more works in 1.0;\n\
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`(callback, drop-callback)` no more works in 1.0;\n\
`(callback, drop-callback)` no longer works in 1.0;\n\

Comment thread src/handlers.rs
const DONE_CALLBACK_WARNING: &str = "Passing drop-callback using a tuple \
`(callback, drop-callback)` no more works in 1.0;\n\
`zenoh.handlers.Callback(callback, drop_callback)` must be used instead.\n\
The tuple form is reserved for passing a handler with`(callback, handler)`.\n\
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The tuple form is reserved for passing a handler with`(callback, handler)`.\n\
The tuple form is reserved for passing a handler with `(callback, handler)`.\n\

Comment thread src/handlers.rs
`zenoh.handlers.Callback(callback, drop_callback)` must be used instead.\n\
The tuple form is reserved for passing a handler with`(callback, handler)`.\n\
If you are already passing a handler but having this warning wrongly displayed, \
you can silent it with:\n\
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
you can silent it with:\n\
you can silence it with:\n\

Comment thread src/handlers.rs
`(callback, drop-callback)` no more works in 1.0;\n\
`zenoh.handlers.Callback(callback, drop_callback)` must be used instead.\n\
The tuple form is reserved for passing a handler with`(callback, handler)`.\n\
If you are already passing a handler but having this warning wrongly displayed, \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are already passing a handler but having this warning wrongly displayed, \
If you are already passing a handler and this warning is still incorrectly displayed, \

@wyfo wyfo added enhancement Existing things could work better breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) and removed internal Changes not included in the changelog labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) enhancement Existing things could work better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug/Breaking Change] session.get tuple callback no longer works in 1.0.0

3 participants