Skip to content
  • Salma Samy's avatar
    Lockfile cherry picks (#18143) · 5afb8b61
    Salma Samy authored
    * Module Lockfile
    
    - Created lockfile K/F/V holding module information and its related flags
    - Updated BazelDepGraph function to use the lockfile
    - Created type adapters for module, related classes & immutable collections
    - Updated tests with Module.bazel to work after enabling the lockfile
    - Added new java test class for the lockfile
    - Added a flag to enable/disable lockfile (while it's still in progress)
    - Added integration tests
    
    PiperOrigin-RevId: 520925174
    Change-Id: Ib8da99aa86a1797da44dc9a899d932f58c4a84c9
    
    # Conflicts:
    #	src/test/py/bazel/bzlmod/bazel_module_test.py
    
    * Make lockfile human readable
    
    PiperOrigin-RevId: 521009432
    Change-Id: I2b2e5e0c845f05c428ff8772aba2abce72a3830f
    
    * Split bazel_module_tests into smaller ones
    
    PiperOrigin-RevId: 521766028
    Change-Id: I44f5f68e4357bcc1219985e983814c5e4afec65d
    
    # Conflicts:
    #	src/test/py/bazel/BUILD
    #	src/test/py/bazel/bzlmod/bazel_module_test.py
    
    * Update lockfile name
    
    PiperOrigin-RevId: 521871482
    Change-Id: Ib4357c4d35fa8ebd2e636c7f15740247ee8dfab2
    
    * Add repospec to the module
    
    - With this we can get the repospec directly from the module not the registry (no need for internet access)
    - Since Repospec & Tag classes have an "attributes" field that can hold starlark values, an adapter was needed to serialize/deserialize starlark values
    
    PiperOrigin-RevId: 523364539
    Change-Id: Ifcdf0c6b4b6fbbcdae9c14a4b0cd7f53ae91c161
    
    * Update lockfile flag from experimental to different modes flag:
    - Update: run resolution and update the lock file when it mismatches the module
    - Error: throw an error if the module doesn't match the lockfile
    - Off: don't read/update the lockfile
    
    PiperOrigin-RevId: 524813416
    Change-Id: I5cc3577fdbed8339ada50001081b75b4932c017c
    
    * Hash local overrides Module files into the lockfile
    
    PiperOrigin-RevId: 525405790
    Change-Id: I7c9b26469c889435ed4adc4a49197c10e0284af0
    
    # Conflicts:
    #	src/main/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodFlagsAndEnvVars.java
    #	src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BazelLockFileFunctionTest.java
    
    * update functions names
    
    * Add auto_value_gson and fixes
    
    * update auto value import
    
    * increase install base size
    
    RELNOTES: Added preliminary support for a lockfile for Bzlmod. It's disabled by default; use `--lockfile_mode=update` to enable it. This lockfile contains only Bazel module information; it does not involve module extensions.
    5afb8b61