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

Deny warnings only in CI and xtask #1508

Closed
wants to merge 1 commit into from
Closed

Conversation

Dentosal
Copy link
Member

Closes #1493

@Dentosal Dentosal added the tech-debt The issue is to improve the current code and make it more clear/generic/reusable/pretty/avoidable. label Nov 23, 2023
@Dentosal Dentosal self-assigned this Nov 23, 2023
@Dentosal Dentosal added the no changelog Skip the CI check of the changelog modification label Nov 23, 2023
@@ -22,6 +22,7 @@ skip_crate_env_info = true

[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
RUSTFLAGS = "-D warnings"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using -D warnings for cargo make while not using the same RUSTFLAGS for regular build invalidates the building cache.

You can run ./ci_checks.sh twice a row, and you will see that it starts building from scratch.

@xgreenx
Copy link
Collaborator

xgreenx commented Nov 23, 2023

I still think it is better to use !#[deny(warnings)] on the crate level because it doesn't cause the rebuilding of all dependencies, plus it can be easily disabled without rebuilding all dependencies. It works in all cases and covers only the crate that we are interested in.

We can introduce a new feature "ignore-warning" for each crate and use #![cfg_attr(not(feature = "ignore-warning"), deny(warnings))](but it will cause rebuilding of all dependencies if you want to ignore warnings, that also is bad)

@MitchTurner
Copy link
Member

I agree that the warnings are annoying sometimes and I also don't like modifying the attributes during development--I'd end up forgetting to replace them.

I feel like overriding the lints via your cargo build command is a good solution. I haven't figured out how to get it to work yet though. This doesn't seem to do the trick:

RUSTFLAGS="-W warnings" cargo build

So I'm not sure if it's possible...

@xgreenx
Copy link
Collaborator

xgreenx commented Dec 4, 2023

Closing for future investigation of how to make it work. More details in the issue #1493

@xgreenx xgreenx closed this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Skip the CI check of the changelog modification tech-debt The issue is to improve the current code and make it more clear/generic/reusable/pretty/avoidable.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove !#[deny(warnings)] to improve DEX
3 participants