Skip to content

fix: fix 2 cargo warnings #112

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

Merged
merged 2 commits into from
Apr 9, 2025

Conversation

rikhuijzer
Copy link
Contributor

This fixes three warnings that cargo test produced.

Motivation and Context

Locally and in CI the following warnings were visible:

$ cargo test --all-features
warning: /home/runner/work/rust-sdk/rust-sdk/examples/rig-integration/Cargo.toml: unused manifest key: dependencies.rmcp.no-default-features
warning: /home/runner/work/rust-sdk/rust-sdk/crates/rmcp/Cargo.toml: unused manifest key: dependencies.rmcp-macros.version
warning: /home/runner/work/rust-sdk/rust-sdk/examples/wasi/Cargo.toml: version requirement `0.14.2+wasi-0.2.4` for dependency `wasi` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion

How Has This Been Tested?

I re-ran all tests and also manually "tested" (built) rig-integration via

$ cd examples/righ-integration

$ cargo build

For rig-integration I verified that setting default-features = false will not be able to build the project, so that's why I removed it. Note that default-features = false is interpreted by Cargo while the setting no-default-features = true was ignored.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@@ -18,7 +18,7 @@ rmcp = { path = "../../crates/rmcp", features = [
"client",
"transport-child-process",
"transport-sse",
], no-default-features = true }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was ignored by cargo because it should be default-features = false.

@@ -17,7 +17,7 @@ readme = { workspace = true }
crate-type = ["cdylib"]

[dependencies]
wasi = { version = "0.14.2+wasi-0.2.4"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was also ignored by Cargo according to

 warning: /home/runner/work/rust-sdk/rust-sdk/examples/wasi/Cargo.toml: version requirement `0.14.2+wasi-0.2.4` for dependency `wasi` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion

@rikhuijzer rikhuijzer changed the title fix: fix 3 cargo warnings fix: fix 2 cargo warnings Apr 9, 2025
Copy link
Collaborator

@4t145 4t145 left a comment

Choose a reason for hiding this comment

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

LGTM, we can fix the rest one warning latter. Thank you for PR.

@4t145 4t145 merged commit 583a513 into modelcontextprotocol:main Apr 9, 2025
8 checks passed
@rikhuijzer rikhuijzer deleted the rh/fix-warnings branch April 9, 2025 10:53
@rikhuijzer rikhuijzer mentioned this pull request Apr 10, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants