Skip to content

Commit fc5abf6

Browse files
committed
+ debug message
1 parent 3d0c95a commit fc5abf6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

legacy/builder/constants/constants.go

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const MSG_USING_CACHED_INCLUDES = "Using cached library dependencies for file: {
124124
const MSG_WARNING_LIB_INVALID_CATEGORY = "WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}'"
125125
const MSG_WARNING_PLATFORM_OLD_VALUES = "Warning: platform.txt from core '{0}' contains deprecated {1}, automatically converted to {2}. Consider upgrading this core."
126126
const MSG_WARNING_SPURIOUS_FILE_IN_LIB = "WARNING: Spurious {0} folder in '{1}' library"
127+
const MSG_INVESTIGATE = " (unusual state to investigate)"
127128
const PACKAGE_NAME = "name"
128129
const PACKAGE_TOOLS = "tools"
129130
const PLATFORM_ARCHITECTURE = "architecture"

legacy/builder/wipeout_build_path_if_build_options_changed.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,19 @@ func (s *WipeoutBuildPathIfBuildOptionsChanged) Run(ctx *types.Context) error {
4444
json.Unmarshal([]byte(buildOptionsJson), &opts)
4545
json.Unmarshal([]byte(previousBuildOptionsJson), &prevOpts)
4646

47+
if prevOpts == nil {
48+
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_BUILD_OPTIONS_CHANGED + constants.MSG_INVESTIGATE);
49+
return doCleanup(ctx.BuildPath)
50+
}
51+
4752
// If SketchLocation path is different but filename is the same, consider it equal
48-
if prevOpts != nil && filepath.Base(opts.Get("sketchLocation")) == filepath.Base(prevOpts.Get("sketchLocation")) {
53+
if filepath.Base(opts.Get("sketchLocation")) == filepath.Base(prevOpts.Get("sketchLocation")) {
4954
opts.Remove("sketchLocation")
5055
prevOpts.Remove("sketchLocation")
5156
}
5257

5358
// If options are not changed check if core has
54-
if prevOpts != nil && opts.Equals(prevOpts) {
59+
if opts.Equals(prevOpts) {
5560
// check if any of the files contained in the core folders has changed
5661
// since the json was generated - like platform.txt or similar
5762
// if so, trigger a "safety" wipe

0 commit comments

Comments
 (0)