Dependency Pinning
Dependency pinning is a software development practice that involves locking down the exact versions of external libraries, packages, or tools used in a project to ensure consistent and reproducible builds. It typically involves specifying precise version numbers or commit hashes in configuration files like package.json, requirements.txt, or Pipfile.lock. This prevents unexpected updates from breaking the application and helps maintain stability across different environments.
Developers should use dependency pinning in production environments, CI/CD pipelines, and collaborative projects to avoid 'dependency hell' where incompatible updates cause failures. It is crucial for ensuring that all team members and deployment systems use identical dependencies, reducing bugs related to version mismatches. This practice is especially important in long-term projects, regulated industries, or when using rapidly evolving libraries.