Skip to content

PR template clippy surf OR reqwest #100

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 3 commits into from
Oct 4, 2021

Conversation

ctrlaltf24
Copy link
Contributor

Description

PR Template check of cargo clippy --all-targets --all-features -- -D warnings errors due to --all-features importing both surf and reqwest. Split into two separate checks.

Checklist

  • Formatted code using cargo fmt --all
  • Linted code using clippy cargo clippy --all-targets --all-features -- -D warnings
  • Updated README.md using cargo readme -r influxdb -t ../README.tpl > README.md
  • Reviewed the diff. Did you leave any print statements or unnecessary comments?
    • The last line change is adding a newline at the end of the file.
  • Any unfinished work that warrants a separate issue captured in an issue with a TODO code comment

@ctrlaltf24 ctrlaltf24 changed the title update PR template to import surf or reqwest PR template clippy surf OR reqwest Oct 4, 2021
@msrd0
Copy link
Collaborator

msrd0 commented Oct 4, 2021

Thanks for catching this, we definitely need to change that. However, while surf and reqwest might be ok with enabling several features, I don't think it adds any value to have all surf-based or all reqwest-based features enabled (and let surf/reqwest decide which client / tls library will be used).

Wouldn't it be sufficient to use those commands we also use for the CI? (otherwise we should maybe change the CI commands)

@ctrlaltf24
Copy link
Contributor Author

I don't think it adds any value to have all surf-based or all reqwest-based features enabled

If the features aren't enabled, clippy won't detect errors that are masked by #cfg . While such an issue rarely happens, would still be nice if it was caught before users that specify that feature have issues with a released version.

Feel free to hijack this PR and make any commits you want (I gave you permission to push on the fork) to get the documentation where it should be. Just something I noticed that I wanted to bring to your attention.

@msrd0
Copy link
Collaborator

msrd0 commented Oct 4, 2021

If the features aren't enabled, clippy won't detect errors that are masked by #cfg . While such an issue rarely happens, would still be nice if it was caught before users that specify that feature have issues with a released version.

Yes, absolutely. But we run cfg against surf and reqwest, but iirc not against any of the specific features (like reqwest-client-rustls). That's what I meant, sorry if I didn't express that clearly.

@msrd0 msrd0 merged commit 57eb8f0 into influxdb-rs:main Oct 4, 2021
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