From 6bf73126dc579c073b914016ad886ca90794d287 Mon Sep 17 00:00:00 2001 From: Sam Westmoreland Date: Fri, 15 Dec 2023 14:56:40 +0000 Subject: [PATCH] Tag v17.4.0 (#2996) --- VERSION | 2 +- docs/BUILD | 2 +- src/core/build_target.go | 10 ++-------- src/core/state.go | 30 ++++++++---------------------- 4 files changed, 12 insertions(+), 32 deletions(-) diff --git a/VERSION b/VERSION index ce196298f1..e64ad13cba 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -17.4.0-beta.10 +17.4.0 diff --git a/docs/BUILD b/docs/BUILD index 4a8fa3a796..a013ffdda0 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -58,7 +58,7 @@ genrule( # Plugin versions to pull the docs from plugins = { "python": "v1.5.0", - "java": "v0.3.0", + "java": "v0.4.0", "go": "v1.11.5", "cc": "v0.4.0", "shell": "v0.2.0", diff --git a/src/core/build_target.go b/src/core/build_target.go index 705c27a735..1d7865e4ba 100644 --- a/src/core/build_target.go +++ b/src/core/build_target.go @@ -699,14 +699,8 @@ func (target *BuildTarget) FinishBuild() { } // WaitForBuild blocks until this target has finished building. -func (target *BuildTarget) WaitForBuild(dependant BuildLabel) { - select { - case <-target.finishedBuilding: - return - case <-time.After(time.Minute): - log.Debugf("%v: still waiting for %v to build", dependant, target.Label) - target.WaitForBuild(dependant) - } +func (target *BuildTarget) WaitForBuild() { + <-target.finishedBuilding } // DeclaredOutputs returns the outputs from this target's original declaration. diff --git a/src/core/state.go b/src/core/state.go index b97ae88f91..6ef6a39666 100644 --- a/src/core/state.go +++ b/src/core/state.go @@ -832,24 +832,14 @@ func (state *BuildState) WaitForPackage(l, dependent BuildLabel, mode ParseMode) // If something has promised to parse it, wait for them to do so if ch := state.progress.pendingPackages.Get(key); ch != nil { - select { - case <-ch: - return state.Graph.PackageByLabel(l) - case <-time.After(time.Minute): - log.Debugf("%v: still waiting for package %v to parse", dependent, l) - return state.WaitForPackage(l, dependent, mode) - } + <-ch + return state.Graph.PackageByLabel(l) } // If something has already queued the package to be parsed, wait for them if ch := state.progress.packageWaits.Get(key); ch != nil { - select { - case <-ch: - return state.Graph.PackageByLabel(l) - case <-time.After(time.Minute): - log.Debugf("%v: still waiting for package %v to parse", dependent, l) - return state.WaitForPackage(l, dependent, mode) - } + <-ch + return state.Graph.PackageByLabel(l) } // Otherwise queue the target for parse and recurse @@ -868,13 +858,9 @@ func (state *BuildState) WaitForBuiltTarget(l, dependent BuildLabel, mode ParseM dependent.Name = "all" // Every target in this package depends on this one. // okay, we need to register and wait for this guy. if ch, inserted := state.progress.pendingTargets.AddOrGet(l, make(chan struct{})); !inserted { - select { - case <-ch: - return state.Graph.Target(l) - case <-time.After(time.Minute): - log.Debugf("%v: still waiting for %v to build", dependent, l) - return state.WaitForBuiltTarget(l, dependent, mode) - } + // Something's already registered for this, get on the train + <-ch + return state.Graph.Target(l) } if err := state.queueTarget(l, dependent, mode.IsForSubinclude(), mode); err != nil { log.Fatalf("%v", err) @@ -1150,7 +1136,7 @@ func (state *BuildState) queueTargetAsync(target *BuildTarget, forceBuild, build // Wait for these targets to actually build. if building { for _, t := range target.Dependencies() { - t.WaitForBuild(target.Label) + t.WaitForBuild() if t.State() >= DependencyFailed { // Either the target failed or its dependencies failed // Give up and set the original target as dependency failed target.SetState(DependencyFailed)