-
Notifications
You must be signed in to change notification settings - Fork 25
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(ci): remove clippy.sh #1917
Conversation
Artifacts upload triggered. View details here |
337de5c
to
c9436fe
Compare
Artifacts upload triggered. View details here |
c9436fe
to
f3383ae
Compare
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this example PR that rejects a commit that violated nonstandard-style
, which is now just a warning locally, but generates an error in the CI.
Note: unused-imports
, the main suspect, is already warning by default.
Reviewable status: 0 of 3 files reviewed, all discussions resolved
scripts/run_tests.py
line 49 at r1 (raw file):
# Don't remove, or warnings will merge. # TODO: add this to package args instead of here, it is a rustc flag, not a clippy flag. clippy_args += ["--", "-Dwarnings"]
This is suboptimal, would have preferred to add this to package_args
but that one's already used for options, whereas -Dwarnings
as shown below is an operand.
Technically this implies adding a package_operands array but I didn't want to overengineer this task unprompted.
Code quote:
# TODO: add this to package args instead of here, it is a rustc flag, not a clippy flag.
clippy_args += ["--", "-Dwarnings"]
Benchmark movements: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1917 +/- ##
===========================================
+ Coverage 40.10% 76.50% +36.39%
===========================================
Files 26 373 +347
Lines 1895 39965 +38070
Branches 1895 39965 +38070
===========================================
+ Hits 760 30575 +29815
- Misses 1100 7114 +6014
- Partials 35 2276 +2241 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)
scripts/run_tests.py
line 49 at r1 (raw file):
Previously, giladchase wrote…
This is suboptimal, would have preferred to add this to
package_args
but that one's already used for options, whereas-Dwarnings
as shown below is an operand.Technically this implies adding a package_operands array but I didn't want to overengineer this task unprompted.
can you explain? (maybe offline)
Cargo.toml
line 259 at r1 (raw file):
# See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is # needed (from rust 1.80). unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
please add instruction (here is a good place?)
Suggestion:
# To deny warnings during local development: BLA BLA
[workspace.lints.rust]
future-incompatible = "warn"
nonstandard-style = "warn"
rust-2018-idioms = "warn"
# See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is
# needed (from rust 1.80).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
f3383ae
to
9144e78
Compare
Artifacts upload triggered. View details here |
Benchmark movements: |
9144e78
to
bcbdcba
Compare
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware)
Cargo.toml
line 259 at r1 (raw file):
Previously, dorimedini-starkware wrote…
please add instruction (here is a good place?)
Done.
scripts/run_tests.py
line 49 at r1 (raw file):
Previously, dorimedini-starkware wrote…
can you explain? (maybe offline)
Fixed, a bit repetitive, can it be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @graphite-app[bot])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @graphite-app[bot])
bcbdcba
to
be8296c
Compare
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @graphite-app[bot] from a discussion.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @graphite-app[bot])
be8296c
to
c73f168
Compare
Artifacts upload triggered. View details here |
c73f168
to
ee13d10
Compare
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, 1 of 1 files at r3, 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @giladchase)
scripts/run_tests.py
line 49 at r1 (raw file):
Previously, giladchase wrote…
Fixed, a bit repetitive, can it be better?
make the if-else set the base command, then add the operand args outside the if-else blocks?
ee13d10
to
1040e9b
Compare
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @graphite-app[bot] from a discussion.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
scripts/run_tests.py
line 49 at r1 (raw file):
Previously, dorimedini-starkware wrote…
make the if-else set the base command, then add the operand args outside the if-else blocks?
Not sure that would work, inner branches might want to add args/operands, and you have to add them args first, operands later...
Maybe I misunderstand what you mean, can you give a rough psuedo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)
scripts/run_tests.py
line 49 at r1 (raw file):
Previously, giladchase wrote…
Not sure that would work, inner branches might want to add args/operands, and you have to add them args first, operands later...
Maybe I misunderstand what you mean, can you give a rough psuedo?
ok now that review-bot made the RUSTFMT case a special case, my way no longer works anyway :P
1040e9b
to
f82884d
Compare
It's messier than i thought, even though it's a rustc flag, rustfmt and doc don't respect it. |
reopening |
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r9, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @giladchase)
a discussion (no related file):
Q: what about other CI workflows?
example: blockifier_ci builds the blockifier with the native
feature; do we need to inject this -D
everywhere?
.github/workflows/main.yml
line 21 at r9 (raw file):
env: CI: 1 RUSTFLAGS: "-D warnings"
oooh... much better
Code quote:
RUSTFLAGS: "-D warnings"
dfc9bca
to
2ebc0c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @graphite-app[bot])
a discussion (no related file):
Previously, dorimedini-starkware wrote…
Q: what about other CI workflows?
example: blockifier_ci builds the blockifier with thenative
feature; do we need to inject this-D
everywhere?
Don't need really, it's just easier and less error-prone to have this in place rather than in multiple places.
It is unlikely to cause anyone any issues, I saw other popular crates using this pattern in ci.yml.
Moved it closer to callsites.
scripts/run_tests.py
line 49 at r1 (raw file):
Previously, dorimedini-starkware wrote…
ok now that review-bot made the RUSTFMT case a special case, my way no longer works anyway :P
Ya rustfmt/doc can't handle this operand, which is weird cause they can handle it through RUSTFLAGS alright 🤷
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @graphite-app[bot])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @graphite-app[bot])
- Only one source of truth for lints, main Cargo.toml, making clippy.sh unnecessary. - Warnings no longer denied, only in the CI. To preserve existing behaviors users can add `-Dwarnings` to local RUSTFLAGS. We still need to enforce in workspace tests that all crates inherit workspace lints.
2ebc0c8
to
2e7756a
Compare
Artifacts upload triggered. View details here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @graphite-app[bot] from a discussion.
Reviewable status: 2 of 4 files reviewed, all discussions resolved (waiting on @dorimedini-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 4 files at r9, 1 of 1 files at r10, 2 of 2 files at r11, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @giladchase)
-Dwarnings
to local RUSTFLAGS.We still need to enforce in workspace tests that all crates inherit workspace lints.