Browse the documentation

AEL 1.0.0

Why a package is in a project

In AEL, the Agent Engineering Language, ael pack why explains why a package is part of a project: which package you declared brings it in, and through which others.

Usage

ael pack why math/array
ael pack why math/array --json
Argument or optionMeaning
<name>The package to explain.
--jsonThe explanation in machine-readable form.

What it shows

  • The chain. The dependency path from a package that your pack.ael declares to the package you asked about, one link at a time. When there is more than one path, it shows the shortest.
  • Whether the chain applies to your target. A dependency may be limited to some targets. Such a link stays recorded in the lock file, but it is not part of a build for another target, and the answer says so.
  • The features that bring it in, when a package is needed only because a feature was requested.

A package that you declare yourself is its own answer: the chain has one link.

What it reads

ael pack why reads the dependency graph that pack.lock records. It changes nothing, uses no network, and runs no package code. The answer is about dependencies: that a package is part of the project. It does not say that your code calls it.

To see whether your code actually uses a package, and what uses it, use ael refmap. A package may be installed because another package depends on it and still be unused by your program; the reference map shows it as unused, and the build leaves it out.

When the answer surprises you