-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
build_helper::compiletest module factored out of compiletest for use by bootstrap #135653
base: master
Are you sure you want to change the base?
build_helper::compiletest module factored out of compiletest for use by bootstrap #135653
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in src/tools/compiletest cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
2272421
to
70eac07
Compare
r? onur-ozkan |
} | ||
|
||
impl Mode { | ||
pub fn aux_dir_disambiguator(self) -> &'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.
I don't feel like these two helpers belong in build_helpers?
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.
that would require turning them into free functions. do you want me to do that?
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.
Yes, please do move them as free functions into compiletest, this is an impl detail that doesn't feel like they belong here
|
||
string_enum! { | ||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)] | ||
pub enum Mode { |
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.
Please call this TestMode
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.
why? the command line flag is called --mode
, no? so why shouldn't the struct match?
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.
Because build_helpers is a shared dep between bootstrap, compiletest, and some other bootstrap tools. bootstrap itself already has a Mode
, not to mention Mode
is a very generic term.
--mode
for compiletest is fine because it's very clear from context as its a flag of the compiletest binary itself (only matters when bootstrap is actually trying to run compiletest binary).
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.
i would think its position in the compiletest
module would be adequate context.
i can if you really want me to, it's just gonna take a bit since it's refactoring across several crates.
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.
Yes. I would prefer if this is called TestMode
and not just Mode
.
The one thing that feels slightly iffy to me is that now the compiletest test mode definitions are no longer in compiletest, which makes it more indirect if you want to wire up or remove a test mode, or adjust existing test modes. But I suppose that's fine. |
Fair concern as directives are compiletest-first dependency. How about placing directives module (without any helper functions or additional components) into |
Not just directives, but also the concept of test modes and test suites. They are centric to what compiletest is responsible for handling. I think keeping a very lean |
I've always seen |
closes #135645