File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 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: {
124124const MSG_WARNING_LIB_INVALID_CATEGORY = "WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}'"
125125const MSG_WARNING_PLATFORM_OLD_VALUES = "Warning: platform.txt from core '{0}' contains deprecated {1}, automatically converted to {2}. Consider upgrading this core."
126126const MSG_WARNING_SPURIOUS_FILE_IN_LIB = "WARNING: Spurious {0} folder in '{1}' library"
127+ const MSG_INVESTIGATE = " (unusual state to investigate)"
127128const PACKAGE_NAME = "name"
128129const PACKAGE_TOOLS = "tools"
129130const 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 {
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
You can’t perform that action at this time.
0 commit comments