Browse the documentation

AEL 1.0.0

Comparing lock files

In AEL, the Agent Engineering Language, ael pack lock-diff compares two lock files and shows exactly how the packages they record differ. Use it to review a change of dependencies before you accept it.

Usage

ael pack lock-diff <before> <after>
ael pack lock-diff previous/pack.lock pack.lock
ael pack lock-diff previous/pack.lock pack.lock --json
Argument or optionMeaning
<before>The earlier lock file.
<after>The later lock file.
--jsonThe differences in machine-readable form, with the complete records of both files.

The two files can be anywhere: a copy kept from an earlier build, one taken from a colleague's change, or the file in your project.

What it shows

Every package is reported as one of:

ChangeMeaning
AddedIn the later file only.
RemovedIn the earlier file only.
ChangedThe same package in both, with a difference in what the lock file records for it.

A new version is a different package: after an update, the old version is reported as removed, the new one as added, and your declaration that now points to it as changed.

For a changed package, it lists each field that differs:

  • the features and the capabilities recorded for it;
  • the packages it depends on, link by link, with their target restrictions;
  • the files it contains, file by file.

Packages that did not change are not listed. When the two files record the same packages, the command says there is no difference.

Nothing is matched by guessing

A package is identified by its name, version, origin, publisher and file fingerprint together. If any of these changes, for example a new version, or the same version from another address or with another fingerprint, the package is reported as removed and added, never as a quiet change. A package file that changes without a new version is exactly what AEL refuses to use, and lock-diff makes it visible.

What it never does

ael pack lock-diff reads the two files you name and nothing else. It needs no project, uses no network, changes nothing and runs no package code. Both files are checked to be valid lock files before they are compared; a damaged file is reported as such.

When to use it

  • Reviewing a change that updated, added or removed packages, before it is merged into your project.
  • In an automated build, to show what changed since the last release.
  • After ael pack update, to see everything the update moved.