Skip to content

Commit 7f48528

Browse files
committed
Removed redundant builder_utils.CompileFilesRecursive function
1 parent 2e06146 commit 7f48528

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

legacy/builder/builder_utils/utils.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,6 @@ import (
3535

3636
var tr = i18n.Tr
3737

38-
func CompileFilesRecursive(ctx *types.Context, sourcePath *paths.Path, buildPath *paths.Path, buildProperties *properties.Map, includes []string) (paths.PathList, error) {
39-
objectFiles, err := CompileFiles(ctx, sourcePath, false, buildPath, buildProperties, includes)
40-
if err != nil {
41-
return nil, errors.WithStack(err)
42-
}
43-
44-
folders, err := utils.ReadDirFiltered(sourcePath.String(), utils.FilterDirs)
45-
if err != nil {
46-
return nil, errors.WithStack(err)
47-
}
48-
49-
for _, folder := range folders {
50-
subFolderObjectFiles, err := CompileFilesRecursive(ctx, sourcePath.Join(folder.Name()), buildPath.Join(folder.Name()), buildProperties, includes)
51-
if err != nil {
52-
return nil, errors.WithStack(err)
53-
}
54-
objectFiles.AddAll(subFolderObjectFiles)
55-
}
56-
57-
return objectFiles, nil
58-
}
59-
6038
func CompileFiles(ctx *types.Context, sourcePath *paths.Path, recurse bool, buildPath *paths.Path, buildProperties *properties.Map, includes []string) (paths.PathList, error) {
6139
var allFiles paths.PathList
6240
var err error

legacy/builder/phases/libraries_builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func compileLibrary(ctx *types.Context, library *libraries.Library, buildPath *p
184184
}
185185

186186
if library.Layout == libraries.RecursiveLayout {
187-
libObjectFiles, err := builder_utils.CompileFilesRecursive(ctx, library.SourceDir, libraryBuildPath, buildProperties, includes)
187+
libObjectFiles, err := builder_utils.CompileFiles(ctx, library.SourceDir, true, libraryBuildPath, buildProperties, includes)
188188
if err != nil {
189189
return nil, errors.WithStack(err)
190190
}

0 commit comments

Comments
 (0)