File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ const MSG_USING_CACHED_INCLUDES = "Using cached library dependencies for file: {
124
124
const MSG_WARNING_LIB_INVALID_CATEGORY = "WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}'"
125
125
const MSG_WARNING_PLATFORM_OLD_VALUES = "Warning: platform.txt from core '{0}' contains deprecated {1}, automatically converted to {2}. Consider upgrading this core."
126
126
const MSG_WARNING_SPURIOUS_FILE_IN_LIB = "WARNING: Spurious {0} folder in '{1}' library"
127
+ const MSG_INVESTIGATE = " (unusual state to investigate)"
127
128
const PACKAGE_NAME = "name"
128
129
const PACKAGE_TOOLS = "tools"
129
130
const PLATFORM_ARCHITECTURE = "architecture"
Original file line number Diff line number Diff line change @@ -44,14 +44,19 @@ func (s *WipeoutBuildPathIfBuildOptionsChanged) Run(ctx *types.Context) error {
44
44
json .Unmarshal ([]byte (buildOptionsJson ), & opts )
45
45
json .Unmarshal ([]byte (previousBuildOptionsJson ), & prevOpts )
46
46
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
+
47
52
// 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" )) {
49
54
opts .Remove ("sketchLocation" )
50
55
prevOpts .Remove ("sketchLocation" )
51
56
}
52
57
53
58
// If options are not changed check if core has
54
- if prevOpts != nil && opts .Equals (prevOpts ) {
59
+ if opts .Equals (prevOpts ) {
55
60
// check if any of the files contained in the core folders has changed
56
61
// since the json was generated - like platform.txt or similar
57
62
// if so, trigger a "safety" wipe
You can’t perform that action at this time.
0 commit comments