Check dependencies before skipping dependency installation#369
Check dependencies before skipping dependency installation#369smowton merged 2 commits intogithub:mainfrom
Conversation
smowton
left a comment
There was a problem hiding this comment.
Can you add a test to extractor-tests exercising this case?
| if !buildSucceeded || util.DepErrors("./...", modMode.argsForGoVersion(getEnvGoSemVer())...) { | ||
| // Build failed or there are still dependency errors; we'll try to install dependencies | ||
| // ourselves | ||
| log.Println("") |
There was a problem hiding this comment.
I'd failed to push, whoops.
| modMode = ModVendor | ||
| } else if util.DirExists("vendor") { | ||
| modMode = ModMod | ||
| } |
There was a problem hiding this comment.
The check at line 286 is now unnecessary, right? Move all of the following if-block inside this if depMode == GoGetWithModules {
We can't test the autobuilder with |
|
Doh right, yes, makes sense. In that case how about making a branch derived from this one that fails the build with a distinctive error when (a) I think this is likely to improve things, just wary of introducing duplicate copies of libraries because |
|
This is actually the case for almost half the projects on staging, so it seems like a sensible thing to do. |
Sometimes build scripts succeed without installing dependencies, for example if they are unrelated to Go or if they simply always exit successfully. Therefore, added a check that dependencies at least resolve before skipping dependency installation.
|
Distribution build looks all good, with one project failure due to unrelated reasons. (The repository no longer exists) |
Ran into some issues when testing a few projects where builds were unrelated to Go / exited 0 despite failing, so I wrote this quick change.