Skip to content

Commit 341b441

Browse files
facchinmcmaglie
authored andcommitted
Add warning if unable to preprocess a file
1 parent 5985bf8 commit 341b441

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: constants/constants.go

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ const MSG_BOOTLOADER_FILE_MISSING = "Bootloader file specified but missing: {0}"
161161
const MSG_BUILD_OPTIONS_CHANGED = "Build options changed, rebuilding all"
162162
const MSG_CANT_FIND_SKETCH_IN_PATH = "Unable to find {0} in {1}"
163163
const MSG_FQBN_INVALID = "{0} is not a valid fully qualified board name. Required format is targetPackageName:targetPlatformName:targetBoardName."
164+
const MSG_FIND_INCLUDES_FAILED = "Failed to find includes in file {1}"
164165
const MSG_INVALID_QUOTING = "Invalid quoting: no closing [{0}] char found."
165166
const MSG_IGNORED_BUILTIN_TOOLS_TXT = "Skipping {0}; please consider removing that file since it may hurt older Arduino installations"
166167
const MSG_LIB_LEGACY = "(legacy)"

Diff for: container_find_includes.go

+3
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
343343
return i18n.WrapError(preproc_err)
344344
} else {
345345
include = IncludesFinderWithRegExp(ctx, string(preproc_stderr))
346+
if include == "" {
347+
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_FIND_INCLUDES_FAILED, sourcePath)
348+
}
346349
}
347350
}
348351

0 commit comments

Comments
 (0)