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

chore: fix all warnings #5363

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore: fix all warnings #5363

wants to merge 1 commit into from

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Jan 23, 2025

This fixes all compiler warnings. Note that __cbindgen_hack__ = "yes" is a bit weird - there is no need to make it support a value -- presence of a keyword is an indicator enough. Also, I couldn't figure out what actually sets that value.

This fixes all compiler warnings. Note that `__cbindgen_hack__ = "yes"` is a bit weird - there is no need to make it support a value -- presence of a keyword is an indicator enough. Also, I couldn't figure out what actually sets that value.
@nyurik nyurik requested a review from syrusakbary as a code owner January 23, 2025 07:51
@@ -102,6 +102,7 @@ wasmer-artifact-create = ["wasmer-compiler/wasmer-artifact-create"]
static-artifact-load = ["wasmer-compiler/static-artifact-load"]
static-artifact-create = ["wasmer-compiler/static-artifact-create"]
webc_runner = ["virtual-fs", "webc"]
dylib = []
Copy link
Member

Choose a reason for hiding this comment

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

This feature was deprecated long ago. We shouldn't add it back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You use it in

#[cfg(all(feature = "compiler", any(feature = "compiler", feature = "dylib")))]
- generating compiler warning because dylib is not declared. Should it be removed there?

Comment on lines +78 to +79
llvm = []
run = []
Copy link
Member

Choose a reason for hiding this comment

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

This create will be deprecated (removed from the repo) very soon, we shouldn't add new features to it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the features are used in code, they should be declared in cargo.toml - otherwise its like using a variable without declaring it first - ok for some languages, but usually a bad form for Rust :) Should they be removed there, or should these be added here until then?


[features]
default = []
tracing = []
Copy link
Member

Choose a reason for hiding this comment

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

Why is tracing a feature if it's not used anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is used in

#[cfg(feature = "tracing")]
and
#[cfg(feature = "tracing")]

@nyurik
Copy link
Contributor Author

nyurik commented Jan 23, 2025

@syrusakbary thx for the quick review! The reason I added those is because you have a lot of cfg(feature = "...") that still use those features - generating warnings. IF they are deprecated, they should be removed at the same time from the code and cargo.toml, or else it is really confusing why the warnings are being generated

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