unstable feature usage metrics by yaahc Β· Pull Request #130236 Β· rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation23 Commits2 Checks12 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

yaahc

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

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.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@yaahc

@yaahc

@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

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc marked this pull request as ready for review

November 15, 2024 00:20

@rustbot

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

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@yaahc

estebank

Choose a reason for hiding this comment

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

r=me

.arg("-Zmetrics-dir=invaliddirectorythatdefinitelydoesntexist")
.run_fail()
.assert_stderr_contains(
"error: cannot dump feature usage metrics: No such file or directory",

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.

@yaahc @estebank

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

@yaahc

@estebank

@yaahc

@bors

πŸ“Œ 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

@bors

…iaskrgr

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Nov 21, 2024

@rust-timer

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

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.