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

Added utility library for parsing workspace status stamps. #2982

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

UebelAndre
Copy link
Collaborator

This change introduces a small utility for parsing workspace status stamp files. I found similar snippets throughout projects I work on and thought consolidation within rules_rust would be good. An example usage can be seen here:

use workspace_status::parse_workspace_status_stamps;

fn main() {
    let stable_status = std::fs::read_to_string("bazel-out/stable-status.txt").unwrap();
    let volatile_status = std::fs::read_to_string("bazel-out/volatile-status.txt").unwrap();
    let stamps = parse_workspace_status_stamps(&stable_status)
                .chain(parse_workspace_status_stamps(&stable_status))
                .flatten()
                .collect::<BTreeMap<_, _>>();
    // ...
    // ...
    // ...
}

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Seems useful! Thanks!

@UebelAndre UebelAndre added this pull request to the merge queue Nov 6, 2024
Merged via the queue into bazelbuild:main with commit 6f65a04 Nov 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants