Checksum-Based Build Dependency Tracking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software build processes are computationally expensive due to the need for re-compilation of entire modules upon changes, leading to resource wastage and inefficiency, especially in large software projects, as traditional timestamp-based methods are unreliable and prone to errors.

Innovation Solution

The method involves computing and comparing checksums for configuration files to determine if a compilation strategy can be reused, using global and local build checksums to assess changes and recompute the strategy only when necessary, thereby reducing unnecessary re-compilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If timestamp-based methods are used to determine whether re-compilation is necessary, then the compilation process may be skipped when timestamps have not changed, but timestamps may not be updated or may have glitches leading to non-hermetic builds

Engineering Contradiction:
Improvebuild speedVSAvoidbuild correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent changes the parameter used for change detection from timestamps to checksums. Instead of comparing timestamp values, the system computes checksums of configuration files and compares these hash values to determine whether recompilation is needed. This parameter change eliminates timestamp-related issues while maintaining build speed improvements.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent substitutes the mechanical timestamp-based change detection system with a checksum-based system. The checksum mechanism uses cryptographic hash functions to generate unique identifiers for configuration files, replacing the fragile timestamp mechanism with a more reliable mathematical approach that accurately reflects file content changes.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If a module is defined as a set of files and any item changes, then the complete module needs to be re-compiled, but this leads to re-compilation of unchanged modules and increased computational expense

Engineering Contradiction:
Improvebuild correctnessVSAvoidbuild efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the build system into fine-grained units by computing individual checksums for each configuration file rather than treating modules as atomic units. This allows the build system to identify and recompile only the specific files that have changed, rather than recompiling entire modules, thereby improving build efficiency while maintaining correctness.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by computing checksums at the file level within modules. When a change is detected, only the affected file and its dependent files are recompiled, while other files in the same module that have not changed are left untouched. This localized approach reduces unnecessary compilation work while ensuring that changes are properly propagated.

Inventive Principle:
Principle #3Local quality

3Adaptability or versatility

If a compilation plan is re-computed every time modules are re-compiled, then the build strategy adapts to changes, but this re-computation is computationally expensive for large software products

Engineering Contradiction:
Improvebuild strategy adaptabilityVSAvoidbuild time
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent performs preliminary action by computing checksums of all configuration files before determining whether a full recompilation or selective recompilation is needed. This pre-computation of checksums allows the build system to quickly assess changes and make informed decisions about recompilation scope, avoiding the need for expensive full recompilation plans when changes are minimal.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies partial action by computing only the necessary portion of the build plan based on checksum comparisons. Instead of always computing a complete compilation plan for all modules, the system computes plans only for affected modules and files, reducing computational expense while maintaining adaptability to changes through selective plan generation.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentEP2771788B1Methods and apparatuses for computing checksums for effective caching in continuous distributed builds
Publication Date: 2018.01.10 GOOGLE LLC
  • EP2771788B1 patent drawingFigure 1
  • EP2771788B1 patent drawingFigure 2
  • EP2771788B1 patent drawingFigure 3

AI summary

Methods, systems, and computer-readable media for determining whether dependencies of configuration files have changed such that the compilation strategy should be recomputed. Local build checksums are computed for individual configuration files. The local build checksums are computed by sorting input paths to the configuration files plus data indicating whether the path refers to a file or a directory and a checksum computed on the configuration file itself. The transitive closure of local build checksums are then used to compute a global build checksum: the local build checksums are sorted in order to compute the global build checksum. If the global build checksum is different from a previously computed global build checksum, then the compilation strategy should be recomputed, since this is a signal that the compilation strategy may not be valid anymore, e.g. because some dependencies in the configuration files have changed.