Skip to content

Don't bail out if got include unrelated error while preprocessing #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const MSG_BOOTLOADER_FILE_MISSING = "Bootloader file specified but missing: {0}"
const MSG_BUILD_OPTIONS_CHANGED = "Build options changed, rebuilding all"
const MSG_CANT_FIND_SKETCH_IN_PATH = "Unable to find {0} in {1}"
const MSG_FQBN_INVALID = "{0} is not a valid fully qualified board name. Required format is targetPackageName:targetPlatformName:targetBoardName."
const MSG_FIND_INCLUDES_FAILED = "Error while detecting libraries included by {0}"
const MSG_INVALID_QUOTING = "Invalid quoting: no closing [{0}] char found."
const MSG_IGNORED_BUILTIN_TOOLS_TXT = "Skipping {0}; please consider removing that file since it may hurt older Arduino installations"
const MSG_LIB_LEGACY = "(legacy)"
Expand Down
6 changes: 2 additions & 4 deletions container_find_includes.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
return i18n.WrapError(preproc_err)
} else {
include = IncludesFinderWithRegExp(ctx, string(preproc_stderr))
if include == "" {
// No include found? Bail out.
os.Stderr.Write(preproc_stderr)
return i18n.WrapError(preproc_err)
if include == "" && ctx.Verbose {
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_FIND_INCLUDES_FAILED, sourcePath)
}
}
}
Expand Down