@@ -34,7 +34,6 @@ import (
3434 "strings"
3535
3636 "arduino.cc/builder/constants"
37- "arduino.cc/builder/i18n"
3837 "arduino.cc/builder/types"
3938 "arduino.cc/builder/utils"
4039 "arduino.cc/properties"
@@ -51,10 +50,7 @@ func (s *IncludesToIncludeFolders) Run(ctx *types.Context) error {
5150 libraryResolutionResults := ctx .LibrariesResolutionResults
5251 importedLibraries := ctx .ImportedLibraries
5352
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 )
5854
5955 foldersWithSources := ctx .FoldersWithSourceFiles
6056
@@ -89,7 +85,7 @@ func resolveIncludeFolders(importedLibraries []*types.Library, buildProperties p
8985}
9086
9187//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 {
9389 markImportedLibrary := make (map [* types.Library ]bool )
9490 for _ , library := range importedLibraries {
9591 markImportedLibrary [library ] = true
@@ -103,7 +99,7 @@ func resolveLibraries(includes []string, headerToLibraries map[string][]*types.L
10399 newlyImportedLibraries = append (newlyImportedLibraries , library )
104100 }
105101
106- return newlyImportedLibraries , nil
102+ return newlyImportedLibraries
107103}
108104
109105func resolveLibrary (header string , headerToLibraries map [string ][]* types.Library , markImportedLibrary map [* types.Library ]bool , platforms []* types.Platform , libraryResolutionResults map [string ]types.LibraryResolutionResult ) {
0 commit comments