Skip to content
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

Make the subrepo targets output into plz-out/gen based on their pkg dir #3063

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/core/build_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,16 @@ func (target *BuildTarget) BuildLockFile() string {
// OutDir returns the output directory for this target, eg.
// //mickey/donald:goofy -> plz-out/gen/mickey/donald (or plz-out/bin if it's a binary)
func (target *BuildTarget) OutDir() string {
subrepoNamespace := target.Label.Subrepo // Use the subrepo name unless the package root has been provided for us
if target.Subrepo != nil && target.Subrepo.PackageRoot != "" {
subrepoNamespace = target.Subrepo.PackageRoot
}
if target.IsSubrepo {
return filepath.Join(SubrepoDir, target.Label.Subrepo, target.Label.PackageName)
return filepath.Join(SubrepoDir, subrepoNamespace, target.Label.PackageName)
} else if target.IsBinary {
return filepath.Join(BinDir, target.Label.Subrepo, target.Label.PackageName)
return filepath.Join(BinDir, subrepoNamespace, target.Label.PackageName)
}
return filepath.Join(GenDir, target.Label.Subrepo, target.Label.PackageName)
return filepath.Join(GenDir, subrepoNamespace, target.Label.PackageName)
}

// ExecDir returns the exec directory for this target, e.g.
Expand Down
Loading