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

unstable feature usage metrics #130236

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

yaahc
Copy link
Member

@yaahc yaahc commented Sep 11, 2024

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
Collaborator

rustbot commented Sep 11, 2024

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

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

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from 25ee72d to 06b95b2 Compare September 12, 2024 22:31
@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from 06b95b2 to 29fcb25 Compare September 13, 2024 20:57
@rustbot rustbot 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 yaahc force-pushed the unstable-feature-usage branch from 29fcb25 to 28d9d1b Compare September 13, 2024 21:26
@rust-log-analyzer

This comment has been minimized.

@yaahc
Copy link
Member Author

yaahc commented Sep 24, 2024

r? @estebank

@rustbot rustbot assigned estebank and unassigned cjgillot Sep 24, 2024
@yaahc
Copy link
Member Author

yaahc commented Sep 24, 2024

@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

@yaahc yaahc force-pushed the unstable-feature-usage branch from 28d9d1b to 3addcf4 Compare November 12, 2024 19:34
@rust-log-analyzer

This comment has been minimized.

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

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from cd70825 to 137db8d Compare November 13, 2024 20:04
@rust-log-analyzer

This comment has been minimized.

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

rustbot commented Nov 15, 2024

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 yaahc force-pushed the unstable-feature-usage branch from 3cf1bb8 to 35bfeff Compare November 15, 2024 00:30
@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from 35bfeff to 5d8de54 Compare November 18, 2024 20:40
@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from 5d8de54 to 9dd032f Compare November 18, 2024 21:03
@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from 9dd032f to 5a05655 Compare November 19, 2024 00:47
@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc force-pushed the unstable-feature-usage branch from 5a05655 to 609925f Compare November 19, 2024 02:03
@yaahc yaahc force-pushed the unstable-feature-usage branch from 609925f to dc97db1 Compare November 20, 2024 19:31
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

r=me

tests/run-make/unstable-feature-usage-metrics/rmake.rs Outdated Show resolved Hide resolved
.arg("-Zmetrics-dir=invaliddirectorythatdefinitelydoesntexist")
.run_fail()
.assert_stderr_contains(
"error: cannot dump feature usage metrics: No such file or directory",
Copy link
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
Member Author

yaahc commented Nov 20, 2024

@bors r=estebank

@estebank
Copy link
Contributor

@bors r+

@yaahc yaahc closed this Nov 20, 2024
@yaahc yaahc reopened this Nov 20, 2024
@yaahc
Copy link
Member Author

yaahc commented Nov 20, 2024

@bors r=estebank

@bors
Copy link
Contributor

bors commented Nov 20, 2024

πŸ“Œ Commit 0a14f71 has been approved by estebank

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 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:master Nov 21, 2024
12 checks passed
@rustbot rustbot 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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.

6 participants