-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Reorganize the run-make-support
library
#127760
Conversation
I have ran |
…=<try> Reorganize the `run-make-support` library The `run_make_support` library has a kitchen sink `lib.rs` that make discovery/learning very difficult. Let's try to improve that by breaking up `lib.rs` into smaller more organized modules. This is a precursor to improving the documentation and learnability of the `run_make_support` library. ### Changes - Breakup `lib.rs` into smaller modules according to functionality - Rename `recursive_diff` -> `assert_recursive_eq` - Minor doc improvements / fixes in a few places (I have a follow-up documentation PR planned) This PR is best reviewed commit-by-commit. r? `@Kobzol` (or Mark, or T-compiler or T-bootstrap) try-job: x86_64-msvc try-job: aarch64-apple try-job: test-various try-job: armhf-gnu try-job: dist-x86_64-linux
@rustbot author (while waiting for try job to come back) |
This will conflict (and is prone to conflicts) with other rmake.rs PRs that touch the support library. |
☀️ Try build successful - checks-actions |
Try builds passed. |
|
||
/// Construct the binary (executable) name based on the target. | ||
#[must_use] | ||
pub fn bin_name(name: &str) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(preexisting) this could use std::env::consts::EXE_EXTENSION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out 👍, I'll address these in a follow-up PR. I want to keep this PR mostly just moving code around.
|
||
/// Construct the dynamic library extension based on the target. | ||
#[must_use] | ||
pub fn dynamic_lib_extension() -> &'static str { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(preexisting) this could be replaced with std::env::consts::DLL_EXTENSION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice cleanup! Left a few comments, pretty much all nits.
Btw https://github.com/tummychow/git-absorb might be useful if you want to make changes to so many commits.
…scoped_run` module
Going to re-run try jobs (I think force push cancels them?) |
…=<try> Reorganize the `run-make-support` library The `run_make_support` library has a kitchen sink `lib.rs` that make discovery/learning very difficult. Let's try to improve that by breaking up `lib.rs` into smaller more organized modules. This is a precursor to improving the documentation and learnability of the `run_make_support` library. ### Changes - Breakup `lib.rs` into smaller modules according to functionality - Rename `recursive_diff` -> `assert_recursive_eq` - Minor doc improvements / fixes in a few places (I have a follow-up documentation PR planned) This PR is best reviewed commit-by-commit. r? `@Kobzol` (or Mark, or T-compiler or T-bootstrap) try-job: x86_64-msvc try-job: aarch64-apple try-job: test-various try-job: armhf-gnu try-job: dist-x86_64-linux
It doesn't, we currently allow parallel try builds on PRs. |
☀️ Try build successful - checks-actions |
(RIP all the open run-make PRs) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f00f850): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.855s -> 768.932s (-0.12%) |
Cleanup dll/exe filename calculations in `run_make_support` Use `std::env::consts` constants since now we have access to them (unlike in Makefiles!) ^^ cc `@bzEq` (this is one of the places in our test suites that tries to compute e.g. dylib extension; using `std::env::consts::DLL_EXTENSION` should correctly return `a` for AIX) r? `@fmease` (thank you for the suggestion in rust-lang#127760 (comment), this also improves correctness for the support library!) try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18
…ease Cleanup dll/exe filename calculations in `run_make_support` Use `std::env::consts` constants since now we have access to them (unlike in Makefiles!) ^^ cc `@bzEq` (this is one of the places in our test suites that tries to compute e.g. dylib extension; using `std::env::consts::DLL_EXTENSION` should correctly return `a` for AIX) r? `@fmease` (thank you for the suggestion in rust-lang#127760 (comment), this also improves correctness for the support library!) try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18
Rollup merge of rust-lang#127960 - jieyouxu:minor-rmake-cleanup, r=fmease Cleanup dll/exe filename calculations in `run_make_support` Use `std::env::consts` constants since now we have access to them (unlike in Makefiles!) ^^ cc `@bzEq` (this is one of the places in our test suites that tries to compute e.g. dylib extension; using `std::env::consts::DLL_EXTENSION` should correctly return `a` for AIX) r? `@fmease` (thank you for the suggestion in rust-lang#127760 (comment), this also improves correctness for the support library!) try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18
Cleanup dll/exe filename calculations in `run_make_support` Use `std::env::consts` constants since now we have access to them (unlike in Makefiles!) ^^ cc `@bzEq` (this is one of the places in our test suites that tries to compute e.g. dylib extension; using `std::env::consts::DLL_EXTENSION` should correctly return `a` for AIX) r? `@fmease` (thank you for the suggestion in rust-lang/rust#127760 (comment), this also improves correctness for the support library!) try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18
The
run_make_support
library has a kitchen sinklib.rs
that make discovery/learning very difficult. Let's try to improve that by breaking uplib.rs
into smaller more organized modules. This is a precursor to improving the documentation and learnability of therun_make_support
library.Changes
lib.rs
into smaller modules according to functionalityrecursive_diff
->assert_dirs_are_equal
read_dir
with callback interface asread_dir_entries
fs
module, re-exported to tests asrfs
This PR is best reviewed commit-by-commit.
r? @Kobzol (or Mark, or T-compiler or T-bootstrap)
try-job: x86_64-msvc
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: dist-x86_64-linux