@@ -34,7 +34,6 @@ import (
34
34
"strings"
35
35
36
36
"arduino.cc/builder/constants"
37
- "arduino.cc/builder/i18n"
38
37
"arduino.cc/builder/types"
39
38
"arduino.cc/builder/utils"
40
39
"arduino.cc/properties"
@@ -51,10 +50,7 @@ func (s *IncludesToIncludeFolders) Run(ctx *types.Context) error {
51
50
libraryResolutionResults := ctx .LibrariesResolutionResults
52
51
importedLibraries := ctx .ImportedLibraries
53
52
54
- newlyImportedLibraries , err := resolveLibraries (includes , headerToLibraries , importedLibraries , []* types.Platform {actualPlatform , platform }, libraryResolutionResults )
55
- if err != nil {
56
- return i18n .WrapError (err )
57
- }
53
+ newlyImportedLibraries := resolveLibraries (includes , headerToLibraries , importedLibraries , []* types.Platform {actualPlatform , platform }, libraryResolutionResults )
58
54
59
55
foldersWithSources := ctx .FoldersWithSourceFiles
60
56
@@ -89,7 +85,7 @@ func resolveIncludeFolders(importedLibraries []*types.Library, buildProperties p
89
85
}
90
86
91
87
//FIXME it's also resolving previously resolved libraries
92
- func resolveLibraries (includes []string , headerToLibraries map [string ][]* types.Library , importedLibraries []* types.Library , platforms []* types.Platform , libraryResolutionResults map [string ]types.LibraryResolutionResult ) ( []* types.Library , error ) {
88
+ func resolveLibraries (includes []string , headerToLibraries map [string ][]* types.Library , importedLibraries []* types.Library , platforms []* types.Platform , libraryResolutionResults map [string ]types.LibraryResolutionResult ) []* types.Library {
93
89
markImportedLibrary := make (map [* types.Library ]bool )
94
90
for _ , library := range importedLibraries {
95
91
markImportedLibrary [library ] = true
@@ -103,7 +99,7 @@ func resolveLibraries(includes []string, headerToLibraries map[string][]*types.L
103
99
newlyImportedLibraries = append (newlyImportedLibraries , library )
104
100
}
105
101
106
- return newlyImportedLibraries , nil
102
+ return newlyImportedLibraries
107
103
}
108
104
109
105
func resolveLibrary (header string , headerToLibraries map [string ][]* types.Library , markImportedLibrary map [* types.Library ]bool , platforms []* types.Platform , libraryResolutionResults map [string ]types.LibraryResolutionResult ) {
0 commit comments