Skip to content

Commit

Permalink
Tag v17.4.0 (#2996)
Browse files Browse the repository at this point in the history
  • Loading branch information
samwestmoreland authored Dec 15, 2023
1 parent cf8e3ac commit 6bf7312
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 32 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17.4.0-beta.10
17.4.0
2 changes: 1 addition & 1 deletion docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 2 additions & 8 deletions src/core/build_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
30 changes: 8 additions & 22 deletions src/core/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6bf7312

Please sign in to comment.