Skip to content

Commit

Permalink
Don't download transitive deps of subincludes during rex (#2889)
Browse files Browse the repository at this point in the history
* Fix issue where we might download transitive deps of subincludes during remote execution
  • Loading branch information
Tatskaari authored Aug 8, 2023
1 parent f221d08 commit f4a45ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (m ParseMode) IsPreload() bool {
}

func (m ParseMode) IsForSubinclude() bool {
return m&ParseModeForSubinclude != 0 || m&ParseModeForPreload != 0
return m&ParseModeForSubinclude != 0
}

// startTime is as close as we can conveniently get to process start time.
Expand Down Expand Up @@ -911,7 +911,7 @@ func (state *BuildState) ShouldDownload(target *BuildTarget) bool {
downloadOriginalTarget := state.OutputDownload == OriginalOutputDownload && state.IsOriginalTarget(target)
downloadTransitiveTarget := state.OutputDownload == TransitiveOutputDownload
downloadLinkableTarget := state.Config.Build.DownloadLinkable && target.HasLinks(state)
return target.neededForSubinclude.Value() || (downloadOriginalTarget && !state.NeedTests) || downloadTransitiveTarget || downloadLinkableTarget
return (downloadOriginalTarget && !state.NeedTests) || downloadTransitiveTarget || downloadLinkableTarget
}

// ShouldRebuild returns true if we should force a rebuild of this target (i.e. the user
Expand Down

0 comments on commit f4a45ca

Please sign in to comment.