Comparing lock files
In AEL, the Agent Engineering Language, ael pack lock-diff (command names may change before launch) will compare two lock files and show exactly how the packages they record differ. Use it to review a change of dependencies before you accept it.
Status
Planned for AEL Beta 0.0.1. AEL is not available yet.
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 option | Meaning |
|---|---|
<before> | The earlier lock file. |
<after> | The later lock file. |
--json | The 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 will be reported as one of:
| Change | Meaning |
|---|---|
| Added | In the later file only. |
| Removed | In the earlier file only. |
| Changed | The same package in both, with a difference in what the lock file records for it. |
A new version will be a different package: after an update, the old version will be reported as removed, the new one as added, and your declaration that now points to it as changed.
For a changed package, it will list 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 will not be listed. When the two files record the same packages, the command will say there is no difference.
Nothing will be matched by guessing
A package will be 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 will be reported as removed and added, never as a quiet change. A package file that changes without a new version is exactly what AEL will refuse to use, and lock-diff will make it visible.
What it never does
ael pack lock-diff will read the two files you name and nothing else. It will need no project, use no network, change nothing and run no package code. Both files will be checked to be valid lock files before they are compared; a damaged file will be 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.
Related
- Writing the lock file: what a lock file records.
- Dependency graph: the whole graph of one lock file.