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

Transition from wasm32-wasi to wasm32-wasip1, fix clippy lint #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

purplesyringa
Copy link

@purplesyringa purplesyringa commented Jul 29, 2024

This should hopefully ease maintenance of the crate and enable easier wide refactoring.

Also, the wasm32-wasi target was renamed to wasm32-wasip1, and the former is going to be removed soon, so I fixed that.

@BurntSushi
Copy link
Owner

The transition to wasip1 LGTM.

But I don't have Clippy enabled for a reason. There are a lot of lints that I don't always agree with. Even in this PR, I see some changes I like and some I don't. I'm not sure I really want to spend the time going through all of them to be honest.

I have a long-standing TODO item to go through the Clippy lints, select the ones I like and then use them in my various Rust projects. But it hasn't been a priority for me.

@purplesyringa
Copy link
Author

purplesyringa commented Jul 29, 2024

How about I apply the least contentious clippy lints for now? I'd like to:

  • Fix spaces in doc comments
  • Replace the use of needles.get(0) / needles.get(1) / etc. with the match block
  • Replace core::u*::MAX with u*::MAX

This alone would remove a significant percentage of clippy lints.

@BurntSushi
Copy link
Owner

I agree with the third bullet point, but not the first two. For (1), my line wrapper doesn't conform to the style that Clippy wants, so that would be annoying for me. For (2), I don't have a super strong opinion, but I actually like the status quo better.

@purplesyringa
Copy link
Author

I see. I think I'll apply the 3rd bullet then, and whitelist other lints. That should be no worse than status quo and might actually catch bugs.

@BurntSushi
Copy link
Owner

Please don't include Clippy in CI.

@purplesyringa
Copy link
Author

Sure, I'll get to it soon. What is the rationale by the way?

@purplesyringa
Copy link
Author

I have reduced the PR to just wasm transition, the core:: replacement, and a bunch of clippy allows. Is that sufficient?

@BurntSushi
Copy link
Owner

Sure, I'll get to it soon. What is the rationale by the way?

I think I explained why here: #158 (comment)

I have reduced the PR to just wasm transition, the core:: replacement, and a bunch of clippy allows. Is that sufficient?

No. Please remove Clippy from CI. I've already said that I have a TODO to go through Clippy lints and pick the ones I want. But I haven't done it yet, and until then, I don't want Clippy in CI.

@purplesyringa
Copy link
Author

Oh, wait, I must have misunderstood you. I assumed you don't want clippy in CI but still want it outside CI. That was odd phrasing. Fixed.

Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Thanks!

@purplesyringa purplesyringa changed the title Fix clippy warnings, add clippy to CI Transition from wasm32-wasi to wasm32-wasip1, fix clippy lint Jul 29, 2024
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