-
Notifications
You must be signed in to change notification settings - Fork 241
Change tokio feature #1173
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
Change tokio feature #1173
Conversation
Signed-off-by: Ray Liu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
crates/iceberg/Cargo.toml:41
- Verify that switching the dependency coordinate from "dep:tokio" to "tokio/full" correctly reflects the intended feature usage and version requirements. Ensure that the full feature is enabled only for the tokio runtime scenario as expected.
tokio = ["tokio/full"]
crates/iceberg/Cargo.toml:83
- Changing the optional flag to false may force inclusion of the tokio dependency in all environments. Confirm that this change aligns with the design of enabling tokio's runtime only when the tokio cfg is active and does not adversely affect builds that only use util functions.
tokio = { workspace = true, optional = false, features = ["sync"] }
|
@Xuanwo for context, I believe this thread is at least part of the reason why @liurenjie1024 is proposing this change. |
I suggest we wait a bit to see how #1036 progresses. Ideally, all dependencies on |
@Xuanwo Seems we only need to enable |
Makes more sense to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused here: If previously we didn't enable tokio/full
, we won't need it also after changing optional
from false
to true
.
Therefore, it's possible that some other dependency already enabled tokio/rt
, even when we didn't enable that.
This is the dependency tree of tokio:
|
To summarize, currently we already enable tokio runtime features unconditionally, even when feature Therefore, I think the best way to proceed is:
|
Actually |
Signed-off-by: Ray Liu <[email protected]>
I agree that we should eventually remove unnecessary tokio runtime dependency, but I don't think we should revert the change of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @liurenjie1024, let's unblock other PRs. We can process #1036 later.
What changes are included in this PR?
Changes tokio dependency, enable
sync
feature only by default, but requiresfull
feature when we enabletokio
cfg. With this change, we can still use tokio's runtime indepdenent utils, while only rely on tokio's runtime when we enabletokio
cfg.Are these changes tested?
CI.