-
Notifications
You must be signed in to change notification settings - Fork 249
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
doctor: Unbreak spin doctor
for Manifest V2
#1927
Conversation
crates/doctor/tests/ui.rs
Outdated
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.
For now this just captures one change to the version diagnosis plus some smoke tests, but I think I'd like to migrate all the tests in this crate to this style.
@@ -1,4 +1,4 @@ | |||
spin_manifest_version = 2 | |||
spin_manifest_version = 1 |
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.
Just the wrong type now.
show_diagnosis(&*diagnosis); | ||
let mut checkup = spin_doctor::Checkup::new(manifest_file)?; | ||
let mut has_problems = false; | ||
while let Some(PatientDiagnosis { diagnosis, patient }) = checkup.next_diagnosis().await? { |
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.
Most of the changes below are just reformatting due to un-nesting here.
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.
anything involving un-nesting is an instant approve
This doesn't add any V2 functionality, but prevents spurious errors on valid V2 manifests. Signed-off-by: Lann Martin <lann.martin@fermyon.com>
This doesn't add any V2 functionality, but prevents spurious errors on valid V2 manifests.
Also simplifies
Checkup::for_each_diagnosis
intoCheckup::next_diagnosis
, which is much less finicky and not really any harder to use.