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

Explain why non_snake_case is skipped for binary crates and cleanup tests #130599

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Sep 20, 2024

  • Explain non_snake_case lint is skipped for bin crate names because binaries are not intended to be distributed or consumed like library crates (Don't enforce snake_case for binary names #45127).
  • Coalesce the bunch of tests into a single one but with revisions, which is easier to compare the differences for non_snake_case behavior with respect to crate types.

Follow-up to #121749 with some more comments and test cleanup.

cc @saethlin who bumped into one of the tests and was confused why it was only-x86_64-unknown-linux-gnu.

try-job: dist-i586-gnu-i586-i686-musl

@rustbot
Copy link
Collaborator

rustbot commented Sep 20, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 20, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Sep 20, 2024

@bors rollup=iffy (this might bounce due to unsupported crate types for specific targets, but it's probably better to ignore when necessary instead of just running this for x86_64-unknown-linux-gnu).

@Zalathar
Copy link
Contributor

I notice that this also gets rid of two extra bin tests that set the crate type and crate name in a variety of ways.

I don't object to that, but I just want to double-check that it was intentional.

@jieyouxu
Copy link
Member Author

jieyouxu commented Sep 20, 2024

I notice that this also gets rid of two extra bin tests that set the crate type and crate name in a variety of ways.

I dropped those versions because AFAICT when the check for executable crate type is skipped, the different ways to set crate types/names are indistinguishable to the check as part of a late lint pass. I can add them back in if you think those should be retained.

@Zalathar
Copy link
Contributor

Nah, if there's no reason to think the extra variants will be useful then it seems fine to get rid of them.

@petrochenkov
Copy link
Contributor

r=me with #130599 (comment) answered.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 20, 2024
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 20, 2024

📌 Commit aebc28e has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 20, 2024
@bors

This comment was marked as outdated.

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2024
…r=petrochenkov

Explain why `non_snake_case` is skipped for binary crates and cleanup tests

- Explain `non_snake_case` lint is skipped for bin crate names because binaries are not intended to be distributed or consumed like library crates (rust-lang#45127).
- Coalesce the bunch of tests into a single one but with revisions, which is easier to compare the differences for `non_snake_case` behavior with respect to crate types.

Follow-up to rust-lang#121749 with some more comments and test cleanup.

cc `@saethlin` who bumped into one of the tests and was confused why it was `only-x86_64-unknown-linux-gnu`.
@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as outdated.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 21, 2024
@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 21, 2024
@jieyouxu jieyouxu force-pushed the snake_case_binary_cleanup branch from aebc28e to 9ae1fb4 Compare September 21, 2024 05:42
@jieyouxu
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Sep 21, 2024

⌛ Trying commit 9ae1fb4 with merge 883506d...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2024
…r=<try>

Explain why `non_snake_case` is skipped for binary crates and cleanup tests

- Explain `non_snake_case` lint is skipped for bin crate names because binaries are not intended to be distributed or consumed like library crates (rust-lang#45127).
- Coalesce the bunch of tests into a single one but with revisions, which is easier to compare the differences for `non_snake_case` behavior with respect to crate types.

Follow-up to rust-lang#121749 with some more comments and test cleanup.

cc `@saethlin` who bumped into one of the tests and was confused why it was `only-x86_64-unknown-linux-gnu`.

try-job: dist-i586-gnu-i586-i686-musl
@bors
Copy link
Contributor

bors commented Sep 21, 2024

☀️ Try build successful - checks-actions
Build commit: 883506d (883506d9cd1bcb4c442d6823eba69952f7f92be9)

@jieyouxu
Copy link
Member Author

Changes since last review:

  • Fix test failure by changing to ignore-musl for both cdylib and dylib (musl AFAIK doesn't support dylibs in general)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 21, 2024
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 21, 2024

📌 Commit 9ae1fb4 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 21, 2024
@bors
Copy link
Contributor

bors commented Sep 21, 2024

⌛ Testing commit 9ae1fb4 with merge f48c99a...

@bors
Copy link
Contributor

bors commented Sep 21, 2024

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing f48c99a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 21, 2024
@bors bors merged commit f48c99a into rust-lang:master Sep 21, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 21, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f48c99a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.5%, secondary 2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 1

Cycles

Results (secondary 1.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 769.225s -> 768.677s (-0.07%)
Artifact size: 341.35 MiB -> 341.36 MiB (0.00%)

@jieyouxu jieyouxu deleted the snake_case_binary_cleanup branch December 20, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants