Skip to content

unstable feature usage metrics - #130236

Merged
bors merged 2 commits into
rust-lang:masterfrom
yaahc:unstable-feature-usage
Nov 21, 2024
Merged

unstable feature usage metrics#130236
bors merged 2 commits into
rust-lang:masterfrom
yaahc:unstable-feature-usage

Conversation

@yaahc

@yaahcyaahc commented Sep 11, 2024

Copy link
Copy Markdown
Member

example output

test-lib on  master [?] is 📦 v0.1.0 via 🦀 v1.80.1
❯ cat src/lib.rs
───────┬───────────────────────────────────────────────────────
│ File: src/lib.rs
───────┼───────────────────────────────────────────────────────
1 │ #![feature(unix_set_mark)]
2 │ pub fn add(left: u64, right: u64) -> u64 {
3 │ left + right
4 │ }
5 │
6 │ #[cfg(test)]
7 │ mod tests {
8 │ use super::*;
9 │
10 │ #[test]
11 │ fn it_works() {
12 │ let result = add(2, 2);
13 │ assert_eq!(result, 4);
14 │ }
15 │ }
───────┴───────────────────────────────────────────────────────
test-lib on  master [?] is 📦 v0.1.0 via 🦀 v1.80.1
❯ cargo +stage1 rustc -- -Zmetrics-dir=$PWD/metrics
Compiling test-lib v0.1.0 (/home/yaahc/tmp/test-lib)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
test-lib on  master [?] is 📦 v0.1.0 via 🦀 v1.80.1
❯ cat metrics/unstable_feature_usage.json
───────┬─────────────────────────────────────────────────────────────────────
│ File: metrics/unstable_feature_usage.json
───────┼─────────────────────────────────────────────────────────────────────
1 │ {"lib_features":[{"symbol":"unix_set_mark"}],"lang_features":[]}

related to #129485

@rustbot

Copy link
Copy Markdown
Collaborator

r? @cjgillot

rustbot has assigned @cjgillot.
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

@rustbotrustbot 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 11, 2024
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 25ee72d to 06b95b2CompareSeptember 12, 2024 22:31
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 06b95b2 to 29fcb25CompareSeptember 13, 2024 20:57
@rustbotrustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Sep 13, 2024
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 29fcb25 to 28d9d1bCompareSeptember 13, 2024 21:26
@rust-log-analyzer

This comment has been minimized.

@yaahc

Copy link
Copy Markdown
MemberAuthor

r? @estebank

@rustbotrustbot assigned estebank and unassigned cjgillotSep 24, 2024
@yaahc

yaahc commented Sep 24, 2024

Copy link
Copy Markdown
MemberAuthor

@estebank also here's a draft PR for the subsequent PR that adds support for dumping feature status info: yaahc#3

I have this open on my fork because it's using this PR as the base branch, it's probably worth looking at now but I don't plan to open the PR until this one lands

Comment threadcompiler/rustc_feature/src/unstable.rs Outdated
@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 28d9d1b to 3addcf4CompareNovember 12, 2024 19:34
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch 2 times, most recently from 9ca273b to cd70825CompareNovember 13, 2024 01:35
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from cd70825 to 137db8dCompareNovember 13, 2024 20:04
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch 3 times, most recently from b0fcb24 to 3cf1bb8CompareNovember 15, 2024 00:20
@yaahc
yaahc marked this pull request as ready for review November 15, 2024 00:20
@rustbot

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 3cf1bb8 to 35bfeffCompareNovember 15, 2024 00:30
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 35bfeff to 5d8de54CompareNovember 18, 2024 20:40
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 5d8de54 to 9dd032fCompareNovember 18, 2024 21:03
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 9dd032f to 5a05655CompareNovember 19, 2024 00:47
@rust-log-analyzer

This comment has been minimized.

@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 5a05655 to 609925fCompareNovember 19, 2024 02:03
@yaahc
yaahcforce-pushed the unstable-feature-usage branch from 609925f to dc97db1CompareNovember 20, 2024 19:31

@estebankestebank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me

Comment threadtests/run-make/unstable-feature-usage-metrics/rmake.rs Outdated
.arg("-Zmetrics-dir=invaliddirectorythatdefinitelydoesntexist")
.run_fail()
.assert_stderr_contains(
"error: cannot dump feature usage metrics: No such file or directory",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Because we use dyn Error/IOError we don't display the file path that we couldn't open. That's not ideal but ok for now. Let's revisit in the future.

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
@yaahc

Copy link
Copy Markdown
MemberAuthor

@bors r=estebank

@estebank

Copy link
Copy Markdown
Contributor

@bors r+

@yaahcyaahc closed this Nov 20, 2024
@yaahcyaahc reopened this Nov 20, 2024
@yaahc

Copy link
Copy Markdown
MemberAuthor

@bors r=estebank

@bors

bors commented Nov 20, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 0a14f71 has been approved by estebank

It is now in the queue for this repository.

@borsbors 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 Nov 20, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 21, 2024
…iaskrgr
Rollup of 6 pull requests
Successful merges:
- rust-lang#130236 (unstable feature usage metrics)
- rust-lang#131544 (Make asm label blocks safe context)
- rust-lang#131586 (Support s390x z13 vector ABI)
- rust-lang#132489 (Fix closure arg extraction in `extract_callable_info`, generalize it to async closures)
- rust-lang#133078 (tests: ui/inline-consts: add issue number to a test, rename other tests)
- rust-lang#133283 (Don't exclude relnotes from `needs-triage` label)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit fe5403f into rust-lang:masterNov 21, 2024
@rustbotrustbot added this to the 1.84.0 milestone Nov 21, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 21, 2024
Rollup merge of rust-lang#130236 - yaahc:unstable-feature-usage, r=estebank
unstable feature usage metrics
example output
```
test-lib on  master [?] is 📦 v0.1.0 via 🦀 v1.80.1
❯ cat src/lib.rs
───────┬───────────────────────────────────────────────────────
│ File: src/lib.rs
───────┼───────────────────────────────────────────────────────
1 │ #![feature(unix_set_mark)]
2 │ pub fn add(left: u64, right: u64) -> u64 {
3 │ left + right
4 │ }
5 │
6 │ #[cfg(test)]
7 │ mod tests {
8 │ use super::*;
9 │
10 │ #[test]
11 │ fn it_works() {
12 │ let result = add(2, 2);
13 │ assert_eq!(result, 4);
14 │ }
15 │ }
───────┴───────────────────────────────────────────────────────
test-lib on  master [?] is 📦 v0.1.0 via 🦀 v1.80.1
❯ cargo +stage1 rustc -- -Zmetrics-dir=$PWD/metrics
Compiling test-lib v0.1.0 (/home/yaahc/tmp/test-lib)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
test-lib on  master [?] is 📦 v0.1.0 via 🦀 v1.80.1
❯ cat metrics/unstable_feature_usage.json
───────┬─────────────────────────────────────────────────────────────────────
│ File: metrics/unstable_feature_usage.json
───────┼─────────────────────────────────────────────────────────────────────
1 │ {"lib_features":[{"symbol":"unix_set_mark"}],"lang_features":[]}
```
related to rust-lang#129485
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-makeArea: port run-make Makefiles to rmake.rsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

6 participants

@yaahc@rustbot@rust-log-analyzer@estebank@bors@cjgillot