Clarify ExistentPathForSource docs
Specify that these paths are relative to SrcDir, not relative to a module's local source directory. Test: n/a Change-Id: I9a80f19b2eb3a15e6276e98200796b0680af9ee7
This commit is contained in:
@@ -279,7 +279,8 @@ func (paths Paths) containsPath(path Path) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// PathsForSource returns Paths rooted from SrcDir
|
||||
// PathsForSource returns Paths rooted from SrcDir, *not* rooted from the module's local source
|
||||
// directory
|
||||
func PathsForSource(ctx PathContext, paths []string) Paths {
|
||||
ret := make(Paths, len(paths))
|
||||
for i, path := range paths {
|
||||
@@ -288,9 +289,9 @@ func PathsForSource(ctx PathContext, paths []string) Paths {
|
||||
return ret
|
||||
}
|
||||
|
||||
// ExistentPathsForSources returns a list of Paths rooted from SrcDir that are
|
||||
// found in the tree. If any are not found, they are omitted from the list,
|
||||
// and dependencies are added so that we're re-run when they are added.
|
||||
// ExistentPathsForSources returns a list of Paths rooted from SrcDir, *not* rooted from the
|
||||
// module's local source directory, that are found in the tree. If any are not found, they are
|
||||
// omitted from the list, and dependencies are added so that we're re-run when they are added.
|
||||
func ExistentPathsForSources(ctx PathContext, paths []string) Paths {
|
||||
ret := make(Paths, 0, len(paths))
|
||||
for _, path := range paths {
|
||||
@@ -914,9 +915,10 @@ func PathForSource(ctx PathContext, pathComponents ...string) SourcePath {
|
||||
return path
|
||||
}
|
||||
|
||||
// ExistentPathForSource returns an OptionalPath with the SourcePath if the
|
||||
// path exists, or an empty OptionalPath if it doesn't exist. Dependencies are added
|
||||
// so that the ninja file will be regenerated if the state of the path changes.
|
||||
// ExistentPathForSource returns an OptionalPath with the SourcePath, rooted from SrcDir, *not*
|
||||
// rooted from the module's local source directory, if the path exists, or an empty OptionalPath if
|
||||
// it doesn't exist. Dependencies are added so that the ninja file will be regenerated if the state
|
||||
// of the path changes.
|
||||
func ExistentPathForSource(ctx PathContext, pathComponents ...string) OptionalPath {
|
||||
path, err := pathForSource(ctx, pathComponents...)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user