-
Notifications
You must be signed in to change notification settings - Fork 13k
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
x setup -h -v
should work
#96049
Comments
@rustbot label -E-medium +E-mentor |
@rustbot claim |
@jyn514 can I get some more details please, as |
Hi @anuvratsingh, I left some suggestions on https://rust-lang.zulipchat.com/#narrow/stream/122652-new-members/topic/impl.20Step.20for.20Profile :) |
Wasn't able to resolve this, but here are some resources shared by jyn514 |
HI, is it okay if I try to work on this? @rustbot claim |
Hi @jyn514, I would like to ask you a few questions, hope you don't mind! I'll be very succinct. Right now, I managed to
The paths under 'Available paths:' are dynamically generated by getting all However, I have trouble proceeding because the
i.e. If I run So, should I change the current behaviour so that it accepts a path, e.g. This would involve changes to, amongst other things,
I hope I did not misunderstood something! P.S. I'd be happy to chat with you in rust zulipchat if you'd prefer. |
This looks great so far! Thanks for working on it :)
This is a great point. I agree it should stay as the profile name. I think I mislead you in the original description, sorry - we already hard-code the possible profiles in |
Hi @jyn514, so i implemented ...
fn should_run(mut run: ShouldRun<'_>) -> ShouldRun<'_> {
for choice in Profile::all() {
run = run.alias(&choice.to_string());
}
run
}
... It works for profile assert!(
!self.builder.src.join(alias).exists(),
"use `builder.path()` for real paths: {}",
alias
); I could make an exception for Do you think I should do the exception, or could there be better way? |
@bentongxyz I think just removing the assertion altogether is ok. |
Looks like this was fixed now, closing as completed. |
x setup
takes a short list of paths determined at runtime. Currently, it's special-cased in bootstrap rather than going throughStep::should_run
. But there's no need to special-case it - it can do the run time check inshould_run
instead, there's no sandbox. Switching it toshould_run
also has the advantage of automatically fixingx setup -h -v
.The list of paths is "all toml files in
src/bootstrap/defaults
".Mentoring instructions:
impl Step for Profile
insrc/bootstrap/setup.rs
Subcommand::Setup
inBuilder::new
andBuilder::get_step_descriptions
.cc @aswild - are you interested in tackling this after #96003?
@rustbot label +A-rustbuild +E-easy +E-medium
cc #96003 (comment)
The text was updated successfully, but these errors were encountered: