Skip to content

Commit d1ebf85

Browse files
author
Federico Fissore
committed
lib-discovery-recursion-depth is not needed since 1.2.0. Hence removing CLI param
Signed-off-by: Federico Fissore <[email protected]>
1 parent 4a933e9 commit d1ebf85

File tree

6 files changed

+0
-17
lines changed

6 files changed

+0
-17
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ This tool generates function prototypes and gathers library paths, providing `gc
3535

3636
* `-logger`: Optional, can be "human" or "machine". Defaults to "human". If "machine", messages emitted will be in a format which the Arduino IDE understands and that it uses for I18N.
3737

38-
* `-lib-discovery-recursion-depth`: Optional. Defaults to 4. How deep should library discovery go down looking for included libraries.
39-
4038
* `-version`: if specified, prints version and exits.
4139

4240
* `-build-options-file`: it specifies path to a local `build.options.json` file (see paragraph below), which allows you to omit specifying params such as `-hardware`, `-tools`, `-libraries`, `-fqbn`, `-pref` and `-ide-version`.

main.go

-7
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ const FLAG_WARNINGS_ALL = "all"
7272
const FLAG_LOGGER = "logger"
7373
const FLAG_LOGGER_HUMAN = "human"
7474
const FLAG_LOGGER_MACHINE = "machine"
75-
const FLAG_LIB_DISCOVERY_RECURSION_PATH = "lib-discovery-recursion-depth"
7675
const FLAG_VERSION = "version"
7776
const FLAG_VID_PID = "vid-pid"
7877

@@ -113,7 +112,6 @@ var buildPathFlag *string
113112
var verboseFlag *bool
114113
var quietFlag *bool
115114
var debugLevelFlag *int
116-
var libraryDiscoveryRecursionDepthFlag *int
117115
var warningsLevelFlag *string
118116
var loggerFlag *string
119117
var versionFlag *bool
@@ -137,7 +135,6 @@ func init() {
137135
debugLevelFlag = flag.Int(FLAG_DEBUG_LEVEL, builder.DEFAULT_DEBUG_LEVEL, "Turns on debugging messages. The higher, the chattier")
138136
warningsLevelFlag = flag.String(FLAG_WARNINGS, "", "Sets warnings level. Available values are '"+FLAG_WARNINGS_NONE+"', '"+FLAG_WARNINGS_DEFAULT+"', '"+FLAG_WARNINGS_MORE+"' and '"+FLAG_WARNINGS_ALL+"'")
139137
loggerFlag = flag.String(FLAG_LOGGER, FLAG_LOGGER_HUMAN, "Sets type of logger. Available values are '"+FLAG_LOGGER_HUMAN+"', '"+FLAG_LOGGER_MACHINE+"'")
140-
libraryDiscoveryRecursionDepthFlag = flag.Int(FLAG_LIB_DISCOVERY_RECURSION_PATH, builder.DEFAULT_LIBRARY_DISCOVERY_RECURSION_DEPTH, "How deep should library discovery go down looking for included libraries")
141138
versionFlag = flag.Bool(FLAG_VERSION, false, "prints version and exits")
142139
vidPidFlag = flag.String(FLAG_VID_PID, "", "specify to use vid/pid specific build properties, as defined in boards.txt")
143140
}
@@ -292,10 +289,6 @@ func main() {
292289
context[constants.CTX_DEBUG_LEVEL] = *debugLevelFlag
293290
}
294291

295-
if *libraryDiscoveryRecursionDepthFlag > 0 {
296-
context[constants.CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH] = *libraryDiscoveryRecursionDepthFlag
297-
}
298-
299292
if *quietFlag {
300293
context[constants.CTX_LOGGER] = i18n.NoopLogger{}
301294
} else if *loggerFlag == FLAG_LOGGER_MACHINE {

src/arduino.cc/builder/add_additional_entries_to_context.go

-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ func (s *AddAdditionalEntriesToContext) Run(context map[string]interface{}) erro
7676
context[constants.CTX_DEBUG_LEVEL] = DEFAULT_DEBUG_LEVEL
7777
}
7878

79-
if !utils.MapHas(context, constants.CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH) {
80-
context[constants.CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH] = DEFAULT_LIBRARY_DISCOVERY_RECURSION_DEPTH
81-
}
82-
8379
sourceFiles := &types.UniqueStringQueue{}
8480
context[constants.CTX_COLLECTED_SOURCE_FILES_QUEUE] = sourceFiles
8581
foldersWithSources := &types.UniqueSourceFolderQueue{}

src/arduino.cc/builder/builder.go

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const DEFAULT_DEBUG_LEVEL = 5
6262
const DEFAULT_WARNINGS_LEVEL = "none"
6363
const DEFAULT_SOFTWARE = "ARDUINO"
6464
const DEFAULT_BUILD_CORE = "arduino"
65-
const DEFAULT_LIBRARY_DISCOVERY_RECURSION_DEPTH = 4
6665

6766
type Builder struct{}
6867

src/arduino.cc/builder/constants/constants.go

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ const CTX_INCLUDES_JUST_FOUND = "includesJustFound"
109109
const CTX_LIBRARIES_BUILD_PATH = "librariesBuildPath"
110110
const CTX_LIBRARIES_FOLDERS = "librariesFolders"
111111
const CTX_LIBRARIES = "libraries"
112-
const CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH = "libraryDiscoveryRecursionDepth"
113112
const CTX_LIBRARY_RESOLUTION_RESULTS = "libraryResolutionResults"
114113
const CTX_LINE_OFFSET = "lineOffset"
115114
const CTX_LINE_WHERE_TO_INSERT_PROTOTYPES = "lineWhereToInsertPrototypes"

src/arduino.cc/builder/test/add_additional_entries_to_context_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func TestAddAdditionalEntriesToContextNoBuildPath(t *testing.T) {
5252
require.NotNil(t, context[constants.CTX_WARNINGS_LEVEL])
5353
require.NotNil(t, context[constants.CTX_VERBOSE])
5454
require.NotNil(t, context[constants.CTX_DEBUG_LEVEL])
55-
require.NotNil(t, context[constants.CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH])
5655

5756
require.True(t, context[constants.CTX_COLLECTED_SOURCE_FILES_QUEUE].(*types.UniqueStringQueue).Empty())
5857
require.True(t, context[constants.CTX_FOLDERS_WITH_SOURCES_QUEUE].(*types.UniqueSourceFolderQueue).Empty())
@@ -76,7 +75,6 @@ func TestAddAdditionalEntriesToContextWithBuildPath(t *testing.T) {
7675
require.NotNil(t, context[constants.CTX_WARNINGS_LEVEL])
7776
require.NotNil(t, context[constants.CTX_VERBOSE])
7877
require.NotNil(t, context[constants.CTX_DEBUG_LEVEL])
79-
require.NotNil(t, context[constants.CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH])
8078

8179
require.True(t, context[constants.CTX_COLLECTED_SOURCE_FILES_QUEUE].(*types.UniqueStringQueue).Empty())
8280
require.True(t, context[constants.CTX_FOLDERS_WITH_SOURCES_QUEUE].(*types.UniqueSourceFolderQueue).Empty())

0 commit comments

Comments
 (0)