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

Fix directives for lint-non-snake-case-crate #130860

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Sep 25, 2024

This test fails on targets without unwinding or with --target-rustcflags=-Cpanic=abort because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general.

  • needs-dynamic-linking is self explanatory
  • force-host for proc macros
  • no-prefer-dynamic is apparently also used for proc macros

Note that needs-unwind can also be useful for situations other than proc macros where unwinding is necessary.

r? @jieyouxu

try-job: test-various

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 25, 2024
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 26, 2024

📌 Commit c5925ef has been approved by compiler-errors

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 26, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 26, 2024
…-errors

Fix directives for lint-non-snake-case-crate

This test fails on targets without unwinding or with `--target-rustcflags=-Cpanic=abort` because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general.

* `needs-dynamic-linking` is self explanatory
* `force-host` for proc macros
* `no-prefer-dynamic` is apparently also used for proc macros

Note that `needs-unwind` can also be useful for situations other than proc macros where unwinding is necessary.

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 26, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#130820 (Fix diagnostics for coroutines with () as input.)
 - rust-lang#130833 (Fix the misleading diagnostic for `let_underscore_drop` on type without `Drop` implementation)
 - rust-lang#130845 (Utf8Chunks: add link to Utf8Chunk)
 - rust-lang#130860 (Fix directives for lint-non-snake-case-crate)
 - rust-lang#130861 (Use `mem::offset_of!` for `sockaddr_un.sun_path`)
 - rust-lang#130865 (Use `&raw` in the standard library)
 - rust-lang#130868 (Update FIXME comment in s390x_unknown_linux_*.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 26, 2024
…-errors

Fix directives for lint-non-snake-case-crate

This test fails on targets without unwinding or with `--target-rustcflags=-Cpanic=abort` because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general.

* `needs-dynamic-linking` is self explanatory
* `force-host` for proc macros
* `no-prefer-dynamic` is apparently also used for proc macros

Note that `needs-unwind` can also be useful for situations other than proc macros where unwinding is necessary.

r? ``@jieyouxu``
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 26, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#130820 (Fix diagnostics for coroutines with () as input.)
 - rust-lang#130833 (Fix the misleading diagnostic for `let_underscore_drop` on type without `Drop` implementation)
 - rust-lang#130845 (Utf8Chunks: add link to Utf8Chunk)
 - rust-lang#130860 (Fix directives for lint-non-snake-case-crate)
 - rust-lang#130868 (Update FIXME comment in s390x_unknown_linux_*.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#130876 (comment)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 26, 2024
@jieyouxu
Copy link
Member

Apparently needs-dynamic-linking is not equivalent to checking if dylib or cdylib crate types are supported.

  • In compiletest, needs-dynamic-linking performs a check based on target cfg's dynamic_linking field + --print=cfg --target $TARGET.
  • However, target cfg has an additional field only_cdylib which, if dynamic_linking is true, indicates that only cdylib crate type is supported and not dylib.
    /// Whether dynamic linking is available on this target. Defaults to false.
    pub dynamic_linking: bool,
    /// Whether dynamic linking can export TLS globals. Defaults to true.
    pub dll_tls_export: bool,
    /// If dynamic linking is available, whether only cdylibs are supported.
    pub only_cdylib: bool,
    • This is the case for wasm base, dynamic linking is supported but not dylib crate type, only cdylib is supported.
      // we allow dynamic linking, but only cdylibs. Basically we allow a
      // final library artifact that exports some symbols (a wasm module) but
      // we don't allow intermediate `dylib` crate types
      dynamic_linking: true,
      only_cdylib: true,

In the short-run (for this PR), I think it's okay to keep the ignore-wasm, but please leave me a FIXME that states something like we should add a proper //@ target-supports-crate-type: rlib directive or something.

@tmandry tmandry force-pushed the fix-directives branch 2 times, most recently from b420120 to 73dc720 Compare October 28, 2024 21:40
@tmandry
Copy link
Member Author

tmandry commented Oct 28, 2024

@bors try

@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 Oct 28, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 28, 2024
Fix directives for lint-non-snake-case-crate

This test fails on targets without unwinding or with `--target-rustcflags=-Cpanic=abort` because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general.

* `needs-dynamic-linking` is self explanatory
* `force-host` for proc macros
* `no-prefer-dynamic` is apparently also used for proc macros

Note that `needs-unwind` can also be useful for situations other than proc macros where unwinding is necessary.

r? `@jieyouxu`

try-job: test-various
@bors
Copy link
Contributor

bors commented Oct 28, 2024

⌛ Trying commit 73dc720 with merge 1a4288e...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 28, 2024

💔 Test failed - checks-actions

@bors bors 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 Oct 28, 2024
@rust-log-analyzer

This comment has been minimized.

@tmandry
Copy link
Member Author

tmandry commented Oct 29, 2024

@bors try

@bors
Copy link
Contributor

bors commented Oct 29, 2024

⌛ Trying commit 5bab360 with merge 7622f5f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 29, 2024
Fix directives for lint-non-snake-case-crate

This test fails on targets without unwinding or with `--target-rustcflags=-Cpanic=abort` because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general.

* `needs-dynamic-linking` is self explanatory
* `force-host` for proc macros
* `no-prefer-dynamic` is apparently also used for proc macros

Note that `needs-unwind` can also be useful for situations other than proc macros where unwinding is necessary.

r? `@jieyouxu`

try-job: test-various
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 29, 2024

💔 Test failed - checks-actions

This test fails on targets without unwinding because the proc macro was
compiled as the target, not the host. Some targets were explicitly
disabled to pass CI, but these directives are more general.

Fixes Fuchsia tests.
@tmandry
Copy link
Member Author

tmandry commented Oct 29, 2024

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 29, 2024
Fix directives for lint-non-snake-case-crate

This test fails on targets without unwinding or with `--target-rustcflags=-Cpanic=abort` because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general.

* `needs-dynamic-linking` is self explanatory
* `force-host` for proc macros
* `no-prefer-dynamic` is apparently also used for proc macros

Note that `needs-unwind` can also be useful for situations other than proc macros where unwinding is necessary.

r? `@jieyouxu`

try-job: test-various
@bors
Copy link
Contributor

bors commented Oct 29, 2024

⌛ Trying commit d942113 with merge 5ba305c...

@bors
Copy link
Contributor

bors commented Oct 30, 2024

☀️ Try build successful - checks-actions
Build commit: 5ba305c (5ba305cd2b04628b1687bd02cd961fc5abf87884)

@tmandry
Copy link
Member Author

tmandry commented Oct 30, 2024

@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 Oct 30, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks!

@jieyouxu
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Oct 30, 2024

📌 Commit d942113 has been approved by jieyouxu

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 Oct 30, 2024
@bors
Copy link
Contributor

bors commented Oct 30, 2024

⌛ Testing commit d942113 with merge 298c746...

@bors
Copy link
Contributor

bors commented Oct 30, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 298c746 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 30, 2024
@bors bors merged commit 298c746 into rust-lang:master Oct 30, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 30, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (298c746): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.9%, -0.3%] 3
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.6%, secondary 1.7%)

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.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.6% [-0.6%, -0.6%] 1

Cycles

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

Binary size

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

Bootstrap: 782.446s -> 782.512s (0.01%)
Artifact size: 333.66 MiB -> 333.61 MiB (-0.01%)

@tmandry tmandry deleted the fix-directives branch October 30, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-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.

8 participants