Dependencies.lock File
The dependencies.lock
file is generated by the version solver and contains the exact versions of the selected components. It ensures reproducible builds by using the same component versions when the project is built in the future.
If your project includes only the ESP Component Registry Dependencies or Git Dependencies, it is recommended to check in the dependencies.lock
file to ensure all developers use the same component versions when building locally.
If your project includes Local Directory Dependencies, the dependencies.lock
file should not be checked into version control. This is because the lock file will contain local paths specific to your environment, which are not available to other developers.
Warning
The dependencies.lock
file should not be manually edited. It should only be modified by the version solver.
Root Attributes
dependencies
The dependencies
attribute is a dictionary containing all the project's flattened dependencies. The keys represent the dependency names, and the values are explained in the Dependency Attributes section.
direct_dependencies
The direct_dependencies
attribute is a list of the project's direct dependencies, meaning the dependencies that are directly specified in the project's manifest files. This list is used to ensure that the build system is re-triggered when a component is moved from ESP Component Registry Dependencies to Local Directory Dependencies.
manifest_hash
The manifest_hash
attribute is a hash of all the manifest files tracked in the project. This hash ensures that the dependencies.lock
file is generated based on the latest manifest files.
target
The target
attribute specifies the target for which the dependencies.lock
file was generated. This ensures that the Conditional Dependencies are resolved correctly based on the current target.
version
The version
attribute indicates the version of the dependencies.lock
file. It ensures that this version matches the version of the IDF Component Manager.
For example, IDF Component Manager 1.x uses version 1.0.0
for the dependencies.lock
file, while IDF Component Manager 2.x uses version 2.0.0
.
Dependency Attributes
Each dependency in the dependencies
dictionary has the following attributes:
component_hash
The component_hash
attribute is a hash of the component, ensuring that the component remains unchanged after the dependencies.lock
file is generated.
dependencies
The dependencies
attribute is a dictionary containing the direct dependencies of the component.
source
The source
attribute specifies the type of the component. For more details, please refer to the Component Dependencies section.
version
The version
attribute indicates the version of the component selected by the Version Solver.
targets
The targets
attribute lists the targets compatible with the component. This field can be omitted if the component is compatible with all targets.