Remove Cache dirty-tracking

It really wasn't necessary since Cache#write is not called often.
This commit is contained in:
josh committed 2019-04-04 15:20:35 -04:00
1 parent be058dd18b
commit 7cc68b2ce1
1 file changed
+1 -7
+1 -7
View File
@@ -85,18 +85,15 @@ module Rscons
@lookup_checksums = {}
end
# Write the cache to disk to be loaded next time.
# Write the cache to disk.
#
# @return [void]
def write
if @dirty || (@cache["version"] != VERSION)
@cache["version"] = VERSION
File.open(CACHE_FILE, "w") do |fh|
fh.puts(JSON.dump(@cache))
end
end
@dirty = false
end
# Check if target(s) are up to date.
#
@@ -249,7 +246,6 @@ module Rscons
}
end,
}
@dirty = true
end
end
@@ -274,7 +270,6 @@ module Rscons
unless File.exists?(subpath)
FileUtils.mkdir_p(subpath)
@cache["directories"][subpath] = true
@dirty = true
end
end
end
@@ -315,7 +310,6 @@ module Rscons
@cache["targets"] ||= {}
@cache["directories"] ||= {}
@lookup_checksums = {}
@dirty = false
end
# Return a file's checksum, or the previously calculated checksum for