dependency

Anything a program needs in order to work, such as a library, a tool or another service.

In more detail

Dependencies can be inside the program, such as libraries and packages, or outside it, such as a database or another service. Recording them with versions lets someone else reproduce the same setup.

Examples

An Ansible project depends on a pinned ansible-core in requirements.txt and on collections and roles listed in requirements.yml.
In a layered design system a component's dependencies must come from lower layers only.
Product teams treat the design system as a dependency and pin its version; if upgrades keep breaking things they stop upgrading.
The twelve-factor app says every dependency must be declared exactly and isolated at run time, including system tools the app calls out to. Backing services such as databases are dependencies reached over the network.
go mod tidy keeps go.mod in step with the imports
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId>...
Packages declare their dependencies in their metadata, and the package manager installs or keeps them so every required relationship stays satisfied. Removing a library other packages depend on would break them, so the manager removes or refuses accordingly. Systemd units have their own kind of dependency on other units.
pip show requests lists what requests depends on.
In Terraform: Terraform uses the word in two ways. Between resources, a dependency is an ordering: one must exist before another. For a project, providers and public modules are dependencies you download and should review, pin and upgrade deliberately.
In this course: In testing, the dependencies that matter are the ones that are slow, shared or outside your control, such as databases, networks, clocks and random sources. Unit tests replace them with doubles; integration tests use the real thing on purpose.

Related terms

Taught in

References

Certification courses