make changeDetectedViaJsonBuildInstructions warning less verbose when json file invalid (eg due to spec change) (#18197)

This commit is contained in:
Timothee Cour 2021-06-06 00:53:22 -07:00 • committed by GitHub
commit 9106ab7db1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -993,7 +993,7 @@ proc changeDetectedViaJsonBuildInstructions*(conf: ConfigRef; jsonFile: Absolute
var bcache: BuildCache var bcache: BuildCache
try: bcache.fromJson(jsonFile.string.parseFile) try: bcache.fromJson(jsonFile.string.parseFile)
except IOError, OSError, ValueError: except IOError, OSError, ValueError:
stderr.write "Warning: JSON processing failed for $#: $#\n" % [jsonFile.string, getCurrentExceptionMsg()] stderr.write "Warning: JSON processing failed for: $#\n" % jsonFile.string
return true return true
if bcache.currentDir != getCurrentDir() or # fixes bug #16271 if bcache.currentDir != getCurrentDir() or # fixes bug #16271
bcache.configFiles != conf.configFiles.mapIt(it.string) or bcache.configFiles != conf.configFiles.mapIt(it.string) or